Gui

* A gui represents a 2-dimensional view containting graphical user interface elements. * Inheriths Entity class and implements IUpdateable service.

Constructors

this
this(string id)

* Create a new gui using an id and a parent.

Members

Functions

addAction
Gui addAction(string id, void delegate(Widget, Event) action, Tuple!(T, Event)[] objEvList, ubyte priority)

* Add a new action for the current gui using an id, an event, * an array of tuple containing the wanted widget and its event and a priority. * The priority param is optional, its default value is 0. * Returns reference to this so it can be used in a stream.

getAction
Action!Widget getAction(string name)

* Returns an action by given id for user interface elements.

getActionMap
Action!Widget[string] getActionMap()

* Returns the action map for user interface elements.

getProjectionMatrix
Matrix4F getProjectionMatrix()

* Returns the projection matrix.

getRootCanvas
Canvas getRootCanvas()

*

isFixedProjectionEnabled
bool isFixedProjectionEnabled()

* Returns true if fixed projection is enabled.

removeAction
Gui removeAction(string id)

* Remove an user interface action from the memory. * Returns reference to this so it can be used in a stream.

setFixedProjectionEnabled
typeof(this) setFixedProjectionEnabled(bool enabled)

* Keep window aspect ratio the same. * Returns reference to this so it can be used in a stream.

simulateAction
Gui simulateAction(string id, Widget sender, Event e)

* Simulate an action by starting it right now. * Returns reference to this so it can be used in a stream.

update
void update()

*

Inherited Members

From Entity

transform
Transform transform;
id
string id;
scene
Scene scene;
visibility
Visibility visibility;
model
Model model;
addComponent
typeof(this) addComponent(T component)
removeComponent
typeof(this) removeComponent(ComponentType type)
component
T component()
start
void start()

Called after all scene entitys instantiation. It is optional.

update
void update()

Called every frame to update the current state of the scene entity. It is optional.

Meta