Windows
Functions
Clear Window
clears a window to the specified color given in clr
Parameters
Name | Type | Description |
---|---|---|
wind | Window | the Window to clear |
clr | Color | the Color to clear the window to. |
Signatures
Close All Windows
Releases all of the windows which have been loaded.
Signatures
Close Current Window
Closes and frees the current window.
Signatures
Close Window
Close Window
Closes and frees the graphics window identified by name
.
Parameters
Name | Type | Description |
---|---|---|
name | String | The name (caption) of the window to close |
Signatures
Close Window
Closes and frees the graphics window supplied in wind
.
Parameters
Name | Type | Description |
---|---|---|
wind | Window | The window to close |
Signatures
Current Window
Returns the window that you are currently interacting with. This will be the default window for drawing options, and events.
Return Type - Window
Signatures
Current Window Has Border
Indicate if the current window has a border.
Return Type - Boolean
Signatures
Current Window Height
Returns the height of the current window.
Return Type - Integer
Signatures
Current Window Is Fullscreen
Is the current window currently fullscreen?
Return Type - Boolean
Signatures
Current Window Position
The location of the current window.
Return Type - Point 2d
Signatures
Current Window Toggle Border
Toggle the current window border.
Signatures
Current Window Toggle Fullscreen
Toggle the fullscreen property of the current window
Signatures
Current Window Width
Returns the width of the current window.
Return Type - Integer
Signatures
Current Window X
The x location of the current window on the displays.
Return Type - Integer
Signatures
Current Window Y
The y location of the current window on the displays.
Return Type - Integer
Signatures
Has Window
Determines if SplashKit has a window loaded with the supplied name.
This checks against all windows loaded, those loaded without a name
are assigned the filename as a default. If this returns false
, you may
want to use load_window
to load in a specific window and give
it the desired name.
Parameters
Name | Type | Description |
---|---|---|
caption | String | The name of the window to check for. |
Return Type - Boolean
Signatures
Is Current Window
Check if the requested window is the current window.
Parameters
Name | Type | Description |
---|---|---|
wind | Window | The window to check |
Return Type - Boolean
Signatures
Move Current Window To
Move the current window to the new location on the displays.
Parameters
Name | Type | Description |
---|---|---|
x | Integer | The new x location |
y | Integer | The new y location |
Signatures
Move Window To
Move Window To
Move the window to the new location on the displays.
Parameters
Name | Type | Description |
---|---|---|
name | String | The name of the window to move |
x | Integer | The new x location |
y | Integer | The new y location |
Signatures
Move Window To
Move the window to the new location on the displays.
Parameters
Name | Type | Description |
---|---|---|
wind | Window | the window to move. |
x | Integer | The new x location |
y | Integer | The new y location |
Signatures
Open Window
Opens a new graphics window. The supplied caption
is used to
name and identify the window. The supplied width
and height
indicate
the size of the window. The window can be retrieved by passing caption
to the Window Named
function.
Parameters
Name | Type | Description |
---|---|---|
caption | String | The title of the window. If a window with this caption |
already exists, SplashKit will alter the caption to | ||
ensure that it is unique. | ||
width | Integer | The width of the window |
height | Integer | The height of the window |
Return Type - Window
Signatures
Refresh Window
Refresh Window
Refreshes the window wind
.
Parameters
Name | Type | Description |
---|---|---|
wind | Window | the Window to refresh. |
Signatures
Refresh Window
Refreshes the window wind
.
Parameters
Name | Type | Description |
---|---|---|
wind | Window | the Window to refresh. |
target_fps | unsigned int | the desired framerate |
Signatures
Resize Current Window
Change the size of the current window.
Parameters
Name | Type | Description |
---|---|---|
width | Integer | Its new width |
height | Integer | Its new height |
Signatures
Resize Window
Change the size of the window.
Parameters
Name | Type | Description |
---|---|---|
wnd | Window | The window to change. |
width | Integer | Its new width |
height | Integer | Its new height |
Signatures
Set Current Window
Set Current Window
Set the current window to the window with the supplied caption.
Parameters
Name | Type | Description |
---|---|---|
name | String | The caption of the new current window. |
Signatures
Set Current Window
Change the current window. Use this so that you can draw to different windows by default.
Parameters
Name | Type | Description |
---|---|---|
wind | Window | The new current window |
Signatures
Window Caption
The caption of the window.
Parameters
Name | Type | Description |
---|---|---|
wind | Window | The window |
Return Type - String
Signatures
Window Close Requested
Window Close Requested
Checks all opened windows in the current program
to determin if a window with the name name
is
currently open, and will close a window if one is found.
Parameters
Name | Type | Description |
---|---|---|
name | String | The name of the window to close |
Return Type - Boolean
Signatures
Window Close Requested
Closes the window given in wind
Parameters
Name | Type | Description |
---|---|---|
wind | Window | the Window to be closed |
Return Type - Boolean
Signatures
Window Has Border
Window Has Border
Indicate if the window has a border.
Parameters
Name | Type | Description |
---|---|---|
name | String | The name of the window |
Return Type - Boolean
Signatures
Window Has Border
Indicate if the window has a border.
Parameters
Name | Type | Description |
---|---|---|
wnd | Window | The window |
Return Type - Boolean
Signatures
Window Has Focus
Indicates if the window has focus.
Parameters
Name | Type | Description |
---|---|---|
wind | Window | The window |
Return Type - Boolean
Signatures
Window Height
Window Height
Returns the height of the window with the indicated name in pixels.
Parameters
Name | Type | Description |
---|---|---|
name | String | The name of the window |
Return Type - Integer
Signatures
Window Height
Returns the height of the window in pixels.
Parameters
Name | Type | Description |
---|---|---|
wind | Window | The window |
Return Type - Integer
Signatures
Window Is Fullscreen
Window Is Fullscreen
Is the window currently fullscreen?
Parameters
Name | Type | Description |
---|---|---|
name | String | The name of the window to check |
Return Type - Boolean
Signatures
Window Is Fullscreen
Is the window currently fullscreen?
Parameters
Name | Type | Description |
---|---|---|
wnd | Window | The window to check |
Return Type - Boolean
Signatures
Window Named
Returns an opened Window
with the given name caption
, if a window with
name caption
is found.
Parameters
Name | Type | Description |
---|---|---|
caption | String | the String name of the window. |
Return Type - Window
Signatures
Window Position
Window Position
The location of the window.
Parameters
Name | Type | Description |
---|---|---|
name | String | The name of the window. |
Return Type - Point 2d
Signatures
Window Position
The location of the window.
Parameters
Name | Type | Description |
---|---|---|
wnd | Window | The window. |
Return Type - Point 2d
Signatures
Window Set Icon
Sets the icon of the current window.
Parameters
Name | Type | Description |
---|---|---|
wind | Window | The window to change the icon of |
bmp | Bitmap | The image with the details to show in the icon |
Signatures
Window Toggle Border
Window Toggle Border
Toggle the window border.
Parameters
Name | Type | Description |
---|---|---|
name | String | The name of the window to change |
Signatures
Window Toggle Border
Toggle the window border.
Parameters
Name | Type | Description |
---|---|---|
wnd | Window | The window to change |
Signatures
Window Toggle Fullscreen
Window Toggle Fullscreen
Toggle the fullscreen property of the window
Parameters
Name | Type | Description |
---|---|---|
name | String | The name of the window to change |
Signatures
Window Toggle Fullscreen
Toggle the fullscreen property of the window
Parameters
Name | Type | Description |
---|---|---|
wnd | Window | The window to change |
Signatures
Window Width
Window Width
Returns the width of the window with the indicated name in pixels.
Parameters
Name | Type | Description |
---|---|---|
name | String | The name of the window |
Return Type - Integer
Signatures
Window Width
Returns the width of the window in pixels.
Parameters
Name | Type | Description |
---|---|---|
wind | Window | The window |
Return Type - Integer
Signatures
Window With Focus
Returns the window that the user currently has selected. This may be different to the current window.
Return Type - Window
Signatures
Window X
Window X
The x location of the window on the displays.
Parameters
Name | Type | Description |
---|---|---|
name | String | The name of the window |
Return Type - Integer
Signatures
Window X
The x location of the window on the displays.
Parameters
Name | Type | Description |
---|---|---|
wnd | Window | The window |
Return Type - Integer
Signatures
Window Y
Window Y
The y location of the window on the displays.
Parameters
Name | Type | Description |
---|---|---|
name | String | The name of the window |
Return Type - Integer
Signatures
Window Y
The y location of the window on the displays.
Parameters
Name | Type | Description |
---|---|---|
wnd | Window | The window |
Return Type - Integer
Signatures
Types
Window
The Window type is used to refer to a window that you have opened
in SplashKit. You create new Windows using Open Window
and they can
be closed using Close Window
.
-
opened with
Open Window
-
and must be released using
Close Window
(to close a specific window) ordelete_all_windows
(to close all loaded windows).
The Window type is used to refer to a window that you have opened
in SplashKit. You create new Windows using Open Window
and they can
be closed using Close Window
.
-
opened with
Open Window
-
and must be released using
Close Window
(to close a specific window) ordelete_all_windows
(to close all loaded windows).