mirror of
https://github.com/SFML/SFML.git
synced 2024-11-29 06:41:05 +08:00
Changed Window so where ever it uses SFML::Vector2 to access it's elements I use the helper functions.
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1674 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
8335502866
commit
4b8ae2b817
@ -323,8 +323,8 @@ static VALUE Window_SetCursorPosition2( VALUE self, VALUE anArgument )
|
|||||||
VALUE argument = Vector2_ForceType( anArgument );
|
VALUE argument = Vector2_ForceType( anArgument );
|
||||||
sf::Window *object = NULL;
|
sf::Window *object = NULL;
|
||||||
Data_Get_Struct( self, sf::Window, object );
|
Data_Get_Struct( self, sf::Window, object );
|
||||||
VALUE argumentX = rb_funcall( argument, rb_intern( "x" ), 0 );
|
VALUE argumentX = Vector2_GetX( argument );
|
||||||
VALUE argumentY = rb_funcall( argument, rb_intern( "y" ), 0 );
|
VALUE argumentY = Vector2_GetY( argument );
|
||||||
object->SetCursorPosition( FIX2UINT( argumentX ), FIX2UINT( argumentY ) );
|
object->SetCursorPosition( FIX2UINT( argumentX ), FIX2UINT( argumentY ) );
|
||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
@ -431,8 +431,8 @@ static VALUE Window_SetPosition2( VALUE self, VALUE anArgument )
|
|||||||
VALUE argument = Vector2_ForceType( anArgument );
|
VALUE argument = Vector2_ForceType( anArgument );
|
||||||
sf::Window *object = NULL;
|
sf::Window *object = NULL;
|
||||||
Data_Get_Struct( self, sf::Window, object );
|
Data_Get_Struct( self, sf::Window, object );
|
||||||
VALUE argumentX = rb_funcall( argument, rb_intern( "x" ), 0 );
|
VALUE argumentX = Vector2_GetX( argument );
|
||||||
VALUE argumentY = rb_funcall( argument, rb_intern( "y" ), 0 );
|
VALUE argumentY = Vector2_GetY( argument );
|
||||||
object->SetPosition( FIX2UINT( argumentX ), FIX2INT( argumentY ) );
|
object->SetPosition( FIX2UINT( argumentX ), FIX2INT( argumentY ) );
|
||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
@ -460,8 +460,8 @@ static VALUE Window_SetSize2( VALUE self, VALUE anArgument )
|
|||||||
VALUE argument = Vector2_ForceType( anArgument );
|
VALUE argument = Vector2_ForceType( anArgument );
|
||||||
sf::Window *object = NULL;
|
sf::Window *object = NULL;
|
||||||
Data_Get_Struct( self, sf::Window, object );
|
Data_Get_Struct( self, sf::Window, object );
|
||||||
VALUE argumentX = rb_funcall( argument, rb_intern( "x" ), 0 );
|
VALUE argumentX = Vector2_GetX( argument );
|
||||||
VALUE argumentY = rb_funcall( argument, rb_intern( "y" ), 0 );
|
VALUE argumentY = Vector2_GetY( argument );
|
||||||
object->SetSize( FIX2UINT( argumentX ), FIX2UINT( argumentY ) );
|
object->SetSize( FIX2UINT( argumentX ), FIX2UINT( argumentY ) );
|
||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user