Page 1 of 1
How can I make the quick menu semi-transparent?
Posted: Sun Aug 04, 2019 4:11 pm
by Chococo
Hi everyone!
I really like the quick menu at the bottom of the screen, however it clashes quite heavily with my dialogue box.
Is there any way I can reduce the opacity of this menu?
Or even, is there a way I can make the quick menu appear only when the mouse is hovering over the bottom of the screen?
Any advice would be a great help.
Re: How can I make the quick menu semi-transparent?
Posted: Mon Aug 05, 2019 10:18 am
by trajano
You can set background colors with alpha.
Re: How can I make the quick menu semi-transparent?
Posted: Mon Aug 05, 2019 12:26 pm
by Per K Grok
Chococo wrote: ↑Sun Aug 04, 2019 4:11 pm
----
Or even, is there a way I can make the quick menu appear only when the mouse is hovering over the bottom of the screen?
-----
This code will make the quick menu go on/off on hovered/unhovered.
We have a new screen qOnOff. The area will need to be adjusted according to the size of your game screen. This one is for a 640x480 screen.
In screen quick_menu you need to take out 'if quick_menu:' and adjust the indent of the 'hbox:' after that.
You also need to take out
Code: Select all
init python:
config.overlay_screens.append("quick_menu")
default quick_menu = True
Finally you should have a 'show screen qOnOff' in label start.
Code: Select all
screen qOnOff():
mousearea:
area (0,450, 640, 30)
hovered Show("quick_menu")
unhovered Hide("quick_menu")
screen quick_menu():
## Ensure this appears on top of other screens.
zorder 100
#if quick_menu:
hbox:
style_prefix "quick"
xalign 0.5
yalign 1.0
textbutton _("Back") action Rollback()
textbutton _("History") action ShowMenu('history')
textbutton _("Skip") action Skip() alternate Skip(fast=True, confirm=True)
textbutton _("Auto") action Preference("auto-forward", "toggle")
textbutton _("Save") action ShowMenu('save')
textbutton _("Q.Save") action QuickSave()
textbutton _("Q.Load") action QuickLoad()
textbutton _("Prefs") action ShowMenu('preferences')
## This code ensures that the quick_menu screen is displayed in-game, whenever
## the player has not explicitly hidden the interface.
#init python:
# config.overlay_screens.append("quick_menu")
#default quick_menu = True
Re: How can I make the quick menu semi-transparent?
Posted: Sun Aug 11, 2019 2:03 pm
by Chococo
This is perfect. Exactly what I wanted. Thank you!
The only problem I have now is that whenever I click on one of the quick menu buttons (e.g. back) the menu disappears, so the mouse has to go out of the hover area, and re-enter it before the menu shows again. Is there a way to keep the menu there after a button is clicked?