Hello everyone
what I'm trying to accomplish here is to create a tab table which can be managed externally. Right now I'm using XML to create a tree structure of nodes, which looks something like this:
root
⌊ Hong Kong
⌊ Causeway Bay
⌊ Kowloon Tong
⌊ Sha Tin
⌊ Kwai Fong
⌊ Wong Tai Sin
⌊ Japan
⌊ Tokyo
⌊ Osaka
⌊ Okinawa
⌊ Tokohama
⌊ England and Wales
⌊ Oxford
⌊ Cardiff
⌊ London
⌊ Lancaster Gate
⌊ Westminster
⌊ Knightsbridge
⌊ Bath
⌊ Salisbury
I created a perfab which is called tabContentPrefab, this prefab is responsible for creating rows inside the tab table. I have another prefab called tabPrefab, which is responsible for creating the tab itself.
Currently I am able to traverse all nodes and put them all inside a single row (that means only 1 tabContentPrefab), and the tab themselves are not "created" structurally like what the tree looks (like above).
Ultimately I want to achieve a dynamic tab table in which the whole structure is created at the start, including all children. The default "selected" tab will be the first child of each "branch". So the "default" look of the tab table should have 3 rows, with "Hong Kong" and "Causeway Bay" selected. When I select "England and Wales" then "London", an extra row will be created at real time and have "Lancaster Gate" selected as default.
Any idea or help will be greatly appreciated
ps. forgot the mention that I'm using Unity 3.5.7f6 and NGUI 2.6.4