module

SF

Constants

SFML_VERSION = "2.5.1"
VERSION = "2.5.3"

Instance methods

color(*args, **kwargs)

Shorthand for Color.new

Source
float_rect(left : Number, top : Number, width : Number, height : Number)

Shorthand for FloatRect.new

Converts arguments to Float32

Source
int_rect(left : Int, top : Int, width : Int, height : Int)

Shorthand for IntRect.new

Converts arguments to Int32

Source
microseconds(amount : Int) : Time

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

Source
milliseconds(amount : Int) : Time

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

Source
seconds(amount : Number) : Time

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

Source
sleep(duration : Time)

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
Source
vector2(x, y)

Shorthand for Vector2.new

If arguments are mixed between Int32 and Float, they are converted to match Vector2f

Source
vector2f(x : Number, y : Number)

Shorthand for Vector2f.new

Converts arguments to Float32

Source
vector2i(x : Int, y : Int)

Shorthand for Vector2i.new

Converts arguments to Int32

Source
vector2u(x : Int, y : Int)

Shorthand for Vector2u.new

Converts arguments to UInt32

Source
vector3(x, y, z)

Shorthand for Vector3.new

Source
vector3f(x : Number, y : Number, z : Number)

Shorthand for Vector3f.new

Converts arguments to Float32

Source

Nested types