Finished the Graphics Module. Gonna go trough all files again now and add the rdoc comments where I've left it out.
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1699 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
dbd8795df8
commit
bc24802219
6 changed files with 640 additions and 1 deletions
|
@ -10,6 +10,12 @@ input = app.input
|
|||
|
||||
shape = SFML::Shape.rectangle( [-10, -10, 20, 20], SFML::Color::White )
|
||||
|
||||
image = SFML::Image.new
|
||||
image.create( 100, 100, [255, 0, 0] )
|
||||
sprite = SFML::Sprite.new( image, [500, 500] )
|
||||
|
||||
text = SFML::Text.new( "This is a test!" )
|
||||
|
||||
while app.open?
|
||||
while event = app.get_event
|
||||
if event.type == SFML::Event::Closed
|
||||
|
@ -20,5 +26,7 @@ while app.open?
|
|||
app.clear
|
||||
shape.position = [input.mouseX, input.mouseY]
|
||||
app.draw shape
|
||||
app.draw sprite
|
||||
app.draw text
|
||||
app.display
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue