I've been searching like hell of what code to use but i'm not really sure of the things I've found, so can anyone give me a proper link.
Please and thank you! ^^
Code: Select all
screen button: # This shows the button. In your script, to have the button show up, just type in "show screen button" somewhere.
vbox xalign 0.1 yalign 0.1:
textbutton "Show stats" action ui.callsinnewcontext("stats_screen") # basically will call the label "stats_screen"
# you can also use an image button:
imagebutton:
idle "button_idle.png" # image shown when button is idle
hover "button_hover.png" # image shown when button is hovered over
action ui.callsinnewcontext("stats_screen") # does the same thing as the text button
label stats_screen:
scene stats_bg
python:
ui.hbox()
# Column 1
ui.vbox(xpos=0, ypos=0, xanchor='left', yanchor='top') # this positions the text
# THIS IS WHERE YOU WOULD PUT ALL YOUR TEXT/CODE TO SHOW THE STATS/CLUES/WHATEVER here's a sample #
ui.text("%d points"%intelligence) # would show up as "### points", with ### being whatever number the variable is set to at that point in time
ui.close() # for the vbox
ui.close() # for the hbox
ui.textbutton("Return", clicked=ui.returns(("goback")) # back to the game!
ui.imagebutton("return.png", "return_hover.png", clicked=ui.returns("goback"), ypos=0, xpos=0) # same as above, only an image button
$ picked = ui.interact()
if picked == "goback":
returnCode: Select all
init:
$ clue_1_seen = FalseCode: Select all
label clues_screen:
scene clues_bg
python:
ui.hbox()
# Column 1
ui.vbox(xpos=0, ypos=0, xanchor='left', yanchor='top') # this positions the text
# THIS IS WHERE YOU WOULD PUT ALL YOUR TEXT/CODE TO SHOW THE STATS/CLUES/WHATEVER here's a sample #
ui.text("CLUES HERE")
if clue_1_seen == True:
ui.text("CLUE 1 HERE")
ui.close() # for the vbox
ui.close() # for the hbox
ui.textbutton("Return", clicked=ui.returns(("goback")) # back to the game!
ui.imagebutton("return.png", "return_hover.png", clicked=ui.returns("goback"), ypos=0, xpos=0) # same as above, only an image button
$ picked = ui.interact()
if picked == "goback":
returnscreen button: # This shows the button. In your script, to have the button show up, just type in "show screen button" somewhere.
vbox xalign 0.1 yalign 0.1:
textbutton "Show stats" action ui.callsinnewcontext("stats_screen") # basically will call the label "stats_screen"
# you can also use an image button:
Code: Select all
("Show stats", action=ui.callsinnewcontext("stats_screen"))Code: Select all
ui.textbutton("Show Stats", clicked=ui.callsinnewcontext("stats_screen"))Arrow points to right after ui.File "game/script.rpy", line 15: Expected a screen language statement.
ui.textbutton("Show Stats", clicked=ui.callsinnewcontext("stats_screen"))
Also I'm not sure why the post is not holding my indentions, but the bottom two lines are indented four spaces.screen button: # This shows the button. In your script, to have the button show up, just type in "show screen button" somewhere.
vbox xalign 0.1 yalign 0.1
ui.textbutton("Show Stats", clicked=ui.callsinnewcontext("stats_screen")) # basically will call the label "stats_screen"
Code: Select all
screen button: # This shows the button. In your script, to have the button show up, just type in "show screen button" somewhere.
vbox xalign 0.1 yalign 0.1:
textbutton "Show stats" action ui.callsinnewcontext("stats_screen") # basically will call the label "stats_screen"Users browsing this forum: Bing [Bot]