I’m using
Tweego Version: 2.1.1
Story Format: SugarCube v2.36.1
Is there a macro which provides the visual equivalent of SugarCube’s UI “Setting.addToggle” which can be used within a passage? I can’t find one in the SugarCube documentation. Did I overlook it?
While the macro “checkbox” is functionally equivalent, letting the author give the reader a choice between “on” and “off” values, I’d like to be able to display alternating on/off “sliders” like those shown in the UI column’s Settings menu.
My own attempts to write such a macro have not been very productive, and my Web searches haven’t been successful, either.
I don’t think there is a macro equivalent to the Setting Toggle. In the HTML Code of the Setting Dialog, the toggle is a button with the on/off icon (from the SugarCube built-in font).
I have a widget from one of my project, which uses the <<checkbox>> macro in the same fashion, made it to look like the Setting button. (I have no idea where I found this code, I know I didn’t come up with it, maybe an old Forum post? but the code works)
In the passage: <<screentoggle "_sound" true>>
In the widget passage: