Is there a way for me to use a vbox like a button to execute a screen action such as Jump()?
I have this box of profile data for each character, and I want the player to be able to click anywhere on a profile to jump to a label
Making a Vbox into a button?
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.
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.
- dartbored
- Newbie
- Posts: 7
- Joined: Sat Sep 08, 2018 12:56 pm
- Projects: Project Codename: Headspace
- Contact:
Making a Vbox into a button?
"No, no. You're my brother, Ethan."
"Your talking robot brother?"
"Affirmative."
"Your talking robot brother?"
"Affirmative."
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3636
- Joined: Mon Dec 14, 2015 5:05 am
- Location: Your monitor
- Contact:
Re: Making a Vbox into a button?
You could do that. I can think of two ways (neither tested)
The easiest would be to place a regular button inside the vbox, that is the same size as the vbox, over the top of everything else. Or inside a fixed placed above the vbox in the same position.
Obviously make the button invisible so it can be seen through, but not clicked through.
The second, more elegant solution would be to place the contents of the vbox, inside the button instead.
This however, is much more complicated and boasts no real benefits, so I'd just go with the first option for simplicity.
The easiest would be to place a regular button inside the vbox, that is the same size as the vbox, over the top of everything else. Or inside a fixed placed above the vbox in the same position.
Obviously make the button invisible so it can be seen through, but not clicked through.
The second, more elegant solution would be to place the contents of the vbox, inside the button instead.
This however, is much more complicated and boasts no real benefits, so I'd just go with the first option for simplicity.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Free Android GUI - Updated occasionally
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
-
strayerror
- Regular
- Posts: 154
- Joined: Fri Jan 04, 2019 3:44 pm
- Contact:
Re: Making a Vbox into a button?
You should just be able to replace:
with
Code: Select all
vbox:
[sub items and styles]
Code: Select all
button:
action Jump('your_label')
has vbox
[sub items and styles]
Who is online
Users browsing this forum: Bing [Bot], Google [Bot]
