"Pinning" dialog box & other elements to the bottom of the screen

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
sonictoad
Regular
Posts: 30
Joined: Tue Mar 12, 2019 10:39 pm
Projects: It's Different When It's Your Own
Organization: Sonic Toad Media LLC
itch: nyhcmaven84
Location: Bronx, NY
Contact:

"Pinning" dialog box & other elements to the bottom of the screen

#1 Post by sonictoad »

I'd like to keep my dialog box and a few other GUI elements-- main menu button, and phone icon for the smartphone GUI-- displayed on the in-game screen at all times, but searched the manual and can't see how to do this.

User avatar
Somniarre
Newbie
Posts: 2
Joined: Fri Jul 31, 2020 1:26 pm
Github: shawna-p
itch: feniksdev
Contact:

Re: "Pinning" dialog box & other elements to the bottom of the screen

#2 Post by Somniarre »

For the dialogue box, you can look into `window show` -- I'd put this at the start of your script so it remains on-screen. If you have your own GUI elements, you'll likely need to define a screen for them and then at the beginning of your script write `show myscreen` and it should remain on-screen during your game unless you explicitly hide it.

User avatar
sonictoad
Regular
Posts: 30
Joined: Tue Mar 12, 2019 10:39 pm
Projects: It's Different When It's Your Own
Organization: Sonic Toad Media LLC
itch: nyhcmaven84
Location: Bronx, NY
Contact:

Re: "Pinning" dialog box & other elements to the bottom of the screen

#3 Post by sonictoad »

Thanks!! Found the section of the manual that deals with this, though I'm trying to find out how to toggle visibility for load/save in addition to the smartphone GUI.

User avatar
zankizuna
Veteran
Posts: 416
Joined: Fri May 04, 2012 2:20 am
Completed: Monochrome Valentine
Projects: Softwar
Deviantart: raseru09
itch: ZanKizuna
Location: Manilaaaaaaaa
Contact:

Re: "Pinning" dialog box & other elements to the bottom of the screen

#4 Post by zankizuna »

you mean the quick_menu?
quick menu is a screen in screens.rpy that has Save, Load, etc buttons
and a
```
if quick_menu:
```

if you set quick_menu to False, it will hide.
the code to toggle would be

$ quick_menu= not quickmenu
Last edited by zankizuna on Wed Sep 02, 2020 9:51 pm, edited 1 time in total.

User avatar
sonictoad
Regular
Posts: 30
Joined: Tue Mar 12, 2019 10:39 pm
Projects: It's Different When It's Your Own
Organization: Sonic Toad Media LLC
itch: nyhcmaven84
Location: Bronx, NY
Contact:

Re: "Pinning" dialog box & other elements to the bottom of the screen

#5 Post by sonictoad »

zankizuna wrote: Mon Aug 31, 2020 12:48 pm you mean the quick_menu?
quick menu is a screen in screens.rpy that has Save, Load, etc buttons
and a
```
if quick_menu:
```

if you set quick_menu to False, it will hide.
the code to toggle is would be

$ quick_menu= not quickmenu
ah, if I toggle that, it'll just make the Save/Load buttons visible? because I also want to get rid of that little row of commands for "official" builds!
I got the dialog box to stick, just need to figure out this part along with a bespoke asset for a smartphone GUI I'm still working on.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: "Pinning" dialog box & other elements to the bottom of the screen

#6 Post by Imperf3kt »

Can you put up a screenshot of which part you're talking about, preferably circled. I would have said the quick menu as well, but after your latest reply I'm not sure.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
sonictoad
Regular
Posts: 30
Joined: Tue Mar 12, 2019 10:39 pm
Projects: It's Different When It's Your Own
Organization: Sonic Toad Media LLC
itch: nyhcmaven84
Location: Bronx, NY
Contact:

Re: "Pinning" dialog box & other elements to the bottom of the screen

#7 Post by sonictoad »

Imperf3kt wrote: Mon Aug 31, 2020 11:06 pm Can you put up a screenshot of which part you're talking about, preferably circled. I would have said the quick menu as well, but after your latest reply I'm not sure.
Here's a Canva illustration I made where I color-coded what needs to be fixed. Pardon the messy placeholders (except Kate, who's finished, vectored, and looking fabulous.)

the red box on the bottom is that little row of commands (load/save/back/history/etc) which is hard to see on the placeholder BG.

the pink outlines are where I'd want the load and save buttons to go, along with possibly a third button containing some other info.

Green phone is where the access to the phone GUI would go, and I'd want it to change from its default icon to one with a red alert dot in the corner when Kate's got a message and it's not a simple scripted event done through the dialog box.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: "Pinning" dialog box & other elements to the bottom of the screen

#8 Post by Imperf3kt »

Okay so you are talking about the quick menu.
As suggested above, you can remove it by adding

Code: Select all

$ quick_menu = False
somewhere in your script, likely as the very first thing after label start:
Alternatively, you can set the following config to False

Code: Select all

default quick_menu = True
Or you can find the screen entitled "quick_menu" and delete it / its contents entirely. (note that deleting the screen entirely will trigger an error, as Ren'Py won't be able to find a screen it expects)

If you want the quick menu only at certain times, you can either toggle it via the above python method (set it True / False when needed) or add an additional condition to the if/else in the screen itself:

Code: Select all

    if quick_menu:
        stuff currently in the menu
    
    else:
        Stuff you want to show at other times.
Note that the quick menu has a "mobile variant", which is defined elsewhere in screens.rpy and will make your menu appear different on a mobile compared to a PC.


Lastly, you could just delete the lines

Code: Select all

init python:
    config.overlay_screens.append("quick_menu")
Regarding the pink outlined areas, you can just place some buttons in a screen and show that screen (the quick_menu is a handy screen for this, or you could make your own)
If you require help creating such a screen, I could help further.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
sonictoad
Regular
Posts: 30
Joined: Tue Mar 12, 2019 10:39 pm
Projects: It's Different When It's Your Own
Organization: Sonic Toad Media LLC
itch: nyhcmaven84
Location: Bronx, NY
Contact:

Re: "Pinning" dialog box & other elements to the bottom of the screen

#9 Post by sonictoad »

Imperf3kt wrote: Wed Sep 02, 2020 3:10 am Okay so you are talking about the quick menu.
As suggested above, you can remove it by adding

Code: Select all

$ quick_menu = False
somewhere in your script, likely as the very first thing after label start:
Alternatively, you can set the following config to False

Code: Select all

default quick_menu = True
Or you can find the screen entitled "quick_menu" and delete it / its contents entirely. (note that deleting the screen entirely will trigger an error, as Ren'Py won't be able to find a screen it expects)

If you want the quick menu only at certain times, you can either toggle it via the above python method (set it True / False when needed) or add an additional condition to the if/else in the screen itself:

Code: Select all

    if quick_menu:
        stuff currently in the menu
    
    else:
        Stuff you want to show at other times.
Note that the quick menu has a "mobile variant", which is defined elsewhere in screens.rpy and will make your menu appear different on a mobile compared to a PC.


Lastly, you could just delete the lines

Code: Select all

init python:
    config.overlay_screens.append("quick_menu")
Regarding the pink outlined areas, you can just place some buttons in a screen and show that screen (the quick_menu is a handy screen for this, or you could make your own)
If you require help creating such a screen, I could help further.
thanks so much! I'll give this a shot. and actually, if you can help with other UI stuff, can you contact me through my website? (Head to sonictoad.com, I got a contact box.)

Post Reply

Who is online

Users browsing this forum: No registered users