So I have a quick menu that consists of the rollback button (rolls back by 1 dialogue), the history button (shows the dialogue logs screen), the fast forward button (currently disabled), and the automatic mode button. Here's the code for the auto mode button:
Code: Select all
screen quick_menu():
## Ensure this appears on top of other screens.
zorder 100
modal quick_menu_modal
if quick_menu: ##this variable is so that the quick menu can be turned off during tutorial
hbox:
style_prefix "quick"
xalign 0.175
yalign 0.98
spacing 9
if auto_mode_button:
imagebutton: #auto mode button
idle "gui/textbox/auto.png"
hover "gui/textbox/auto interact.png"
hovered [SetField(mtt, 'redraw', True), mtt.Action(Text("Auto Mode", size=25, font="fonts/GARAIT.TTF", color="#ffffff"))]
##this hovered thing is for a custom mouse tooltip, I have a post about how to do this actually
action [Preference("auto-forward", "toggle"), ToggleVariable("autoOn")]
if autoOn:
hbox:
xalign 0.8
yalign 0.98
text "Auto Mode is On." size 20
if not autoOn:
hbox:
xalign 0.8
yalign 0.98
#add "ctc_icon"
By the way, here's how the CTC icon is normally defined (and how I initially defined it):
Code: Select all
image ctc_icon:
"gui/textbox/continue.png"
xalign 0.8 yalign 0.98 ##this position is fixed, and it could be different for each ui setup
linear 0.75 alpha 1.0
linear 0.75 alpha 0.0
repeat
define jo = Character("Joshua", who_color= "#8f8f8f", image = "jo", ctc="ctc_icon", ctc_position="fixed")
So, in my head, the solution is to utilize a variable that turns true once the dialogue is done being revealed (or false, it doesn't matter). When this variable is triggered, then the CTC image is added onto the quick_menu screen until you click and the next dialogue starts being revealed again, which makes the CTC image disappear, repeat. And by turning auto mode on, I can turn this variable off permanently so that the CTC image doesn't appear at all, and instead I have the text "Auto Mode is On." displayed in its place (this part is already defined and works great), until auto mode is turned off. Is there such a variable already? If not, how would I go about defining this variable?
Thank you!!
BlueStylus