I would like to do a tutorial about general GUI soon, but I'm extremely swamped at the moment!
If you're truly in the dark, you should make new threads on your problems. Lots of people around the forum are willing to help you as you learn.
We did it exactly how you're doing it, actually.Milkymalk wrote:So... how did all those people who know how to do it learn it themselves if there is no documentation?
I can't even find what "Return()" as a button action does. I know it exists because I saw it in a script, and I guess that it closes the screen and returns "whatever", but there is no explanation anywhere.
I already opened a thread and asked my questions, but the answers just confused me even more
So the only difference between Return() and return is that Return() can be used as an action?Soraminako wrote: As for return, it returns the player to the previous location they were at in the game, or to the main menu if there is no location to return to (because it's the end of the game).
In that case, there is still hope that one day even we basic forum dwellers might evolve from caterpillars to butterflies too! X3Aleema wrote:Yes, that's exactly how I learned.
As far as I know, yeah. I might be missing some additional delicacies, but that's how I use it, at least.Milkymalk wrote:So the only difference between Return() and return is that Return() can be used as an action?
Code: Select all
# menu screen
screen charactermenu:
imagemap:
auto "characters_%s.png" #the character menu imagemap
hotspot(1, 1, 1, 1,) action [ Show('character1'), Hide('charactermenu') ] #when you click the first character, hide this screen and show their profile
hotspot(2, 2, 2, 2) action [ Show('character2'), Hide('charactermenu') ] #when you click the second character, hide this screen and show their profile
hotspot (3, 3, 3, 3) action Return #when this spot is clicked, close the menu screen and return to the game
# character screen
screen character1:
add "character1profile.png" #shows the profile image of the first character
textbutton "go back" action[ Show('charactermenu'), Hide('character1') ] #when clicked, hides this screen and shows the menu
# other character screen
screen character2:
add "character2profile.png" #shows the profile image of the second character
textbutton "go back" action[ Show('charactermenu'), Hide('character1') ] #when clicked, hides this screen and shows the menu
# actual game
label start:
"text text text"
"more text"
call charactermenu #call the character menu screen
"even more text"Code: Select all
imagemap:
auto "characters_%s.png" #the character menu imagemap
Code: Select all
ground "charactermenu_ground.png"
hover "charactermenu_hover.png"screen main_menu:
tag menu
imagemap:
ground "menu_idle.jpg"
hover "menu_hover.jpg"
hotspot (659,493,75,25) action Start()
hotspot (659,531,91,24) action Quit(confirm=False)


Code: Select all
screen main_menu:
tag menu
add "menu_background.jpg"
vbox:
xalign 0.9 yalign 0.9 spacing 10
textbutton "Start" action Start() font "font.ttf"
textbutton "Quit" action Quit(confirm=False) font "font.ttf"Users browsing this forum: No registered users