Build and show a runtime input panel for script-controlled macro parameters.
Syntax
MacroPanel(title="", subtitle="", confirm_text="Run", cancel_text="Cancel", *, version="")Constructor parameters
| Name | Description |
|---|---|
titleString | Panel title. Optional · Positional or named Default: "" |
subtitleString | Panel subtitle/helper text. Optional · Positional or named Default: "" |
confirm_textString | Confirm button label. Optional · Positional or named Default: "Run" |
cancel_textString | Cancel button label. Optional · Positional or named Default: "Cancel" |
versionString | Optional version label kept for compatibility; MacroPanel input values are restored from and saved to Storage by variable name, not by version. Optional · Keyword only Default: "" |
Returns
Example
panel = MacroPanel("Run config", "Pick options before run", confirm_text="Start", cancel_text="Back")
panel.text("<b>Ready?</b>")
panel.checkbox("safe_mode", "Safe mode", checked=True)
panel.toggle_switch("retry", "Auto retry", checked=False)
panel.edit_text("username", default="player01", desc="Shown below the field")
panel.edit_text("runs", "Runs", default="3", desc="Numbers only", input_type="number")
panel.radio_group("mode", ["farm", "pvp"], default="farm")
panel.radio_group("target", ["boss", "minion"], default="boss", dropdown=True)
panel.slider("speed", min=0, max=100, step=5, default=60)
panel.stepper("retry_count", min=0, max=10, step=1, default=2)
values = panel.show()Fields
| Name | Description |
|---|---|
titleString | Panel title. Writable after construction. Default: "" |
subtitleString | Panel subtitle/helper text. Writable after construction. Default: "" |
versionString | Optional version label kept for compatibility; MacroPanel input values are restored from and saved to Storage by variable name, not by version. Writable after construction. Default: "" |
confirm_textString | Confirm button label. Default: "Run" |
cancel_textString | Cancel button label. Default: "Cancel" |