Code: Select all
default bdr = 'a'
image bedroom = 'bedroom[bdr].jpg'
screen chosebedroom():
text 'Choose your bedroom.' align(.7, .3)
hbox at truecenter:
spacing 7
imagebutton idle im.FactorScale('bedrooma.jpg', .2) action SetVariable('bdr', 'a'), Return()
imagebutton idle im.FactorScale('bedroomb.jpg', .2) action SetVariable('bdr', 'b'), Return()
imagebutton idle im.FactorScale('bedroomc.jpg', .2) action SetVariable('bdr', 'c'), Return()
imagebutton idle im.FactorScale('bedroomd.jpg', .2) action SetVariable('bdr', 'd'), Return()
When the player clicks on the image, the game sets it as "image bedroom."
But I wanted to do something like this:
I know that would be more "trouble", since I'd have to create more screens. But I really want to have this "Background" button under each image.
So basically I'd have to create a screen (for each image) with a textbutton "Background", right?
I tried doing this but I failed at "converting" the information from the imagebutton to the textbutton.
It's also necessary to add a position to the textbutton to stay at the right place.
What's the order of the text "Background", position, action, etc? I tried many different ways and got the "not a keyword argument or valid child for the textbutton statement." error.
Thanks.