Drawing scale of UiElement
Dispose object, ceasing its operation while keeping the object intact until call of 'restore'.
Object itself for fluent interface
Get dragging mode of object. Defines how the object can be dragged by mouse.
Object itself
Current fill style object
Highlight FillStyle of the object
True for highlighted state of object and false for basic
Get boolean flag for whether object is currently under mouse or not
Boolean for is object under mouse currently
Get margin around object in pixels.
Margin datastructure
Mouse interactions state
Get mouse style.
Interface for defining how mouse should look when hovering over UI object
Get the position origin of this UiElement. Affects how the "position" of UIElement is interpreted.
Vec2 with each plane in range [-1, 1], where 0 is middle
Utility method for getting the pixel-size of the UiElements scale. NOTE: This will return the ABSOLUTE pixel size, meaning that the individual values are always positive, even with inverted axes.
Returns the position of this UiElement at given location relative to elements size.
Relative position vector (-1 to 1 which specifies position of origin, 0 is center of the object)
Parameter to disregard parts of object when calculating the asked position. Defaults to Margin, which includes everything. Should only ever be necessary for other UiElements
Object itself for fluent itself
Returns the size of the UiElements in pixels including any Margins or Paddings
Parameter to disregard parts of object when calculating the position. Defaults to Margin, which includes everything. Should only ever be necessary for sub-classes
Object size in pixels
Current stroke style object
Object stroke thickness
Return the current state of Disposable object.
True if object is disposed, false if not.
Unsubscribe from Highlight object event. This is called whenever an object is highlighted
Token that was received when subscribing to the event.
True if the unsubscription was successful.
Remove event listener from Mouse Click Event
Token of event listener which has to be removed
True if the listener is successfully removed and false if it is not found
Remove event listener from Mouse Double Click Event
Token of event listener which has to be removed
True if the listener is successfully removed and false if it is not found
Remove event listener from Mouse Down Event
Token of event listener which has to be removed
True if the listener is successfully removed and false if it is not found
Remove event listener from Mouse Drag Event
Token of event listener which has to be removed
True if the listener is successfully removed and false if it is not found
Remove event listener from Mouse Drag Start Event
Token of event listener which has to be removed
True if the listener is successfully removed and false if it is not found
Remove event listener from Mouse Drag Stop Event
Token of event listener which has to be removed
True if the listener is successfully removed and false if it is not found
Remove event listener from Mouse Enter Event
Token of event listener which has to be removed
True if the listener is successfully removed and false if it is not found
Remove event listener from Mouse Leave Event
Token of event listener which has to be removed
True if the listener is successfully removed and false if it is not found
Remove event listener from Mouse Move Event
Token of event listener which has to be removed
True if the listener is successfully removed and false if it is not found
Remove event listener from Mouse Up Event
Token of event listener which has to be removed
True if the listener is successfully removed and false if it is not found
Remove event listener from Mouse Wheel Event
Token of event listener which has to be removed
True if the listener is successfully removed and false if it is not found
Remove event listener from Touch End Event
Token of event listener which has to be removed
True if the listener is successfully removed and false if it is not found
Remove event listener from Touch Move Event
Token of event listener which has to be removed
True if the listener is successfully removed and false if it is not found
Remove event listener from Touch Start Event
Token of event listener which has to be removed
True if the listener is successfully removed and false if it is not found
Subscribe to highlight object event. This is called whenever an object is highlighted.
Function that is called when event is triggered.
Token that can be used to unsubscribe from the event.
Subscribe to Mouse Click event
Function that will be called when mouse clicks the bounds of UiObject.
Token-object that is a reference ID to the listener created.
Subscribe to Mouse Double Click event
Subscribe to Mouse Down event
Subscribe to Mouse Drag event
Subscribe to Mouse Drag Start event
Subscribe to Mouse Drag Stop event
Subscribe to Mouse Enter event
Function that will be called when mouse enters the bounds of UiObject.
Token-object that is a reference ID to the listener created.
Subscribe to Mouse Leave event
Function that will be called when mouse leaves the bounds of UiObject.
Token-object that is a reference ID to the listener created.
Subscribe to Mouse Move event
Event handler function
Token of subscription
Subscribe to Mouse Up event
Subscribe to Mouse Wheel event
Event handler function
Token of subscription
Subscribe to Touch End event
Event handler function
Token of subscription
Subscribe to Touch Move event
Event handler function
Token of subscription
Subscribe to Touch Start event
Event handler function
Token of subscription
Restore object if it was previously disposed.
Object itself itself for fluent interface
Set dragging mode of object. Defines how the object can be dragged by mouse.
See UIDraggingModescollection for options.
DraggingMode or undefined to disable dragging
Object itself
Set fill style object
Object itself for fluent interface
Set highlight fill style of object filling
Object itself for fluent interface
Set highlighted state of the Object
Object itself for fluent interface
Set margin around object in pixels.
Number with pixel margins for all sides or datastructure with individual pixel margins for each side. Any side can be omitted, only passed values will be overridden.
Object itself
Set mouse interactions enabled or disabled
Specifies state of mouse interactions
Object itself for fluent interface
Set mouse style when hovering over UI object.
Interface for defining how mouse should look when hovering over UI object
Object itself
Sets the position of this UiElement relative to its origin.
NOTE: UIElements scale can't be changed apart from when it is created.
Location on the UIElements scale, where its origin should be positioned
Object itself
Set stroke style object
Object itself for fluent interface
Set stroke thickness in pixels
Icon itself for fluent interface
Empty background.
Indicates that the Background can't and shouldn't be styled as it won't be rendered.