Showing quick menu only when text box out
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.
- Coren
- Mindscrew Driver
- Posts: 1691
- Joined: Fri Sep 18, 2009 9:24 am
- Completed: Dear Mariko, Six Rules, Ribbon of Green, RE: Prince of Nigeria, Doppelganger, Cole's Gate Demo, Crimson Rafflesia Demo, Mica: Apoptosis Demo
- Projects: Crimson Rafflesia, Mica: Apoptosis, Fantasy Euthanasia
- Organization: Soyasushi Productions
- Tumblr: CorenBaili
- Deviantart: CorenB
- Skype: coren.baili
- Contact:
Showing quick menu only when text box out
Is there a way to only show the quick menu when the text box is visible, or do I have to show and hide it manually?
-
- Veteran
- Posts: 299
- Joined: Thu Jul 07, 2011 9:33 am
- Projects: BloomingBlossoms
- Contact:
Re: Showing quick menu only when text box out
You could make the quick menu as a part of the textbox, then imagemap it.
- Kuroneko_rg
- Veteran
- Posts: 294
- Joined: Sat Oct 22, 2011 8:39 pm
- Projects: Dark Pleasures, Kiss of Blood, Midnight Park
- Organization: Black Cat Alleyway
- Location: Yomi
- Contact:
Re: Showing quick menu only when text box out
I can't look in it since I'm not using the computer I use to work, but you can look for "hide windows" in "00library.rpy" or "00screens.rpy" in the "common" folder of renpy. I'm not sure if there is it, but if you find it, you can add some code to make it hide and show the quick menu alongside the say window.
I'm not sure if it can be done that way, but give it a try if everything else fails.
Sorry I can't be of any more help right now (I'm in the middle of a blackout (T_T)...)
I'm not sure if it can be done that way, but give it a try if everything else fails.
Sorry I can't be of any more help right now (I'm in the middle of a blackout (T_T)...)
- Coren
- Mindscrew Driver
- Posts: 1691
- Joined: Fri Sep 18, 2009 9:24 am
- Completed: Dear Mariko, Six Rules, Ribbon of Green, RE: Prince of Nigeria, Doppelganger, Cole's Gate Demo, Crimson Rafflesia Demo, Mica: Apoptosis Demo
- Projects: Crimson Rafflesia, Mica: Apoptosis, Fantasy Euthanasia
- Organization: Soyasushi Productions
- Tumblr: CorenBaili
- Deviantart: CorenB
- Skype: coren.baili
- Contact:
Re: Showing quick menu only when text box out
Yeah I have been trying to ask how to do that since months ago, but nobody would respond so I ended up thinking it was impossible (which resulted in me separating the quickmenu from the text box). S: Can you tell me how to imagemap the messagebox?tuna_sushi wrote:You could make the quick menu as a part of the textbox, then imagemap it.
- nyaatrap
- Crawling Chaos
- Posts: 1824
- Joined: Mon Feb 13, 2012 5:37 am
- Location: Kimashi Tower, Japan
- Contact:
Re: Showing quick menu only when text box out
Code: Select all
screen say:
......
use quick_menu
screen quick_menu:
......
- Coren
- Mindscrew Driver
- Posts: 1691
- Joined: Fri Sep 18, 2009 9:24 am
- Completed: Dear Mariko, Six Rules, Ribbon of Green, RE: Prince of Nigeria, Doppelganger, Cole's Gate Demo, Crimson Rafflesia Demo, Mica: Apoptosis Demo
- Projects: Crimson Rafflesia, Mica: Apoptosis, Fantasy Euthanasia
- Organization: Soyasushi Productions
- Tumblr: CorenBaili
- Deviantart: CorenB
- Skype: coren.baili
- Contact:
Re: Showing quick menu only when text box out
I tried that, but that makes the quickmenu visible even when you are showing centered text, which I do not want.
- nyaatrap
- Crawling Chaos
- Posts: 1824
- Joined: Mon Feb 13, 2012 5:37 am
- Location: Kimashi Tower, Japan
- Contact:
Re: Showing quick menu only when text box out
what is your code and what the case your want to exclude exactly?
It can be done using if statement inside of the say screen.
It can be done using if statement inside of the say screen.
-
- Veteran
- Posts: 299
- Joined: Thu Jul 07, 2011 9:33 am
- Projects: BloomingBlossoms
- Contact:
- nyaatrap
- Crawling Chaos
- Posts: 1824
- Joined: Mon Feb 13, 2012 5:37 am
- Location: Kimashi Tower, Japan
- Contact:
Re: Showing quick menu only when text box out
Code: Select all
screen say:
if show_quick_menu:
use quick_menu
label start:
$show_quick_menu=false
- FatUnicornGames
- Miko-Class Veteran
- Posts: 576
- Joined: Sun Mar 25, 2012 7:54 pm
- Projects: Club Shuffle
- Contact:
Re: Showing quick menu only when text box out
I used the technique I learned in this thread to make a quickmenu and mine disappears when the textbox does.
http://lemmasoft.renai.us/forums/viewto ... =8&t=15769
http://lemmasoft.renai.us/forums/viewto ... =8&t=15769
- Coren
- Mindscrew Driver
- Posts: 1691
- Joined: Fri Sep 18, 2009 9:24 am
- Completed: Dear Mariko, Six Rules, Ribbon of Green, RE: Prince of Nigeria, Doppelganger, Cole's Gate Demo, Crimson Rafflesia Demo, Mica: Apoptosis Demo
- Projects: Crimson Rafflesia, Mica: Apoptosis, Fantasy Euthanasia
- Organization: Soyasushi Productions
- Tumblr: CorenBaili
- Deviantart: CorenB
- Skype: coren.baili
- Contact:
Re: Showing quick menu only when text box out
nyaatrap wrote:what is your code and what the case your want to exclude exactly?
It can be done using if statement inside of the say screen.
All I want to do is to only have the quick menu appear when the message box appears. Which means no quick menu during nvl, centered text, etc. etc.
I tried looking at the earlier thread but I got very confused. Am I supposed to have the message box and the quick menu as one image, or separate images like I am doing now?
- nyaatrap
- Crawling Chaos
- Posts: 1824
- Joined: Mon Feb 13, 2012 5:37 am
- Location: Kimashi Tower, Japan
- Contact:
Re: Showing quick menu only when text box out
The problem seems the nvl mode is using the same say screen definition to adv mode.
I never used the nvl mode but if you know what parameter the nvl character has, replacing that parameter with the "show_quick_menu" variable I present solves your problem. Maybe someone who used the nvl mode knows that parameter?
I never used the nvl mode but if you know what parameter the nvl character has, replacing that parameter with the "show_quick_menu" variable I present solves your problem. Maybe someone who used the nvl mode knows that parameter?
- Coren
- Mindscrew Driver
- Posts: 1691
- Joined: Fri Sep 18, 2009 9:24 am
- Completed: Dear Mariko, Six Rules, Ribbon of Green, RE: Prince of Nigeria, Doppelganger, Cole's Gate Demo, Crimson Rafflesia Demo, Mica: Apoptosis Demo
- Projects: Crimson Rafflesia, Mica: Apoptosis, Fantasy Euthanasia
- Organization: Soyasushi Productions
- Tumblr: CorenBaili
- Deviantart: CorenB
- Skype: coren.baili
- Contact:
Re: Showing quick menu only when text box out
Hmm, so do I just put "show_quick_menu" behind the characters who speak through the text box? Would that work?
FatUnicorn is it possible to show me the code you used to piece the quick menu to the text box?
FatUnicorn is it possible to show me the code you used to piece the quick menu to the text box?
- Kuroneko_rg
- Veteran
- Posts: 294
- Joined: Sat Oct 22, 2011 8:39 pm
- Projects: Dark Pleasures, Kiss of Blood, Midnight Park
- Organization: Black Cat Alleyway
- Location: Yomi
- Contact:
Re: Showing quick menu only when text box out
I don't know if this still matters, but this is how I did it. Also, this is my first time posting code, so I'll try to make this right.
There is a file under the "common" folder of renpy named "00statements.rpy". If you open it with jedit, you will find several
functions defined there. Here is the one that matters:
You can easily modify this, but it will break any other project that doesn't include a quick menu.
Instead, copy that code to make your own function below, or just use mine.
Now you have two functions. "window show" and "window hide" remains as always. "windowm show" and windowm hide" will
show and hide the quick menu alongside the textbox.
A last thing, if your quick menu now appears behind the textbox, you can easily fix this by adding zorder 1 in your screens
file.
There is a file under the "common" folder of renpy named "00statements.rpy". If you open it with jedit, you will find several
functions defined there. Here is the one that matters:
Code: Select all
# "window show" and "window hide" statements.
def parse_window(l):
p = l.simple_expression()
if not l.eol():
renpy.error('expected end of line')
return p
def lint_window(p):
if p is not None:
_try_eval(p, 'window transition')
def execute_window_show(p):
if store._window:
return
if p is not None:
trans = eval(p)
else:
trans = config.window_show_transition
renpy.with_statement(None)
store._window = True
renpy.with_statement(trans)
def execute_window_hide(p):
if not _window:
return
if p is not None:
trans = eval(p)
else:
trans = config.window_hide_transition
renpy.with_statement(None)
store._window = False
renpy.with_statement(trans)
renpy.statements.register('window show',
parse=parse_window,
execute=execute_window_show,
lint=lint_window)
renpy.statements.register('window hide',
parse=parse_window,
execute=execute_window_hide,
lint=lint_window)
You can easily modify this, but it will break any other project that doesn't include a quick menu.
Instead, copy that code to make your own function below, or just use mine.
Code: Select all
# "window show" and "window hide" plus quick menu statements.
def parse_windowm(l):
p = l.simple_expression()
if not l.eol():
renpy.error('expected end of line')
return p
def lint_windowm(p):
if p is not None:
_try_eval(p, 'window transition')
def execute_windowm_show(p):
if store._window:
return
if p is not None:
trans = eval(p)
else:
trans = config.window_show_transition
renpy.with_statement(None)
store._window = True
renpy.show_screen("quick_menu") #Here you include your quick menu screen
renpy.with_statement(trans)
def execute_windowm_hide(p):
if not _window:
return
if p is not None:
trans = eval(p)
else:
trans = config.window_hide_transition
renpy.with_statement(None)
store._window = False
renpy.hide_screen("quick_menu") #Include your quick menu here as well
renpy.with_statement(trans)
renpy.statements.register('windowm show',
parse=parse_windowm,
execute=execute_windowm_show,
lint=lint_windowm)
renpy.statements.register('windowm hide',
parse=parse_windowm,
execute=execute_windowm_hide,
lint=lint_windowm)
show and hide the quick menu alongside the textbox.
A last thing, if your quick menu now appears behind the textbox, you can easily fix this by adding zorder 1 in your screens
file.
Code: Select all
screen quick_menu:
zorder 1 #This works for me, but try higher values if it doesn't.
- Coren
- Mindscrew Driver
- Posts: 1691
- Joined: Fri Sep 18, 2009 9:24 am
- Completed: Dear Mariko, Six Rules, Ribbon of Green, RE: Prince of Nigeria, Doppelganger, Cole's Gate Demo, Crimson Rafflesia Demo, Mica: Apoptosis Demo
- Projects: Crimson Rafflesia, Mica: Apoptosis, Fantasy Euthanasia
- Organization: Soyasushi Productions
- Tumblr: CorenBaili
- Deviantart: CorenB
- Skype: coren.baili
- Contact:
Re: Showing quick menu only when text box out
Oh, thanks. Where can I copypaste the code?
Who is online
Users browsing this forum: Google [Bot], Ocelot