I'm hoping to make a inventory where you can click an item and a small menu pops up. Wondering if it's possible to do something like this in Ren'py:
I'm pretty sure it is possible, but I have no idea what to look for on the wiki / google. I know nothing about Python, so I'm kinda hoping that it can be done within just normal ren'py. Any tips or tutorials would be much appreciated!
Pop-up menu on click [Solved]
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.
-
- Regular
- Posts: 132
- Joined: Tue Apr 29, 2014 5:37 pm
- Contact:
Pop-up menu on click [Solved]
Last edited by Exiscoming on Sat Nov 21, 2015 2:08 pm, edited 1 time in total.
Re: Pop-up menu on click
Tip: Use Screen Language. You can condition anchor of a frame in simple menu screen based on the screen corner mouse is in (Like in Windows OS when you call similar menus). I use something similar in my game to a good degree of success, my implementation just got more python in it...Exiscoming wrote:Any tips
Code: Select all
screen simple_menu():
modal True
default x = renpy.get_mouse_pos()[0]
default y = renpy.get_mouse_pos()[1]
frame:
pos (x + 10, y + 20)
has vbox
textbutton "Button 1":
action Hide("simple_menu")
textbutton "Button 2":
action Hide("simple_menu")
textbutton "Button 3":
action Hide("simple_menu")
screen items():
vbox:
align (0.5, 0.5)
for i in range(10):
textbutton "Item":
action Show("simple_menu")
label start:
call screen items
-
- Regular
- Posts: 132
- Joined: Tue Apr 29, 2014 5:37 pm
- Contact:
Re: Pop-up menu on click
Hey man, this is great! Thanks! One question.
frame:
pos (x + 10, y + 20)
has vbox
textbutton "Inspect":
clicked Hide("simple_menu") and Jump("one")
When I do this, it jumps to label one, but doesn't hide the "simple_menu". Is there a way I can both hide the simple menu and jump to label one?
frame:
pos (x + 10, y + 20)
has vbox
textbutton "Inspect":
clicked Hide("simple_menu") and Jump("one")
When I do this, it jumps to label one, but doesn't hide the "simple_menu". Is there a way I can both hide the simple menu and jump to label one?
Re: Pop-up menu on click
Code: Select all
textbutton "Inspect":
action Hide("simple_menu"), Jump("one")
-
- Regular
- Posts: 132
- Joined: Tue Apr 29, 2014 5:37 pm
- Contact:
Re: Pop-up menu on click
Oh damn, a comma? All right, thanks a ton man. You've been a great help.
Who is online
Users browsing this forum: No registered users