Nightbreak Java API
Toggle table of contents
JVM
Target filter
JVM
Switch theme
Search in API
Skip to content
Nightbreak Java API
MagmaCore
/
com.magmaguy.magmacore.dialog
/
DialogManager
/
SingleOptionInput
Single
Option
Input
public
class
SingleOptionInput
implements
DialogManager.InputControl
A single option selector input control:contentReference[oaicite:46]{index=46}.
Members
Functions
add
Option
Link copied to clipboard
public
DialogManager.SingleOptionInput
addOption
(
String
id
,
JsonElement
display
,
boolean initial
)
Adds an option to the selection.
public
DialogManager.SingleOptionInput
addOption
(
String
id
,
String
display
,
boolean initial
)
Convenience overload using plain string for the display.
label
Visible
Link copied to clipboard
public
DialogManager.SingleOptionInput
labelVisible
(
boolean visible
)
Controls whether the label is visible.
of
Link copied to clipboard
public
static
DialogManager.SingleOptionInput
of
(
String
key
,
JsonElement
label
)
public
static
DialogManager.SingleOptionInput
of
(
String
key
,
String
label
)
to
Json
Link copied to clipboard
public
JsonObject
toJson
(
)
width
Link copied to clipboard
public
DialogManager.SingleOptionInput
width
(
int width
)
Sets the width of the input box.