module SF
Extended Modules
Defined in:
audio/audio.craudio/obj.cr
common.cr
graphics/graphics.cr:1
graphics/graphics.cr:133
graphics/obj.cr
network/network.cr
network/obj.cr
system/obj.cr
system/system.cr
version.cr
window/obj.cr
window/window.cr:3
window/window.cr:10
Constant Summary
- 
        SFML_VERSION = "2.5.1"
- 
        VERSION = "2.5.2"
Instance Method Summary
- 
        #color(*args, **kwargs)
        
          Shorthand for Color.new
- 
        #float_rect(left : Number, top : Number, width : Number, height : Number)
        
          Shorthand for FloatRect.new
- 
        #int_rect(left : Int, top : Int, width : Int, height : Int)
        
          Shorthand for IntRect.new
- 
        #microseconds(amount : Int) : Time
        
          Construct a time value from a number of microseconds 
- 
        #milliseconds(amount : Int) : Time
        
          Construct a time value from a number of milliseconds 
- 
        #seconds(amount : Number) : Time
        
          Construct a time value from a number of seconds 
- 
        #sleep(duration : Time)
        
          Make the current thread sleep for a given duration 
- 
        #vector2(x, y)
        
          Shorthand for Vector2.new
- 
        #vector2f(x : Number, y : Number)
        
          Shorthand for Vector2f.new
- 
        #vector2i(x : Int, y : Int)
        
          Shorthand for Vector2i.new
- 
        #vector3(x, y, z)
        
          Shorthand for Vector3.new
- 
        #vector3f(x : Number, y : Number, z : Number)
        
          Shorthand for Vector3f.new
Instance Method Detail
Shorthand for FloatRect.new
Converts arguments to Float32
Shorthand for IntRect.new
Converts arguments to Int32
Construct a time value from a number of microseconds
- amount - Number of microseconds
Returns: Time value constructed from the amount of microseconds
See also: #seconds, #milliseconds
Construct a time value from a number of milliseconds
- amount - Number of milliseconds
Returns: Time value constructed from the amount of milliseconds
See also: #seconds, #microseconds
Construct a time value from a number of seconds
- amount - Number of seconds
Returns: Time value constructed from the amount of seconds
See also: #milliseconds, #microseconds
Make the current thread sleep for a given duration
SF::sleep is the best way to block a program or one of its
threads, as it doesn't consume any CPU power.
- duration - Time to sleep
Shorthand for Vector2.new
If arguments are mixed between Int32 and Float,
they are converted to match Vector2f
Shorthand for Vector3f.new
Converts arguments to Float32