Author Topic: NGUI Multiple Button Menus  (Read 2175 times)

TwistyD

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 10
    • View Profile
NGUI Multiple Button Menus
« on: June 23, 2014, 10:28:32 PM »
Hello,

I'm experienceing some problems with the UI Button Keys script.

The project I'm working on involves switching between multiple menus. When I activate one menu the selected "rect" or button thats scaled to indicate that it's selected doesn't move to the current menu that's activated. Also for a pause menu, the button I specified to start as selected isn't appearing as such when I play it. Is there a way to fix this issue?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI Multiple Button Menus
« Reply #1 on: June 24, 2014, 04:42:28 AM »
Did you set the onClick object on the UIKeyNavigation? That's what transfers selection when you click on something, and it can only be transferred to an object that's currently enabled.

TwistyD

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 10
    • View Profile
Re: NGUI Multiple Button Menus
« Reply #2 on: June 24, 2014, 07:38:07 PM »
I'm not exactly sure I did that. After searching through my scripts I didn't find a UIKey Navigation, only a UI Button Keys. On that one I didn't set the onClick on that one...is that what I should do?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI Multiple Button Menus
« Reply #3 on: June 25, 2014, 07:20:39 AM »
You need to update your NGUI.

TwistyD

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 10
    • View Profile
Re: NGUI Multiple Button Menus
« Reply #4 on: June 25, 2014, 08:32:33 AM »
Alright I've updated my NGUI I've set it up the way I had it last time plus what you've suggested...but the problem still persists

Heres an example, Say you have a game where you only use a controller or a keyboard, no mouse at all.In the game you have a menu that pops up wit ha button selected as the starting button. Upon the push of a button another menu pops up over that one. When that happens, I'd like the player to be able to control the



The green menu is the most recent menu, when this menu pops up, I want the player to be able to select things on the green menu. and when that menu disappears, the player would be able to use the start game menu.

Edit:Aaaaand I fixed the error. Turns out it was me needing to update and look at my buggy code. Thank you for your help either way ArenMook!
« Last Edit: June 25, 2014, 08:58:24 AM by TwistyD »