Nothing major, just some changes here and there.
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1722 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
0446d03a03
commit
7e42a2b505
@ -59,13 +59,15 @@ static VALUE Text_Initialize( int argc, VALUE *args, VALUE self )
|
||||
{
|
||||
case 3:
|
||||
characterSize = FIX2UINT( args[2] );
|
||||
object->SetCharacterSize( characterSize );
|
||||
case 2:
|
||||
VALIDATE_CLASS( args[1], globalFontClass, "font" );
|
||||
Data_Get_Struct( args[1], sf::Font, font );
|
||||
rb_iv_set( self, "@__font_ref", args[1] );
|
||||
object->SetFont( *font );
|
||||
case 1:
|
||||
string = rb_string_value_cstr( &args[0] );
|
||||
*object = sf::Text( string, *font, characterSize );
|
||||
object->SetString( string );
|
||||
case 0:
|
||||
break;
|
||||
default:
|
||||
|
@ -91,7 +91,7 @@ static VALUE Window_Create( int argc, VALUE *args, VALUE self )
|
||||
VALIDATE_CLASS( args[1], rb_cString, "second" );
|
||||
VALIDATE_CLASS( args[2], rb_cFixnum, "third" );
|
||||
Data_Get_Struct( arg0, sf::VideoMode, mode );
|
||||
object->Create( *mode, rb_string_value_cstr( &args[1] ), FIX2UINT( args[2] ) );
|
||||
object->Create( *mode, rb_string_value_cstr( &args[1] ), FIX2INT( args[2] ) );
|
||||
break;
|
||||
case 4:
|
||||
arg0 = VideoMode_ForceType( args[0] );
|
||||
@ -101,7 +101,7 @@ static VALUE Window_Create( int argc, VALUE *args, VALUE self )
|
||||
VALIDATE_CLASS( args[3], globalContextSettingsClass, "fourth" );
|
||||
Data_Get_Struct( arg0, sf::VideoMode, mode );
|
||||
Data_Get_Struct( args[3], sf::ContextSettings, settings );
|
||||
object->Create( *mode, rb_string_value_cstr( &args[1] ), FIX2UINT( args[2] ), *settings );
|
||||
object->Create( *mode, rb_string_value_cstr( &args[1] ), FIX2INT( args[2] ), *settings );
|
||||
break;
|
||||
default:
|
||||
rb_raise( rb_eArgError, "Expected 2..4 arguments but was given %d", argc );
|
||||
|
@ -15,6 +15,7 @@ image.create( 100, 100, [255, 0, 0] )
|
||||
sprite = SFML::Sprite.new( image, [500, 500] )
|
||||
|
||||
text = SFML::Text.new( "This is a test!" )
|
||||
text.position = [ 20, 20 ]
|
||||
|
||||
while app.open?
|
||||
while event = app.get_event
|
||||
|
Loading…
Reference in New Issue
Block a user