Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: apologue on August 30, 2012, 08:00:47 PM

Title: iOS Popup Window Scrollview with Dynamic buttons
Post by: apologue on August 30, 2012, 08:00:47 PM
Hi there,

We currently use a Popup List to provide navigation to different sections of an app. However the list has grown too long and we would like to instead create a button that pops up a window that contains a scrollview list of selectable buttons that are dynamically generated based on what area of the app they are in.

We would like the window to popup and cover the screen they start from. When they select an item the window will close and the information will be displayed for their selection.

What is the best way to achieve this?


Thank you in advance  :)
Title: Re: iOS Popup Window Scrollview with Dynamic buttons
Post by: ArenMook on August 30, 2012, 08:02:28 PM
New panel, offset -Z so that it's closer to the camera, with a background (sliced sprite or tiled sprite) covering a large area, with a collider on it so that it intercepts clicks.
Title: Re: iOS Popup Window Scrollview with Dynamic buttons
Post by: apologue on August 31, 2012, 08:50:07 AM
Thanks! - What is the syntax for creating a button in c#? I have placed static elements on manually, but now am getting into generating them dynamically.
Title: Re: iOS Popup Window Scrollview with Dynamic buttons
Post by: ArenMook on August 31, 2012, 02:23:35 PM
UICreateWidgetWizard.CreateButton does what you're looking for. Line 284 of UICreateWidgetWizard to be more precise.
Title: Re: iOS Popup Window Scrollview with Dynamic buttons
Post by: apologue on September 25, 2012, 09:34:53 PM
Thank you very much for your help! This project is being released in the App Store soon and I'll be sure to post. It would not have come together without NGUI and this has been such a lifesaver :)