Disappearing quick menu [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.
- beastcarving
- Regular
- Posts: 139
- Joined: Mon May 13, 2019 5:03 pm
- Completed: Pulse Cage https://beastcarving.itch.io/pulse-cage-the-full-series
- Projects: Your Brother's Religion
- Organization: BeastCarving Studio
- IRC Nick: BeastCarving
- Tumblr: beastcarving
- Deviantart: beastcarving
- Github: beastcarving
- itch: beastcarving
- Contact:
Disappearing quick menu [SOLVED!]
I have a quick question. How do you make the quick menu disappear after a few idle seconds, then reappear once moving the mouse/pressing the space-bar again?
Last edited by beastcarving on Tue Apr 07, 2020 5:50 pm, edited 1 time in total.
Pulse Cage (full game)
Your Brother's Religion (Demo)PLAY HERE: https://beastcarving.itch.io/
Love my work: https://www.patreon.com/beastcarving
- Per K Grok
- Miko-Class Veteran
- Posts: 882
- Joined: Fri May 18, 2018 1:02 am
- Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
- itch: per-k-grok
- Location: Sverige
- Contact:
Re: Disappearing quick menu [HELP!]
To turn of and on the quick menu you can usebeastcarving wrote: ↑Wed Apr 01, 2020 8:18 amI have a quick question. How do you make the quick menu disappear after a few idle seconds, then reappear once moving the mouse/pressing the space-bar again?
$ quick_menu = False
$ quick_menu = True
- beastcarving
- Regular
- Posts: 139
- Joined: Mon May 13, 2019 5:03 pm
- Completed: Pulse Cage https://beastcarving.itch.io/pulse-cage-the-full-series
- Projects: Your Brother's Religion
- Organization: BeastCarving Studio
- IRC Nick: BeastCarving
- Tumblr: beastcarving
- Deviantart: beastcarving
- Github: beastcarving
- itch: beastcarving
- Contact:
Re: Disappearing quick menu [HELP!]
How do I control how many seconds go by before the quick-menu disappears?
Pulse Cage (full game)
Your Brother's Religion (Demo)PLAY HERE: https://beastcarving.itch.io/
Love my work: https://www.patreon.com/beastcarving
- Per K Grok
- Miko-Class Veteran
- Posts: 882
- Joined: Fri May 18, 2018 1:02 am
- Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
- itch: per-k-grok
- Location: Sverige
- Contact:
Re: Disappearing quick menu [HELP!]
You could use a pause or you could use a timer. Kind of depends on the situation and how you want it to work in relation to other things in the game.beastcarving wrote: ↑Wed Apr 01, 2020 8:08 pmHow do I control how many seconds go by before the quick-menu disappears?
- beastcarving
- Regular
- Posts: 139
- Joined: Mon May 13, 2019 5:03 pm
- Completed: Pulse Cage https://beastcarving.itch.io/pulse-cage-the-full-series
- Projects: Your Brother's Religion
- Organization: BeastCarving Studio
- IRC Nick: BeastCarving
- Tumblr: beastcarving
- Deviantart: beastcarving
- Github: beastcarving
- itch: beastcarving
- Contact:
Re: Disappearing quick menu [HELP!]
I need help. I what this code to work the same as when you're not moving the mouse, and it will disappear after 10 seconds, then reappear when you move the mouse again.
init:
$ time = 0.5
$ timer_range = 0.5
$ timer_jump = quick_menu = False
init:
$ time = 0.5
$ timer_range = 0.5
$ timer_jump = quick_menu = False
Pulse Cage (full game)
Your Brother's Religion (Demo)PLAY HERE: https://beastcarving.itch.io/
Love my work: https://www.patreon.com/beastcarving
- Per K Grok
- Miko-Class Veteran
- Posts: 882
- Joined: Fri May 18, 2018 1:02 am
- Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
- itch: per-k-grok
- Location: Sverige
- Contact:
Re: Disappearing quick menu [HELP!]
beastcarving wrote: ↑Sun Apr 05, 2020 12:00 amI need help. I what this code to work the same as when you're not moving the mouse, and it will disappear after 10 seconds, then reappear when you move the mouse again.
init:
$ time = 0.5
$ timer_range = 0.5
$ timer_jump = quick_menu = False
If you show this screen the quick menu will be hidden if the mouse is not moved for 10 seconds.
The quick menu will be shown again if you use the mouse or space bar.
Code: Select all
default mX=0
default mY=0
default fx=0
default fy=0
default lx=0
default ly=0
default iTime=0
screen inactive():
$ mX, mY = renpy.get_mouse_pos()
timer 0.1 action [SetVariable("lx",fx), SetVariable("ly",fy), SetVariable("fx",mX),SetVariable("fy",mY)] repeat True
if lx==fx and ly==fy:
timer 0.1 action SetVariable("iTime", iTime+1) repeat True
if iTime>99:
timer 0.1 action SetVariable("quick_menu", False)
else:
timer 0.1 action [SetVariable("quick_menu", True), SetVariable("iTime", 0)]
key "K_SPACE" action [SetVariable("quick_menu", True), SetVariable("iTime", 0)]
- beastcarving
- Regular
- Posts: 139
- Joined: Mon May 13, 2019 5:03 pm
- Completed: Pulse Cage https://beastcarving.itch.io/pulse-cage-the-full-series
- Projects: Your Brother's Religion
- Organization: BeastCarving Studio
- IRC Nick: BeastCarving
- Tumblr: beastcarving
- Deviantart: beastcarving
- Github: beastcarving
- itch: beastcarving
- Contact:
Re: Disappearing quick menu [HELP!]
Thanks! It works perfectly. I have one more question though.
How do I make the menu also disappear each time I'm clicking?
I was thinking it's look something like this, similar to the line about the Space-bar.
This is what I tried:
How do I make the menu also disappear each time I'm clicking?
I was thinking it's look something like this, similar to the line about the Space-bar.
This is what I tried:
Code: Select all
clicked action [SetVariable("quick_menu", False), SetVariable("iTime", 0)]
Pulse Cage (full game)
Your Brother's Religion (Demo)PLAY HERE: https://beastcarving.itch.io/
Love my work: https://www.patreon.com/beastcarving
- Per K Grok
- Miko-Class Veteran
- Posts: 882
- Joined: Fri May 18, 2018 1:02 am
- Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
- itch: per-k-grok
- Location: Sverige
- Contact:
Re: Disappearing quick menu [HELP!]
you catch left mousebutton down this waybeastcarving wrote: ↑Mon Apr 06, 2020 11:02 pmThanks! It works perfectly. I have one more question though.
How do I make the menu also disappear each time I'm clicking?
I was thinking it's look something like this, similar to the line about the Space-bar.
This is what I tried:
Code: Select all
clicked action [SetVariable("quick_menu", False), SetVariable("iTime", 0)]
key "mousedown_1"
You have information on different keys here
https://www.renpy.org/doc/html/keymap.html
- beastcarving
- Regular
- Posts: 139
- Joined: Mon May 13, 2019 5:03 pm
- Completed: Pulse Cage https://beastcarving.itch.io/pulse-cage-the-full-series
- Projects: Your Brother's Religion
- Organization: BeastCarving Studio
- IRC Nick: BeastCarving
- Tumblr: beastcarving
- Deviantart: beastcarving
- Github: beastcarving
- itch: beastcarving
- Contact:
Re: Disappearing quick menu [HELP!]
Thanks. I appreciate it.
Pulse Cage (full game)
Your Brother's Religion (Demo)PLAY HERE: https://beastcarving.itch.io/
Love my work: https://www.patreon.com/beastcarving
Who is online
Users browsing this forum: No registered users