Stat popup inside a button

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Post Reply
Message
Author
Norezza
Newbie
Posts: 19
Joined: Tue Oct 17, 2017 7:51 pm
Contact:

Stat popup inside a button

#1 Post by Norezza »

Hi!
I'm new to this, but I can't really find any information in the documentation regarding this.
I wish to have a permanent button the player can click so that a stat-window appears.

I attempted a simple code of

Code: Select all

screen openStats():
    hbox xalign 0.5 yalign 0.1:
        textbutton "Stats" action gui_stats
Where, gui_stats is simply a test-screen I have added.

Code: Select all

screen statgui():
    hbox xalign 0.5 yalign 0.5:
        textbutton "Statistics" action Null
Is it not possible to call another screen from within the screen .rpy? (Note, I have a .rpy file called custom_screens.rpy, don't know if it matters).

User avatar
Scribbles
Miko-Class Veteran
Posts: 636
Joined: Wed Sep 21, 2016 4:15 pm
Completed: Pinewood Island, As We Know It
Projects: In Blood
Organization: Jaime Scribbles Games
Deviantart: breakfastdoodles
itch: scribbles
Location: Ohio
Contact:

Re: Stat popup inside a button

#2 Post by Scribbles »

You want the show action... probably. Look through the actions to see if any do exactly what you want.
https://www.renpy.org/doc/html/screen_actions.html#Show

textbutton "text" action Show("my_screen") ##<---- something like that... I think
Image - Image -Image

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]