Hud in Foreground, really need help

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
creativechaos
Newbie
Posts: 9
Joined: Wed Apr 29, 2020 3:27 pm
Contact:

Hud in Foreground, really need help

#1 Post by creativechaos » Mon Oct 05, 2020 5:38 am

Hi,
I made a Hud (mobilephone, time ,energy ) but it doenst stay in the foreground. for example if there is a door which is clickable, the hud is behind the door/ partially visible.
how do i make it stay in the foreground until i say hide screen Hud?

After the intro i have put show screen hud, it works but if there is something to click on its in the background


Thanks a lot in advanced

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: Hud in Foreground, really need help

#2 Post by Per K Grok » Mon Oct 05, 2020 12:00 pm

creativechaos wrote:
Mon Oct 05, 2020 5:38 am
Hi,
I made a Hud (mobilephone, time ,energy ) but it doenst stay in the foreground. for example if there is a door which is clickable, the hud is behind the door/ partially visible.
how do i make it stay in the foreground until i say hide screen Hud?

After the intro i have put show screen hud, it works but if there is something to click on its in the background


Thanks a lot in advanced

You need to use zorder for your screens.
Higher zorder is drawn on top of lower.
Default a screen has zorder 0.

When two screens with the same zorder is called the one later called is drawn over the earlier called.

Code: Select all

screen hud():
    zorder 99

creativechaos
Newbie
Posts: 9
Joined: Wed Apr 29, 2020 3:27 pm
Contact:

Re: Hud in Foreground, really need help

#3 Post by creativechaos » Mon Oct 05, 2020 5:28 pm

Works perfectly. Thanks a lot!!!

Post Reply

Who is online

Users browsing this forum: mold.FF