Page 1 of 1

[Solved]How do you know if a button is visible or not? How can you get a count of QuickSaves?

Posted: Thu Oct 20, 2022 7:28 pm
by henvu50
EDIT: Long story short, I needed to specify an insensitive image for my custom quick load button. So I don't need to know if the button is visible or not, just specify the insensitive image for it's disabled state, then the button will get shown properly.

I want to know if the QuickLoad button is hidden or not. If it's not possible to know the visible state of a button; for example, looking up its visible state by ID, then is there a way to count how many Quick Saves are? If you know there are 0 quick saves, then you can safely assume the Quick Load button is hidden, yes?

For now, the only solution I can think of is to force a Quick Save right at the beginning of a new game, so the Quick Load button doesn't hide.

Code: Select all

$ renpy.save('quick-1')
The reason I need to know if the Quick Load button is hidden or not, is because I put a hotkey label over it, so the user knows what hotkey to press to use it fast. If there's no Quick Load button, I don't want to show my label.

Re: How do you know if a button is visible or not? How can you get a count of QuickSaves?

Posted: Thu Oct 20, 2022 9:51 pm
by Tess
Testing out a new project, it looks like the Q. Load button doesn't hide itself when you have no quick saves, it just greys out. Maybe it's blending in with your textbox or background?

If it isn't the stuff behind it and the quick load button is truly going away, could you post your quick screen code? It should be pretty easy to get it to go back (knock on wood XD).

Re: How do you know if a button is visible or not? How can you get a count of QuickSaves?

Posted: Fri Oct 28, 2022 1:20 am
by henvu50
Tess wrote:
Thu Oct 20, 2022 9:51 pm
Testing out a new project, it looks like the Q. Load button doesn't hide itself when you have no quick saves, it just greys out. Maybe it's blending in with your textbox or background?

If it isn't the stuff behind it and the quick load button is truly going away, could you post your quick screen code? It should be pretty easy to get it to go back (knock on wood XD).
Yea, you were right, it's supposed to grey out, so I supplied an insensitive greyed out image and it shows properly. Thanks for your help!