Author Topic: Traditional data table Possible?  (Read 4826 times)

Bronco78th

  • Guest
Traditional data table Possible?
« on: September 30, 2012, 06:21:40 PM »
Hi There!

I would like my game to have a screen which displays the stats and status's of all the ships in the game. This will be several hundred at a time.

Im just trying to nail the UI and im struggaling to see how to impliment this.

The attached screenshot shows the kind of thing im after. The displayed data would chnage and update at runtime. This is no problem. Its just the UI aspect im not sure how to impliment effeciently. (ill make my atlas soon, jsut using Scify with no borders to play with for now).

To do what I have in the screen shot. I have:-

UITable1(headings)
-lab1
-lab2
-lab3
-lab4
UITable1 (Row 1)
-lab1
-lab2
-lab3
-lab4
UITable2 (Row 2)
ETC

This seems awefully ineffecient or is this the correct way of doing it?

Regards,

John


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Traditional data table Possible?
« Reply #1 on: September 30, 2012, 07:50:49 PM »
One table (or better yet -- a grid) with 1 column. Each row is a separate entry created from a prefab. This prefab should be manually created by you -- what a single row should look like. To change the data, have a script attached to this row referencing the labels (lbl1, lbl2, etc), and when you instantiate the row -- set the data.

3xbs

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Traditional data table Possible?
« Reply #2 on: May 16, 2014, 03:19:50 AM »
is this in 2014 the best way to do it or is this way deprecated

( i want to display 2 mysql database row's (with 30+ coloumns) that are in a Datatable object )

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Traditional data table Possible?
« Reply #3 on: May 16, 2014, 01:26:36 PM »
Yes, it still stands. The grid hasn't changed much.

3xbs

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Traditional data table Possible?
« Reply #4 on: May 17, 2014, 03:09:09 AM »
ok thank you :)

here's a good tutorial for it (and my problem  ;) )

https://www.youtube.com/watch?feature=player_detailpage&v=B66xhIvYF00#t=1373
NGUI 3.0.7 Tutorial
24:54