Package me.hackware.api.setting.impl
Class ModalSetting
java.lang.Object
me.hackware.api.setting.impl.ModalSetting
Wraps a single setting so the GUI opens its body — a colour's picker, a choice's
dropdown, a list's rows — in a modal popup instead of inline under its row.
The row itself is unchanged and keeps its preview (a colour's swatch and hex); only where the body opens differs. The wrapped setting is returned as-is, so the field keeps its own type and its config path, commands and search are untouched: wrapping or unwrapping a setting never moves a saved value.
A setting with no expandable body (a toggle, a slider) has nothing to open, so wrapping it changes nothing.
Usage:
ColorSetting fill = addSettings(ModalSetting.of(new ColorSetting("Fill", "Fill color.", 0xFF0000).alpha()));
-
Method Summary
-
Method Details
-
of
Markssettingto open its body in the modal popup.- Parameters:
setting- the setting to wrap- Returns:
- the same setting, for
addSettings(...)
-