Skip to content

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.

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.

TypeElementDefaultSummary
booleanactivetrueIf false, the UI is drawn but receives no input, and the UIs below it receive the input instead.
booleanvisibletrueIf false, the UI is neither drawn nor sent any input, and closing it skips its closing transition.
booleancloseabletrueIf false, Escape leaves the UI open; JOID.close still closes it.
booleanzoomabletrueIf false, the zoom keys of dev mode (Ctrl or Alt with + and -, and Alt with the wheel) leave the zoom of the UI unchanged.
booleanprojectiontrueIf true, the UI sets its own projection over the window; if false, it draws inside the projection that the host has set.
booleanbackgroundfalseIf 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.
StringbackgroundColor"#101010C0"Color of the UI backdrop, as a hexadecimal string #RRGGBB or #RRGGBBAA.
intzindex0Order 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.
doublezlevel0DDepth, along the Z axis, added before the UI is drawn, in the units of the projection of the host.
AlignanchorXAlign.CENTERSide of the window that the canvas is pinned to when the window is wider than 16:9, and that the zoom keeps in place.
AlignanchorYAlign.CENTERSide of the window that the canvas is pinned to when the window is taller than 16:9, and that the zoom keeps in place.

boolean active() default true

If false, the UI is drawn but receives no input, and the UIs below it receive the input instead.

boolean visible() default true

If false, the UI is neither drawn nor sent any input, and closing it skips its closing transition.

boolean closeable() default true

If false, Escape leaves the UI open; JOID.close still closes it. An overlay never closes with Escape.

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.

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.

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.

String backgroundColor() default "#101010C0"

Color of the UI backdrop, as a hexadecimal string #RRGGBB or #RRGGBBAA.

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.

double zlevel() default 0D

Depth, along the Z axis, added before the UI is drawn, in the units of the projection of the host.

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.

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

Report a problem with this page