UIData
@interface UIData
Package: dev.joid.lib.ui.core.data · Module: core · Source: UIData.java
Annotation that configures how a UI is drawn, receives the input and closes.
Description
Section titled “Description”Put it on a UI class; a subclass inherits it unless it declares its own.
JOID reads it into a UIDataObject, returned by UI.getData, whose setters change the options while the UI runs.
Learn more
Section titled “Learn more”Elements
Section titled “Elements”| Type | Element | Default | Summary |
|---|---|---|---|
boolean | active | true | If false, the UI is drawn but receives no input, and the UIs below it receive the input instead. |
boolean | visible | true | If false, the UI is neither drawn nor sent any input, and closing it skips its closing transition. |
boolean | closeable | true | If false, Escape leaves the UI open; JOID.close still closes it. |
boolean | zoomable | true | If false, the zoom keys of dev mode (Ctrl or Alt with + and -, and Alt with the wheel) leave the zoom of the UI unchanged. |
boolean | projection | true | If true, the UI sets its own projection over the window; if false, it draws inside the projection that the host has set. |
boolean | background | false | If true, the UI draws the UI backdrop over the whole window, behind its nodes, in backgroundColor; the backdrop fades with the transition of the UI. |
String | backgroundColor | "#101010C0" | Color of the UI backdrop, as a hexadecimal string #RRGGBB or #RRGGBBAA. |
int | zindex | 0 | Order of the UI inside its group of the stack of its bridge (overlays below the screens, screens and popups, overlays above them): a higher value is drawn above and receives the input first. |
double | zlevel | 0D | Depth, along the Z axis, added before the UI is drawn, in the units of the projection of the host. |
Align | anchorX | Align.CENTER | Side of the window that the canvas is pinned to when the window is wider than 16:9, and that the zoom keeps in place. |
Align | anchorY | Align.CENTER | Side of the window that the canvas is pinned to when the window is taller than 16:9, and that the zoom keeps in place. |
Element details
Section titled “Element details”active
Section titled “active”boolean active() default true
If false, the UI is drawn but receives no input, and the UIs below it receive the input instead.
visible
Section titled “visible”boolean visible() default true
If false, the UI is neither drawn nor sent any input, and closing it skips its closing transition.
closeable
Section titled “closeable”boolean closeable() default true
If false, Escape leaves the UI open; JOID.close still closes it.
An overlay never closes with Escape.
zoomable
Section titled “zoomable”boolean zoomable() default true
If false, the zoom keys of dev mode (Ctrl or Alt with + and -, and Alt with the wheel) leave the zoom of the UI unchanged.
projection
Section titled “projection”boolean projection() default true
If true, the UI sets its own projection over the window; if false, it draws inside the projection that the host has set.
background
Section titled “background”boolean background() default false
If true, the UI draws the UI backdrop over the whole window, behind its nodes, in backgroundColor; the backdrop fades with the transition of the UI.
backgroundColor
Section titled “backgroundColor”String backgroundColor() default "#101010C0"
Color of the UI backdrop, as a hexadecimal string #RRGGBB or #RRGGBBAA.
zindex
Section titled “zindex”int zindex() default 0
Order of the UI inside its group of the stack of its bridge (overlays below the screens, screens and popups, overlays above them): a higher value is drawn above and receives the input first.
zlevel
Section titled “zlevel”double zlevel() default 0D
Depth, along the Z axis, added before the UI is drawn, in the units of the projection of the host.
anchorX
Section titled “anchorX”Align anchorX() default Align.CENTER
Side of the window that the canvas is pinned to when the window is wider than 16:9, and that the zoom keeps in place.
anchorY
Section titled “anchorY”Align anchorY() default Align.CENTER
Side of the window that the canvas is pinned to when the window is taller than 16:9, and that the zoom keeps in place.
fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses
