Create a button that toggles a variable and use that variable to update the label/graphics.
- Make a new variable (e.g.
gfx_mode) via Customization → Variables → Manage Variables and set it toFANCY. - Add your custom button and right-click it → Edit Action Script. Build a script with an
IFblock that checksIs Variable Value [FM Variable]forFANCY(set mode to opposite, so the block runs when it’s not FANCY). - Inside the
IF, addSet Variabletogfx_mode:FAST; append anELSEblock with anotherSet Variabletogfx_mode:FANCY. This alternates the variable each press. - Use
{"placeholder":"getvariable","values":{"name":"gfx_mode"}}wherever you need the text to change (button label, texture decision via loading requirements, etc.). - Combine the variable with loading requirements or placeholders to switch textures—e.g. add two Image elements (FANCY/FAST visuals) and require
gfx_modeto match.
See the “Toggle Parts of Layouts” guide for the full variable toggle workflow: Toggle Parts of Layouts.