TOUR
PRICING
HELP
Stencylpedia
Blocks Guide
Sample Games
Developer Center
FORUMS
CHAT
#MADEINSTENCYL
EDUCATION
SIGN IN
×
Welcome back!
Username or E-mail
Password
(
Forgot?
)
C
OMMUNITY
Home
Issue Tracker
Inbox [0]
New Posts
New Replies
Search
Stencyl Community
→
Stencyl
→
Ask a Question
→
Creating a Common UI Across Levels
Pages:
1
Creating a Common UI Across Levels
ashes999
Posts: 9
October 23, 2012, 03:38:07 am
First, apologies if this is addressed in the Stencylpedia -- I went through the crash courses and didn't find the answer to this there.
How do I create a UI that's common across all levels, without duplicating it into each level?
Simply: if you look at Balls in Space, all rooms have the following elements right at the top:
- Room #
- Achievements button
- Mute/Menu button
How exactly did they do that?
Hectate
Posts: 4643
October 23, 2012, 06:19:39 am
If the behavior to control GUI elements is a Scene Behavior, then you just attach it to all the scenes that require that GUI. For example, in Balls in Space the buttons are created by a behavior attached to the scene, but only the level scenes and not the main menu, etc.
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.
ashes999
Posts: 9
October 23, 2012, 06:35:57 am
Ah, interesting. I'll try that out and see how it pans out; thanks.
I assume you mean, they created a behaviour which contained three buttons and the text field -- and not three separate behaviours.
I'm used to thinking in terms of "this class creates all the stuff for the level" and having UI in one place. It's a bit strange that there's no concept of a HUD or GUI in Stencyl.
Pages:
1