Hi,
I think you got most covered...only the variable is in the wrong "location"; your:
default quick_showing = False
is a "screen"-variable...
the (RenPy-default):
default quick_menu = True
is a "store"-variable, but as you want to use Rollback this will never be of any help...
I would use a "persistent"-variable (in fact I would use 2)
something along this
Python:
init python:
if persistent.quick_explained is None:
persistent.quick_explained = False
if persistent.show_quick is None:
persistent.show_quick = True
if persistent.quick_explained:# == True
persistent.show_quick = False
you can skip the "quick_explained", but as most RenPy-players expect a quick-menu to be there,
I'd say it's worth to at least explain once that its normally being hidden...e.g.
Python:
label start:
"dev" "I hide the quick-menu, blah!"
$ persistent.quick_explained = True
Now what to do with it...
1st don't touch the screen.rpy from RenPy-SDK, make your own .rpy (e.g. myscreens.rpy), this way changing from one to another RenPy-version becomes much more easy in the future!
2nd we want to get rid of the original quick-menu, and now we're back to RenPy's store-var
default quick_menu = True
just do e.g. in myscreens.rpy
Python:
init 3:
quick_menu = False
not too nice, but should do...
then your screens
Python:
screen quick_menu_display():
zorder 100
modal False
if persistent.show_quick:# == True
hbox at true_smooth_fade:
style_prefix "quick"
xalign 0.5
yalign 0.98
spacing 0
textbutton _("Back") action Rollback()###TODO LATER!
textbutton _("History") action ShowMenu("history")
#[...]
###and your activator
screen qm_activator():
zorder 100
modal False#should be said, tho it's by default False, irrc
mousearea:
xysize (1920, 90)
yalign 1.0
hovered SetField( persistent, "show_quick", True )# show quick menu
unhovered SetField( persistent, "show_quick", False )# hide quick menu
###and putting both in overlay
init python:
config.overlay_screens.append( "quick_menu_display" )
config.overlay_screens.append( "qm_activator" )
you already have all that!
and that was the easy part;)
you want the qm still visible when you do a Rollback(btw. why?)
well most easy is if player clicks on your "Back"-button...you see the###TODO?
we change to:
Code:
textbutton _( "Back" ) action [ SetField( persistent, "show_quick", True ), Rollback() ]###done1
problem is...when player moves the mouse out of the mousearea the unhovered action is being done and your qm is being hidden again...
but maybe this is what you want?
else we would need another variable to set...
AND player still could press "PageUp" on his keyboard...do you want to show your quickmenu on every Rollback-event?(even when the mouse is not inside the mousearea?)
(I think I've seen something like a Rollback-callback, but I my mind may be playing tricks too...you still could re-define the "keyboard"-action, but that sounds like overkill too...)
hmm, this got more complicated than I thought at first...
maybe describe more what you want(?)
(or some1else has a better idea)
greets Mattock
(ignored transformation and stuff, and all written "on-the-fly"! beware of typo's!)
EDIT: IF this works to your liking: don't forget to make a
Python:
screen quick_menu_display():
variant "touch"
#[...]
#and
screen qm_activator():
variant "touch"
#[...]
#too!!! else those never will get a quick-menu!!!