Screens for navigation and UI

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
wannabedamned
Newbie
Posts: 9
Joined: Wed Jun 21, 2017 6:46 am
Contact:

Screens for navigation and UI

#1 Post by wannabedamned »

So the way I have my game at the moment is I have a screen that displays a hbox which contains imagebuttons and hotspots for navigation.

However due to the inability within renpy to show layered multiple screens at the same time, I'm having to repeat code for the GUI I have displayed.

I have a hbox for time, a hbox for the player portrait and I have a hbox for a current stat on display.

Inorder to have these 3 hboxes on display at all navigation points, i'm having to add the full code to the end of every navigation screen, even though the navigation screen is the only thing that changes.

Is there a way for me to create the 3 hboxes at the start of the code and call to them?

I'm trying to condense down my code for better use, as I have a lot of it already and I'm only just through the prologue for my game.

I do suppose the good news is, the game works perfectly! even if it is a little bulky! :mrgreen:

User avatar
carrot
Regular
Posts: 28
Joined: Fri Jul 28, 2017 7:43 am
Contact:

Re: Screens for navigation and UI

#2 Post by carrot »

I'm not sure what you mean about renpy not being able to show more than one screen at once. If you check the docs you can see it says "more than one screen can be shown at a time."

SundownKid
Lemma-Class Veteran
Posts: 2299
Joined: Mon Feb 06, 2012 9:50 pm
Completed: Icebound, Selenon Rising Ep. 1-2
Projects: Selenon Rising Ep. 3-4
Organization: Fastermind Games
Deviantart: sundownkid
Location: NYC
Contact:

Re: Screens for navigation and UI

#3 Post by SundownKid »

wannabedamned wrote: Thu Aug 03, 2017 9:14 am However due to the inability within renpy to show layered multiple screens at the same time, I'm having to repeat code for the GUI I have displayed.
It can, though...

wannabedamned
Newbie
Posts: 9
Joined: Wed Jun 21, 2017 6:46 am
Contact:

Re: Screens for navigation and UI

#4 Post by wannabedamned »

I have no idea where I got the idea that it couldnt from...

Looking at that page I just need to create a screen with a frame, add in my hboxes and call to it.

Is there an emoticon for being confused haha, because I've genuinely had that imaginary limitation stuck in my head from the beginning!?

wannabedamned
Newbie
Posts: 9
Joined: Wed Jun 21, 2017 6:46 am
Contact:

Re: Screens for navigation and UI

#5 Post by wannabedamned »

Well, My code just lost about 50 lines, and still functions perfectly. Excellent!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]