Custom Element
The Custom Element lets you embed your own code-driven UI components directly into a QSApp layout. It acts as a bridge between the visual UI Editor and your custom logic. It's perfect for specialized controls or complex interactions that go beyond the built-in Element types.
Enterprise Plan Only
Custom Elements require a QSApp Enterprise license. Contact us at sales@quicksave.fi to get a quote.
When to Use a Custom Element
- Complex interactivity
You need multi-step animations, physics, or gesture handling that the standard elements can’t provide. - Performance tuning
Hand-craft rendering for large datasets or real-time visuals where you need fine-grained control. - Gameplay logic
Custom elements are vital to creating complex gameplay logic.
Custom Element Properties
Property | Type | Details |
---|---|---|
Name | text | Name of the element. Make sure the name of the element is unique if the element needs to be accessible from code (Enterprise Plan only). |
Type | text | Type for the custom class. Custom classes can be registered to the UI system and be used to position all sorts of game elements. |
Anchor | .% | Used to position the anchor point of the element (x: 0, y: 0 = top/left, x: 1, y: 1 = bottom/right) |
Parent Align | .% | Position of the element relative to its parent’s position. (x: 0, y: 0 = top/left, x: 1, y: 1 = bottom/right) |
Parent Size | .% | Use to resize the element relative to its parent's size (x: 1, y: 1 = match parent size, x: 0.5, y: 0.5 = half of parent size, x: 0, y: 0 = disables parent relative sizing). |
Size | px | Explicitly set pixel size (logical screen units). |
Offset | px | Additional pixel offset from the element's position. |
Parameters
Property | Type | Details |
---|---|---|
Name | text | Name of the parameter which can be accessed from code. |
Data type | Dropdown | Data type of the parameter (string, number, boolean, or object.) |
Transform Properties
Transform properties affect the Element, as well as any child elements nested within the Element.
Property | Type | Notes |
---|---|---|
Pivot | .% | Pivot point for any transformations applied to the element. (x: 0, y: 0 = top/left, x: 0.5, y: 0.5 = center, x: 1, y: 1 = bottom/right). |
Angle | Degrees | Rotate the element around its Pivot point. |
Skew | Degrees | Skew along X/Y axes around the Pivot point. |
Scale | .% | Percentage scale of the element. Setting this value to x: 2, y: 2 scales the element twice as large. |
Alpha | .% | Transparency applied to the element. The default value 1 displays the element fully opaque, while 0.5 would make the element semi-transparent. Setting the value to 0 makes the element completely disappear. |
Modifiers
Modifiers are vital to creating different visual states for your elements in the UI Editor. They allow you to set up visual state changes and transitions using various properties such as size, position, alpha, etc.
Sounds
Sounds are very similar to Modifiers, but instead of creating visual effects, they create sound effects which can be triggered using Events.
Triggers
Triggers allow you to add interactivity to your QSApp by enabling the ability to trigger modifiers and events when the trigger is activated. You can add triggers for actions like clicking, hovering, and dragging elements.