Showing quick menu only when text box out
Posted: Thu Jul 12, 2012 9:08 pm
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?
Supporting creators of visual novels and story-based games since 2003.
https://lemmasoft.renai.us/forums/
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.
Code: Select all
screen say:
......
use quick_menu
screen quick_menu:
......
Code: Select all
screen say:
if show_quick_menu:
use quick_menu
label start:
$show_quick_menu=false
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.
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)
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)
Code: Select all
screen quick_menu:
zorder 1 #This works for me, but try higher values if it doesn't.