class
Crame::Window
- Crame::Window
- Reference
- Object
Overview
A Window is where anything happening in the game will be drawn on.
When creating an instance of your Game, a window is created automatically and is used
as a main window.
NOTE Currently, creating new windows alongside the main one is not supported.
Defined in:
crame/window.crConstructors
Instance Method Summary
-
#always_on_top : Bool
Returns
trueif the window can be put on top of others,falseotherwise. -
#always_on_top=(always_on_top : Bool)
Adds/Removes a flag on the window so that it can be put on top of others.
-
#borderless : Bool
Returns
trueif the window is a borderless window,falseotherwise. -
#borderless=(borderless : Bool)
Adds/Removes a flag on the window to make it borderless.
- #finalize
-
#fullscreen : Bool
Returns
trueif the window is a fullscreen window,falseotherwise. -
#fullscreen=(fullscreen : Bool)
Adds/Removes a flag on the window to make it a fullscreen window.
-
#icon=(path : String | Path)
Adds a new icon for the window.
-
#position : Vector2
Returns the position of the window.
-
#position=(position : Vector2)
Affects a new position for the window.
-
#resizable : Bool
Returns
trueif the window is resizable,falseotherwise. -
#resizable=(resizable : Bool)
Adds/Removes a flag on the window to make it resizable.
-
#size : Vector2
Returns the size of the window.
-
#size=(size : Vector2)
Affects a new size for the window.
-
#title : String
Return the title of the window.
-
#title=(title : String)
Sets a new title for the window.
- #to_unsafe : Pointer(Void)
Constructor Detail
Instance Method Detail
Returns true if the window can be put on top of others, false otherwise.
NOTE On Wayland, this method always returns false.
Adds/Removes a flag on the window so that it can be put on top of others.
NOTE On Wayland, this method is a no-op.
Adds/Removes a flag on the window to make it a fullscreen window.
NOTE Currently, only exclusive fullscreen is supported.
Adds a new icon for the window.
NOTE On Wayland, this can work only if you have support for the
xdg-toplevel-icon-v1 protocol. Otherwise you'll have to create a
.desktop file for the game, and affects the icon path here.
Affects a new position for the window.
NOTE On Wayland, this method is a no-op.