How can I make the quick menu semi-transparent?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Post Reply
Message
Author
User avatar
Chococo
Newbie
Posts: 5
Joined: Sun Aug 04, 2019 3:49 pm
Contact:

How can I make the quick menu semi-transparent?

#1 Post by Chococo » Sun Aug 04, 2019 4:11 pm

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.

trajano
Regular
Posts: 60
Joined: Sun Jun 16, 2019 7:59 pm
Github: trajano
Contact:

Re: How can I make the quick menu semi-transparent?

#2 Post by trajano » Mon Aug 05, 2019 10:18 am

You can set background colors with alpha.

User avatar
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: How can I make the quick menu semi-transparent?

#3 Post by Per K Grok » Mon Aug 05, 2019 12:26 pm

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



User avatar
Chococo
Newbie
Posts: 5
Joined: Sun Aug 04, 2019 3:49 pm
Contact:

Re: How can I make the quick menu semi-transparent?

#4 Post by Chococo » Sun Aug 11, 2019 2:03 pm

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?

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], minyan