poison.ui.window
Source
Module for window handling.
Authors:
Jacob Jensen
License:
https://github.com/PoisonEngine/poison-ui/blob/master/LICENSE
Imports
dsfmlWindow = dsfml.window
dsfml.window : Event, Keyboard, Mouse
poison.core : Point, Size, ActionArgs, KeyEventArgs, MouseEventArgs, TextEventArgs, executeUI
poison.ui.container
poison.ui.component
dsfml.system : Vector2i
public:
public this(string name, dstring title, Size size, size_t layers = 1);
Creates a new window.
Parameters:
name The name of the window.
title The title of the window.
size The size of the window.
layers The layers of the window. (Defaults to 1)
public @property dstring title();
Gets the title of the window.
public @property void title(dstring newTitle);
Sets the title of the window.
public @property bool isOpen();
Gets a boolean determining whether the window is open or not.
public @property override Window parentWindow();
Gets the parent window.
Returns:
Always returns "this" where "this" is the window itself.
public @property override void hidden(bool isHidden);
Gets or sets a boolean determining whether the window is hidden or not.
public @property uint fps();
Gets the fps of the window.
public @property void fps(uint newFps);
Sets the fps of the window.
public @property bool cursorVisible();
Gets a boolean determining whether the cursor is visible or not.
public @property void cursorVisible(bool isCursorVisible);
Sets a boolean determining whether the cursor is visible or not.
public override void show();
Shows the window.
public void close();
Closes the window.
public void sendKeyInput(Keyboard.Key key);
Sends a key input through memory.
Parameters:
key The key to send an input of.
public void sendMouseInput(Mouse.Button button, Point position);
Sends a mouse input through memory.
Parameters:
button The button to send an input of.
position The position of the mouse input.
Note:
This doesn't change the position of the cursor. Use Window.changeCursorPosition() instead.
public void changeCursorPosition(Point position);
Changes the cursor position.
Parameters:
position The position to set the cursor at.
Note:
For virtual mouse presses do not use this. Use Window.sendMouseInput() instead.
Generated by venom - Poison Engine's Documentation Generator
Module for window handling.
Authors:
Jacob JensenLicense:
https://github.com/PoisonEngine/poison-ui/blob/master/LICENSEImports
dsfmlWindow = dsfml.windowdsfml.window : Event, Keyboard, Mouse
poison.core : Point, Size, ActionArgs, KeyEventArgs, MouseEventArgs, TextEventArgs, executeUI
poison.ui.container
poison.ui.component
dsfml.system : Vector2i
public this(string name, dstring title, Size size, size_t layers = 1);
Creates a new window.
Parameters:
name | The name of the window. |
title | The title of the window. |
size | The size of the window. |
layers | The layers of the window. (Defaults to 1) |
public @property dstring title();
Gets the title of the window.
public @property void title(dstring newTitle);
Sets the title of the window.
public @property bool isOpen();
Gets a boolean determining whether the window is open or not.
public @property override Window parentWindow();
Gets the parent window.
Returns:
Always returns "this" where "this" is the window itself.public @property override void hidden(bool isHidden);
Gets or sets a boolean determining whether the window is hidden or not.
public @property uint fps();
Gets the fps of the window.
public @property void fps(uint newFps);
Sets the fps of the window.
public @property bool cursorVisible();
Gets a boolean determining whether the cursor is visible or not.
public @property void cursorVisible(bool isCursorVisible);
Sets a boolean determining whether the cursor is visible or not.
public override void show();
Shows the window.
public void close();
Closes the window.
public void sendKeyInput(Keyboard.Key key);
Sends a key input through memory.
Parameters:
key | The key to send an input of. |
public void sendMouseInput(Mouse.Button button, Point position);
Sends a mouse input through memory.
Parameters:
button | The button to send an input of. |
position | The position of the mouse input. |
Note:
This doesn't change the position of the cursor. Use Window.changeCursorPosition() instead.public void changeCursorPosition(Point position);
Changes the cursor position.
Parameters:
position | The position to set the cursor at. |