Ren'Py Add a Textbutton to the Quick Menu

_13_

Active Member
Game Developer
Oct 8, 2020
802
2,714
I still know very little about "real" coding and I'm sure this is something simple. I tried to read what I could about Screen Actions and think I want to use ToggleScreen to turn a screen on and off. What I don't know how to do, and don't see an example of how to do it, is add a textbutton to the quick menu which will toggle my screen "points" on and off. I know how to force it on and off in the code using show and hide, but I want players to be able to do it themselves.

When I tried adding
Code:
textbutton _("Points") action ToggleScreen(points)
to the quick menu section, it doesn't work and the game won't run. I've tried some other variations, but none of them seem to work, either.
 

_13_

Active Member
Game Developer
Oct 8, 2020
802
2,714
And just like that, I figured it out.
Code:
textbutton _("Points") action ToggleScreen('points')
I'm dumb. Thanks for looking in on me.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,957
16,192
I'm dumb.
No. You're new to a field of knowledge, furthermore a technical one, that's something different.

And if you need a proof of that, you needed just 4 minutes to solve your issue ; including the time to comeback to your message and to write the second one.
The time you potentially past unsuccessfully solving your issue before you started this thread do not count. You were, as we all tend to be, victim of a mental bias, believing that you did everything as it should be done ; therefore that you were facing a really weird behavior that only an expert could understand.
It's when you started to seek for help, and explained the problem with words instead of doing it with incomplete thoughts, that you effectively started to search a solution. This is called " " and we all do it in a way or another. And as I said, once your mind was finally ready to search for the solution, you needed less than 4 minutes to find it.
 
  • Like
Reactions: _13_