I used the old documentation (I'm sorry) to add a stats screen that appears when a button is clicked, nothing fancy, just like the documentation says here... https://www.renpy.org/wiki/renpy/doc/co ... ion_Screen
I tried it... didn't work. No button or texty thing of any kind appeared, BUT there were also no errors.
I tried it with a freshly created project... worked perfectly.
I wonder if I may have fracked something up in my screens.rpy file, because I'd been digging around in there, changing colors and whatnot, but I can't remember what part is related to text buttons and stuff.
Side note: My in-game menu buttons show up fine. Dunno if that's related to what I'm trying to do.
Another side note: I backed up my current screens.rpy, and moved a fresh one into my game directory, and I got a flood of errors. I think my current game directory might have been created with the previous version of RenPy. Would that cause this kind of trouble?
Here's the code I used... with only a few modifications from the original.
Code: Select all
#############################################
### This is in my screens.rpy file
#############################################
screen button:
vbox xalign 0.5 yalign 0.5:
textbutton "Show Stats" action ui.callsinnewcontext("aff_screen_label")
screen aff_screen:
frame:
has vbox
text "Gentleman: [Points_Gentle] points"
text "Nice: [Points_Nice] points"
text "Typical Guy: [Points_Tguy] points"
text "Funny: [Points_Funny] points"
text "Fun: [Points_Fun] points"
text "Smart: [Points_Smart] points"
text "Modesty: [Points_Modesty] points"
textbutton "Return" action Return()
label aff_screen_label:
call screen aff_screen
return
############################################
### Below this line is what is in my init section, and scripts.rpy file
############################################
init:
$ Points_Nice = 0
$ Points_Tguy = 0
$ Points_Funny = 0
$ Points_Fun = 0
$ Points_Gentle = 0
$ Points_Smart = 0
$ Points_Modest = 0
$ variable = True
label start:
show screen button