Letting player show or hide quick menu in preferences. [Solved]
Posted: Sat Mar 30, 2019 1:41 pm
So I'm having trouble making this code work as needed.
From how I understand renpy (which is not very much) putting those options in should allow the player to click on either show or hide to do just that, show or hide. However it is not doing this at all. Clicking them, as far as I can tell, performs no function. In fact, when I put those options in it just hides the quick menu and never shows it.
To fix that I had to add "default show_quick_menu = True" at the beginning of my script which does show the quick menu, but then it never hides without me using "$ quick_menu = False" which is, I imagine, working as intended with "default show".
I have tried another method which also does not work for me.
Where I made custom screens which contained only one line.
I also tried the "show_quick_menu = Blah" variant of the code from the older renpy.
Now, this thread viewtopic.php?t=26263 talks about what I want to do, but "make it 2 buttons inside a screen with a conditional branch" confuses me a bit. I think that's what I was doing with my second failed solution? But I'm not sure.
If someone could help me out I would appreciate it. I'm sure this is a very simple thing to do, but my google-fu really failed me on finding out how to do it.
Edit: Also, yes, my quick menu does have the "if quick_menu" statement which is why I thought the Show Hide buttons would work in the first place.
Code: Select all
vbox:
style_prefix "check"
label _("Quick Menu")
textbutton _("Show") action Show("quick_menu")
textbutton _("Hide") action Hide("quick_menu")
To fix that I had to add "default show_quick_menu = True" at the beginning of my script which does show the quick menu, but then it never hides without me using "$ quick_menu = False" which is, I imagine, working as intended with "default show".
I have tried another method which also does not work for me.
Code: Select all
vbox:
style_prefix "check"
label _("Quick Menu")
textbutton _("Show") action Show("quickmenushow")
textbutton _("Hide") action Show("quickmenuhide")
Code: Select all
screen quickmenushow:
$ quick_menu = True
screen quickmenuhide:
$ quick_menu = FalseNow, this thread viewtopic.php?t=26263 talks about what I want to do, but "make it 2 buttons inside a screen with a conditional branch" confuses me a bit. I think that's what I was doing with my second failed solution? But I'm not sure.
If someone could help me out I would appreciate it. I'm sure this is a very simple thing to do, but my google-fu really failed me on finding out how to do it.
Edit: Also, yes, my quick menu does have the "if quick_menu" statement which is why I thought the Show Hide buttons would work in the first place.