Development > Newbie Coding

UI Adjustments.

<< < (3/17) > >>

bayo:
/contrib/scripts/ui/examples/unittest_bar.ufo contain example of bar

mor2:
and since its better to mess around with game dir, where is homedir?

p.s.

--- Quote ---* We can access any nodes
*node:pathofthenode@invis = true
--- End quote ---
what i meant is that it looked like if i go high enough, i'll find that every node constructor creates a global variable with the same name holding a pointer to it, which is why i can basically access everything...

bayo:
For dir, run the game and check the logs below "---- filesystem initialization -----".


--- Quote ---what i meant is that it looked like if i go high enough, i'll find that every node constructor creates a global variable with the same name holding a pointer to it, which is why i can basically access everything...
--- End quote ---
I am not sure i understand the image. Each nodes have an unique identifier called "path" (constructed with names of all parents), and we can use this path to access to the node.

mor2:

ok, then speaking of node path, how does call function works? for example here when called from hud?


--- Code: ---     onClick {
if (*path??:hudinv@visiblewhen) {
call *node:root.showinventory
} else {
call *path??:hudinv.hideinventory
}
}
--- End code ---

what is the path?

geever:

--- Quote from: mor2 on October 21, 2010, 11:21:16 pm ---what is the path?

--- End quote ---

UI path: *node:windowname.nodename or *node:windowname.panelname.nodename, you can use root and parent tokens as reference like *node:parent.nodename.

You should really check our current UI scripts. they're very informative and easy to understand IMHO.

Basedefence UI is a good example IMHO, it's quite new so uses the newest features


-geever

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version