Changed names of some methods to fit the new names in SFML2 since revision: 1767
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1769 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
f8955189fa
commit
1986fb3f12
@ -254,15 +254,15 @@ static VALUE Shape_SetPointOutlineColor( VALUE self, VALUE anIndex, VALUE aColor
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* call-seq:
|
/* call-seq:
|
||||||
* shape.setOutlineWidth( width )
|
* shape.setOutlineThickness( width )
|
||||||
*
|
*
|
||||||
* Change the thickness of the shape outline.
|
* Change the thickness of the shape outline.
|
||||||
*/
|
*/
|
||||||
static VALUE Shape_SetOutlineWidth( VALUE self, VALUE aWidth )
|
static VALUE Shape_SetOutlineThickness( VALUE self, VALUE aWidth )
|
||||||
{
|
{
|
||||||
sf::Shape *object = NULL;
|
sf::Shape *object = NULL;
|
||||||
Data_Get_Struct( self, sf::Shape, object );
|
Data_Get_Struct( self, sf::Shape, object );
|
||||||
object->SetOutlineWidth( NUM2DBL( aWidth ) );
|
object->SetOutlineThickness( NUM2DBL( aWidth ) );
|
||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -319,15 +319,15 @@ static VALUE Shape_GetPointOutlineColor( VALUE self, VALUE anIndex )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* call-seq:
|
/* call-seq:
|
||||||
* shape.getOutlineWidth() -> float
|
* shape.getOutlineThickness() -> float
|
||||||
*
|
*
|
||||||
* Get the thickness of the shape outline.
|
* Get the thickness of the shape outline.
|
||||||
*/
|
*/
|
||||||
static VALUE Shape_GetOutlineWidth( VALUE self )
|
static VALUE Shape_GetOutlineThickness( VALUE self )
|
||||||
{
|
{
|
||||||
sf::Shape *object = NULL;
|
sf::Shape *object = NULL;
|
||||||
Data_Get_Struct( self, sf::Shape, object );
|
Data_Get_Struct( self, sf::Shape, object );
|
||||||
return rb_float_new( object->GetOutlineWidth() );
|
return rb_float_new( object->GetOutlineThickness() );
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE Shape_InitializeCopy( VALUE self, VALUE aSource )
|
static VALUE Shape_InitializeCopy( VALUE self, VALUE aSource )
|
||||||
@ -660,11 +660,11 @@ void Init_Shape( void )
|
|||||||
rb_define_method( globalShapeClass, "setPointPosition", Shape_SetPointPosition, -1 );
|
rb_define_method( globalShapeClass, "setPointPosition", Shape_SetPointPosition, -1 );
|
||||||
rb_define_method( globalShapeClass, "setPointColor", Shape_SetPointColor, 2 );
|
rb_define_method( globalShapeClass, "setPointColor", Shape_SetPointColor, 2 );
|
||||||
rb_define_method( globalShapeClass, "setPointOutlineColor", Shape_SetPointOutlineColor, 2 );
|
rb_define_method( globalShapeClass, "setPointOutlineColor", Shape_SetPointOutlineColor, 2 );
|
||||||
rb_define_method( globalShapeClass, "setOutlineWidth", Shape_SetOutlineWidth, 1 );
|
rb_define_method( globalShapeClass, "setOutlineThickness", Shape_SetOutlineThickness, 1 );
|
||||||
rb_define_method( globalShapeClass, "getPointPosition", Shape_GetPointPosition, 1 );
|
rb_define_method( globalShapeClass, "getPointPosition", Shape_GetPointPosition, 1 );
|
||||||
rb_define_method( globalShapeClass, "getPointColor", Shape_GetPointColor, 1 );
|
rb_define_method( globalShapeClass, "getPointColor", Shape_GetPointColor, 1 );
|
||||||
rb_define_method( globalShapeClass, "getPointOutlineColor", Shape_GetPointOutlineColor, 1 );
|
rb_define_method( globalShapeClass, "getPointOutlineColor", Shape_GetPointOutlineColor, 1 );
|
||||||
rb_define_method( globalShapeClass, "getOutlineWidth", Shape_GetOutlineWidth, 0 );
|
rb_define_method( globalShapeClass, "getOutlineThickness", Shape_GetOutlineThickness, 0 );
|
||||||
|
|
||||||
// Instance Aliases
|
// Instance Aliases
|
||||||
rb_define_alias( globalShapeClass, "add_point", "addPoint" );
|
rb_define_alias( globalShapeClass, "add_point", "addPoint" );
|
||||||
@ -677,10 +677,10 @@ void Init_Shape( void )
|
|||||||
rb_define_alias( globalShapeClass, "set_point_position", "setPointPosition" );
|
rb_define_alias( globalShapeClass, "set_point_position", "setPointPosition" );
|
||||||
rb_define_alias( globalShapeClass, "set_point_color", "setPointColor" );
|
rb_define_alias( globalShapeClass, "set_point_color", "setPointColor" );
|
||||||
rb_define_alias( globalShapeClass, "set_point_outline_color", "setPointOutlineColor" );
|
rb_define_alias( globalShapeClass, "set_point_outline_color", "setPointOutlineColor" );
|
||||||
rb_define_alias( globalShapeClass, "outlineWidth=", "setOutlineWidth" );
|
rb_define_alias( globalShapeClass, "outlineThickness=", "setOutlineThickness" );
|
||||||
rb_define_alias( globalShapeClass, "outline_width=", "setOutlineWidth" );
|
rb_define_alias( globalShapeClass, "outline_thickness=", "setOutlineThickness" );
|
||||||
rb_define_alias( globalShapeClass, "outlineWidth", "getOutlineWidth" );
|
rb_define_alias( globalShapeClass, "outlineThickness", "getOutlineThickness" );
|
||||||
rb_define_alias( globalShapeClass, "outline_width", "getOutlineWidth" );
|
rb_define_alias( globalShapeClass, "outline_thickness", "getOutlineThickness" );
|
||||||
rb_define_alias( globalShapeClass, "get_point_position", "getPointPosition" );
|
rb_define_alias( globalShapeClass, "get_point_position", "getPointPosition" );
|
||||||
rb_define_alias( globalShapeClass, "get_point_color", "getPointColor" );
|
rb_define_alias( globalShapeClass, "get_point_color", "getPointColor" );
|
||||||
rb_define_alias( globalShapeClass, "get_point_outline_color", "getPointOutlineColor" );
|
rb_define_alias( globalShapeClass, "get_point_outline_color", "getPointOutlineColor" );
|
||||||
|
@ -537,7 +537,7 @@ static VALUE Window_ShowMouseCursor( VALUE self, VALUE aShowFlag )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* call-seq:
|
/* call-seq:
|
||||||
* window.useVerticalSync( enabled )
|
* window.enableVerticalSync( enabled )
|
||||||
*
|
*
|
||||||
* Enable or disable vertical synchronization.
|
* Enable or disable vertical synchronization.
|
||||||
*
|
*
|
||||||
@ -547,17 +547,17 @@ static VALUE Window_ShowMouseCursor( VALUE self, VALUE aShowFlag )
|
|||||||
*
|
*
|
||||||
* Vertical synchronization is disabled by default.
|
* Vertical synchronization is disabled by default.
|
||||||
*/
|
*/
|
||||||
static VALUE Window_UseVerticalSync( VALUE self, VALUE aEnableFlag )
|
static VALUE Window_EnableVerticalSync( VALUE self, VALUE aEnableFlag )
|
||||||
{
|
{
|
||||||
sf::Window *object = NULL;
|
sf::Window *object = NULL;
|
||||||
Data_Get_Struct( self, sf::Window, object );
|
Data_Get_Struct( self, sf::Window, object );
|
||||||
if( aEnableFlag == Qfalse )
|
if( aEnableFlag == Qfalse )
|
||||||
{
|
{
|
||||||
object->UseVerticalSync( false );
|
object->EnableVerticalSync( false );
|
||||||
}
|
}
|
||||||
else if( aEnableFlag == Qtrue )
|
else if( aEnableFlag == Qtrue )
|
||||||
{
|
{
|
||||||
object->UseVerticalSync( true );
|
object->EnableVerticalSync( true );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -708,7 +708,7 @@ void Init_Window( void )
|
|||||||
rb_define_method( globalWindowClass, "setTitle", Window_SetTitle, 1 );
|
rb_define_method( globalWindowClass, "setTitle", Window_SetTitle, 1 );
|
||||||
rb_define_method( globalWindowClass, "show", Window_Show, 1 );
|
rb_define_method( globalWindowClass, "show", Window_Show, 1 );
|
||||||
rb_define_method( globalWindowClass, "showMouseCursor", Window_ShowMouseCursor, 1 );
|
rb_define_method( globalWindowClass, "showMouseCursor", Window_ShowMouseCursor, 1 );
|
||||||
rb_define_method( globalWindowClass, "useVerticalSync", Window_UseVerticalSync, 1 );
|
rb_define_method( globalWindowClass, "enableVerticalSync", Window_EnableVerticalSync, 1 );
|
||||||
rb_define_method( globalWindowClass, "waitEvent", Window_WaitEvent, 0 );
|
rb_define_method( globalWindowClass, "waitEvent", Window_WaitEvent, 0 );
|
||||||
|
|
||||||
// Aliases
|
// Aliases
|
||||||
@ -750,9 +750,10 @@ void Init_Window( void )
|
|||||||
rb_define_alias( globalWindowClass, "show_mouse_cursor", "showMouseCursor" );
|
rb_define_alias( globalWindowClass, "show_mouse_cursor", "showMouseCursor" );
|
||||||
rb_define_alias( globalWindowClass, "show_mouse_cursor=", "showMouseCursor" );
|
rb_define_alias( globalWindowClass, "show_mouse_cursor=", "showMouseCursor" );
|
||||||
|
|
||||||
rb_define_alias( globalWindowClass, "useVerticalSync=", "useVerticalSync" );
|
rb_define_alias( globalWindowClass, "enableVerticalSync=", "enableVerticalSync" );
|
||||||
rb_define_alias( globalWindowClass, "use_vertical_sync", "useVerticalSync" );
|
rb_define_alias( globalWindowClass, "enable_vertical_sync", "enableVerticalSync" );
|
||||||
rb_define_alias( globalWindowClass, "use_vertical_sync=", "useVerticalSync" );
|
rb_define_alias( globalWindowClass, "enable_vertical_sync=", "enableVerticalSync" );
|
||||||
|
rb_define_alias( globalWindowClass, "vertical_sync=", "enableVerticalSync" );
|
||||||
|
|
||||||
rb_define_alias( globalWindowClass, "wait_event", "waitEvent" );
|
rb_define_alias( globalWindowClass, "wait_event", "waitEvent" );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user