So, this is another kinda specific thing
Rather than have links set in passages, I’m having navigation be based upon a collection of 10 buttons set in a tray at the bottom of the screen. These buttons are technically displayed at all times, though the plan is to have them reduced to 0 opacity when disabled.
The options displayed upon the buttons is supposed to change depending on a string variable that can be altered in-passage as one navigates through the story.
I’d like to have it set to when the associated string in the passage is set to “”, then the button disables itself to prevent it from being clicked or otherwise interacted with.
Thus far, I’ve managed to do find this code,
@@#test;<<button "test">>
<<run $("#test button").prop("disabled", true)>>
<</button>>@@
and I’ve tried to modify it to something like this;
<<set $bTest1 = "">>
@@#butt;<<button $bTest1>>
<</button>>@@
<<if $bTest1 == "">>@@<<run $("#butt button").prop("disabled", true)>>@@<</if>>
Maybe I’m not quite getting it, but I know if I attach the code within another button, then it works like so-
@@#butt;<<button $bTest1>>
<</button>>@@
@@#test;<<button "test">>
<<run $("#butt button").prop("disabled", true)>>
<</button>>@@
So…
How be what do?