Author Topic: Multi-panel versus multi-GUI setup  (Read 4167 times)

artician

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 54
    • View Profile
Multi-panel versus multi-GUI setup
« on: November 14, 2012, 01:37:14 PM »
Hello,

I have a few what-if questions that am about to test out, but thought I'd get some insight from the community as well.

I have been using multiple GUIs for my game, and at this point I have about 15+ that get activated/deactivate throughout play.  I thought it might be more efficient if I had instead used one GUI with multiple panels instead.  Experience using NGUI for a few months now has suggested that might be the way NGUI was intended to be set up to begin with.

Is there a recommended approach between these two?

Would it be possible, if all GUIs are the same archetype, and all render on the same layer, that I could simply drag all the panels from the various existing GUIs and place them under one common GUI?  I was hoping this would be possible to avoid having to reconstruct them, but I've had strange errors when duplicating GUI elements within one GUI before.

Anyone with any experience doing this?

Thanks in advance for any tips and assistance.

JRoch

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 140
    • View Profile
Re: Multi-panel versus multi-GUI setup
« Reply #1 on: November 14, 2012, 02:33:47 PM »
It's kind of hard to know what you mean from how you're describing it and not having any examples of your work to go by.  Plus, I'm not sure to what you're referring when you say "GUI", as it could potentially refer to a lot of different concepts.

In general, there are a lot of different ways you can do something technically good, yet still be a crappy UI that is hard to use or understand.  The reverse it also true.  So whether you have one interface with lots of tabs or panes, or several interfaces with custom presentation per instance depends entirely upon your needs, design, and presentation.

artician

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 54
    • View Profile
Re: Multi-panel versus multi-GUI setup
« Reply #2 on: November 14, 2012, 03:34:13 PM »
By GUI I mean GUI in the same context that NGUI uses it.  One GUI-Anchor-Camera-Panel setup each.

My GUIs are all very basic, using one 'screen', sometimes two but that is the absolute most.  Most are for player feedback.  Only two have interactive elements, which simply toggle sprites.

If I went with the multi-Panel route, I'd toggle on and off those panels that are necessary.  Only one GUI/Panel would be active at any time.  It's basically the same setup I am using now, via toggling on/off whole GUIs rather than just the Panels. 

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Multi-panel versus multi-GUI setup
« Reply #3 on: November 14, 2012, 05:19:53 PM »
Whoa, you have 15+ different camera setups? Why? You should have only one UI setup, and multiple panels underneath that you enable/disable at will.

artician

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 54
    • View Profile
Re: Multi-panel versus multi-GUI setup
« Reply #4 on: November 14, 2012, 06:05:46 PM »
Thank you ArenMook, that's exactly why I asked.  I'm glad to have confirmation one way or the other.

Any comment on whether Panels are draggable/droppable between GUI entities of the same setup?

« Last Edit: November 14, 2012, 06:07:22 PM by artician »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Multi-panel versus multi-GUI setup
« Reply #5 on: November 14, 2012, 06:58:00 PM »
For any drag & drop inquiries, check the drag & drop example. It only uses one camera.

artician

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 54
    • View Profile
Re: Multi-panel versus multi-GUI setup
« Reply #6 on: November 15, 2012, 11:35:59 AM »
For any drag & drop inquiries, check the drag & drop example. It only uses one camera.

Actually I meant while authoring.  Meaning can I reparent existing Panels and their children beneath another GUI's anchor, by dragging them directly in the Hierarchy view, or will there be residual issues from that.

Thanks for your help!  This is a lot easier than testing it myself because I'm afraid the scripting changes would kill me.

artician

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 54
    • View Profile
Re: Multi-panel versus multi-GUI setup
« Reply #7 on: November 15, 2012, 09:27:41 PM »
I went ahead and completed the changes.  I can say that it is possible to simply grab Panels (with all their child elements) and drag them to different GUI entities in the scene. 

The only "bug" that I encountered was that the new parent GUI entity's Camera changed it's Event Receiver Mask back to Default after I placed the other Panels beneath it.  This has happened to me once before and caused a good amount of confusion on my end, but I couldn't reproduce it then.  Maybe you'll have more luck if it's something you want to fix.

Thanks for the help.