On Screen Buttons [SOLVED]
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
- RayDizzle
- Regular
- Posts: 25
- Joined: Tue Jul 28, 2015 9:49 pm
- Deviantart: Gem2012
- Location: New Zealand
- Contact:
On Screen Buttons [SOLVED]
Okay, so I know exactly how to place a button on screen but there's just one thing I want to do. I want you to be able to click on the button and have it display your stats (which I've already done) but then be able to click it again and hide the stats screen because it's just a simple information screen in the corner of the main screen. Could anyone help me on that please?
Last edited by RayDizzle on Sun Aug 30, 2015 2:51 am, edited 1 time in total.
- Kia
- Eileen-Class Veteran
- Posts: 1040
- Joined: Fri Aug 01, 2014 7:49 am
- Deviantart: KiaAzad
- Discord: Kia#6810
- Contact:
Re: On Screen Buttons
put two image on top of each other and in addition to their normal function make them to hide itself and show the other one. there was a recent topic about it. try searching the forum for it
- RayDizzle
- Regular
- Posts: 25
- Joined: Tue Jul 28, 2015 9:49 pm
- Deviantart: Gem2012
- Location: New Zealand
- Contact:
Re: On Screen Buttons
But if I were using a textbutton how would I do it?
- Kia
- Eileen-Class Veteran
- Posts: 1040
- Joined: Fri Aug 01, 2014 7:49 am
- Deviantart: KiaAzad
- Discord: Kia#6810
- Contact:
Re: On Screen Buttons
it's same for all kind of buttons, try hide screen here: http://www.renpy.org/doc/html/screen_actions.html#Hide
- trooper6
- Lemma-Class Veteran
- Posts: 3712
- Joined: Sat Jul 09, 2011 10:33 pm
- Projects: A Close Shave
- Location: Medford, MA
- Contact:
Re: On Screen Buttons
This is the code you want:
textbutton "Stats" action If(renpy.get_screen("stat_screen"), Hide("stat_screen"), Show("stat_screen"))
For this example I'm pretending your stat screen is called: stat_screen
textbutton "Stats" action If(renpy.get_screen("stat_screen"), Hide("stat_screen"), Show("stat_screen"))
For this example I'm pretending your stat screen is called: stat_screen
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
- RayDizzle
- Regular
- Posts: 25
- Joined: Tue Jul 28, 2015 9:49 pm
- Deviantart: Gem2012
- Location: New Zealand
- Contact:
Re: On Screen Buttons
Thank you so much to both of you! That really helped a lot trooper6! You guys are amazing!
Who is online
Users browsing this forum: Google [Bot]