HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: [Resolved] Make the GUi show up in play instance?  (Read 2427 times)

lileebeta

  • General Accounts
  • *
  • Posts: 48
    • View Profile
[Resolved] Make the GUi show up in play instance?
« on: Oct 05, 11, 06:04:41 PM »

Hey how are you?
Can I ask you something?
In making a GUI, I create my buttons and windows, then I put a texture on them and make them perfect and pretty.
But after I save them to the repository and close the editor they "disappear"?
How can I make them render, or at least  show up during game play instances, and or, game edit intances?
Thanks!
« Last Edit: Nov 02, 12, 09:10:04 PM by HE-Cooper »
Logged

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: Make the GUi show up in play instance?
« Reply #1 on: Oct 05, 11, 07:12:05 PM »

Super, thanks for asking!

Creating/editing a gui control in the editor only defines the prototype for it.  Like any other node, you still need to then create a node from that prototype in code and then set the build field to true.  You can potentially set properties of the control itself if you like before building it, but no child controls are created until the parent is built, so manipulating them would happen after build = true.

If a control is set as visible, then it will become visible when it is built, unless inheriting from a parent makes it invisible.  Note also the layer field of controls. If a control is not parented explicitly to another one, it will be a child of its layer, and if no layer is specified, then it goes on the one called "default".
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

lileebeta

  • General Accounts
  • *
  • Posts: 48
    • View Profile
Re: Make the GUi show up in play instance?
« Reply #2 on: Oct 05, 11, 08:14:16 PM »

Cool- a few more steps deliniated- great. Now, how do I create a node from the prototype control that I created via the GUI Editor?
Cheers.
Logged

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: Make the GUi show up in play instance?
« Reply #3 on: Oct 05, 11, 09:19:33 PM »

Client script _GUICSSCharacterSelectionClassMethods show one example.  Setting properties may not be needed, as most things can be set ahead of time in the editor.  Setting them in code is more for dynamic things that you won't know until runtime.
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.