Author Topic: Grid/Table with alignement (UISmartGrid) + iOS Page Control (UIPageControl)  (Read 8935 times)

kittikun

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 5
  • Posts: 46
    • View Profile
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
« Last Edit: February 20, 2014, 12:57:29 AM by kittikun »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Grid/Table with alignement (UISmartGrid)
« Reply #1 on: February 18, 2014, 10:16:05 AM »
Cool, thanks for sharing!

andreyd

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 18
    • View Profile
Re: Grid/Table with alignement (UISmartGrid)
« Reply #2 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.

kittikun

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 5
  • Posts: 46
    • View Profile
Re: Grid/Table with alignement (UISmartGrid)
« Reply #3 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..

kittikun

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 5
  • Posts: 46
    • View Profile
Added support for center alignment


Aleksandr

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
Utility.GetChildren(transform); not found

wallabie

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 200
    • View Profile
Awesome,  this is a much needed functionality that should be included as part of NGUI as an official example..

kittikun

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 5
  • Posts: 46
    • View Profile
Utility.GetChildren(transform); not found

Oops sorry, here it is an updated version including the method

Kafar

  • Newbie
  • *
  • Thank You
  • -Given: 10
  • -Receive: 0
  • Posts: 27
    • View Profile
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