Author Topic: UITables inside UIGrid  (Read 3898 times)

agentsmith666

  • Guest
UITables inside UIGrid
« on: May 24, 2013, 12:25:44 AM »
I'm trying to create a gui for my leaderboard:



I'd like each entry have a UITable (or if better a UIGrid) that contains various information (player name, number of deaths, score, etc) and stick that into a fixed grid (UIGrid) that can be scrolled vertically.  Is this an optimal approach or should I use something else? 

Thanks!
« Last Edit: May 24, 2013, 12:42:05 AM by agentsmith666 »

dlewis

  • Guest
Re: UITables inside UIGrid
« Reply #1 on: May 24, 2013, 12:56:07 AM »
I would go for a grid in a grid instead since you want things spread out evenly both vertically and horizontally.

Nseries

  • Guest
Re: UITables inside UIGrid
« Reply #2 on: May 24, 2013, 10:03:54 AM »
I have created a prefab for one row of labels

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UITables inside UIGrid
« Reply #3 on: May 24, 2013, 05:41:47 PM »
Yeah, create a prefab out of a single row, then instantiate this prefab over and over, modifying its data as needed.

Anshu

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Uitables
« Reply #4 on: February 28, 2014, 04:45:31 AM »
Plz tell me that how to sort the table items as different size wise not in alphabetically order


thank you

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UITables inside UIGrid
« Reply #5 on: February 28, 2014, 07:12:47 PM »
Everything is sorted alphabetically. If you want to re-use grid or table's sorting functionality, go through the children and name them something like "001", "002", "003", etc based on whatever logic you need.