Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: kittikun on February 18, 2014, 04:29:19 AM

Title: Grid/Table with alignement (UISmartGrid) + iOS Page Control (UIPageControl)
Post by: kittikun on February 18, 2014, 04:29:19 AM
Hi all,

Since a lot of people have been requesting a grid or table with can support alignement, I have attached "UISmartGrid" which offers the following features:

- Can be fixed or variable width
- Have a size
- Can be anchored
- Grid style can have offset between elements
- Orientation vertical or horizontal can be enforced
- be left/top or right/bottom aligned

Please beware of the following constraints:
- Center is not provided (my game didn't needed it "yet")
- Didn't tested much using with pivot

I made this yesterday so the code is probably messy. I will probably iron it up sometimes so you are using this at your own risk :)

I would appreciate if you could post any bug fixes you would have done and suggestions are more than welcome :)

In the zip file attached as a comment you will also find the following

- iOS style "Page control"
- Tween Anchor
- Tween Progress bar
Title: Re: Grid/Table with alignement (UISmartGrid)
Post by: ArenMook on February 18, 2014, 10:16:05 AM
Cool, thanks for sharing!
Title: Re: Grid/Table with alignement (UISmartGrid)
Post by: andreyd on February 19, 2014, 12:55:44 PM
Hi kittikun,

Great component. If possible I'd love to see the other components you mentioned as well as a sample scene that uses them.

Thanks a lot.
Title: Re: Grid/Table with alignement (UISmartGrid)
Post by: kittikun on February 19, 2014, 10:25:30 PM
You will find a sample scene for page control, new tweens should be explicit enough

I also had to include the various utility scripts to manipulate anchors, etc..
Title: Re: Grid/Table with alignement (UISmartGrid) + iOS Page Control (UIPageControl)
Post by: kittikun on March 24, 2014, 08:45:53 AM
Added support for center alignment

Title: Re: Grid/Table with alignement (UISmartGrid) + iOS Page Control (UIPageControl)
Post by: Aleksandr on March 24, 2014, 10:08:04 AM
Utility.GetChildren(transform); not found
Title: Re: Grid/Table with alignement (UISmartGrid) + iOS Page Control (UIPageControl)
Post by: wallabie on March 24, 2014, 08:34:21 PM
Awesome,  this is a much needed functionality that should be included as part of NGUI as an official example..
Title: Re: Grid/Table with alignement (UISmartGrid) + iOS Page Control (UIPageControl)
Post by: kittikun on March 24, 2014, 09:06:54 PM
Utility.GetChildren(transform); not found

Oops sorry, here it is an updated version including the method
Title: Re: Grid/Table with alignement (UISmartGrid) + iOS Page Control (UIPageControl)
Post by: Kafar on March 06, 2016, 12:10:18 PM
Hi,

Old thread but very interesting for me.

I tried to run these scripts with the NGUI latest version but I obtain this error: "Assets/NGUIExt/Editor/UIPageControlEditor.cs(10,33): error CS0115: `UIPageControlEditor.drawColor' is marked as an override but no suitable property found to override", anyone have used this PageControl?

Thanks