You can make the button label react to your setting value by using the switch_case placeholder together with the getvariable placeholder (assuming the setting value is stored in a FancyMenu variable). Here’s how to do it:
-
Store the setting value in a FancyMenu variable (see the Variables page). When the value changes (e.g., via a slider or button action), update that variable with
Set Variable Value. -
Set the button’s label to a placeholder that reads the variable and returns the right text. For example:
{"placeholder":"switch_case","values":{ "value":"{"placeholder":"getvariable","values":{"name":"your_setting_var"}}", "cases":"1:&lDisabled,2:&lMiddle,3:&lEnabled", "default":"&lUnknown" }}&lforces Minecraft’s bold formatting, which works for button labels (you don’t need to mess with JSON components for this).- Replace
your_setting_varwith the actual variable name. - Adjust “Middle” to whatever you want to show for the value
2.
-
If you want to avoid hard-coding strings in the
casesvalue, you can also nestlocalplaceholders or other text helpers inside theswitch_case, but the above is the simplest for plain text.
This keeps the button always bold, and the text automatically updates whenever the underlying variable changes. 😊