Attributes
Members list
Type members
Classlikes
Status of an item.
Status of an item.
Value parameters
- active
-
if the mouse clicked the item (and is still pressed down). This value stays true for one extra frame, so that it's possible to trigger an action on mouse up (see
clicked
). - clicked
-
if the mouse clicked this element and was just released.
- hot
-
if the mouse is on top of the item
- selected
-
if this was the last element clicked
Attributes
- Supertypes
Value members
Concrete methods
Checks the status of a component from the previous UI computation without registering it.
Checks the status of a component from the previous UI computation without registering it.
This method can be used if one needs to check the status of an item in the previous iteration without registering it.
Value parameters
- id
-
Item ID to register
Attributes
- Returns
-
the item status of the component.
Checks the status of a component at the current point in the UI computation without registering it.
Checks the status of a component at the current point in the UI computation without registering it.
This method can be used if one needs to check the status of an item in the middle of the current iteration.
This is can return inconsistent state, and is only recommended for unit tests or debugging.
Value parameters
- id
-
Item ID to register
Attributes
- Returns
-
the item status of the component.
Registers an item on the UI state, taking a certain area.
Registers an item on the UI state, taking a certain area.
Components register themselves on every frame to update and check their status.
This is only required when creating new components. If you are using the premade components you do not need to call this.
Also of note is that this method returns the status from computed in the previous iteration, as that's the only consistent information. If you need the status as it's being computed, check getScratchItemStatus.
Value parameters
- area
-
the area of this component
- id
-
Item ID to register
- passive
-
passive items are items such as windows that are never marked as active, they are just registered to block components under them.
Attributes
- Returns
-
the item status of the registered component.
Applies the operations in a code block at a specified z-index (higher z-indices show on front of lower z-indices).
Applies the operations in a code block at a specified z-index (higher z-indices show on front of lower z-indices).