Development > Newbie Coding

UI Adjustments.

<< < (8/17) > >>

bayo:
I update the parser to allow to edit at runtime cvar name embedded into a property. Then u must use last commits.

This syntax set the value of the cvar to the property. If the cvar change, the property do NOT change.

--- Code: ---*node:root.team.team_sld0_status@current = (*cvar:mn_tu0)
--- End code ---
It should work without parenthesis too, but i dont check it.

This syntax link the cvar to the property. If the cvar change, the property change.

--- Code: ---*node:root.team.team_sld0_status@current = "*cvar:mn_tu0"
--- End code ---

bayo:

--- Quote ---1. if the above is correct what is the syntax difference between getting V_CVAR and its value?
--- End quote ---
You can't get the cvarname from a property. Anyway, I dont think it mean something, cause it is an abstraction.


--- Quote ---2. how 'excluderect' work, if i place buttons on panel without a a background and exclude all of it, the buttons will keep receive mouse event, right?  (e.g. use ghost?)
also excluding a node, means that the node under it will receive the mouse event in order of creation with zone render being the last?
--- End quote ---
excluderect and ghost is the samething. The node will not receive events from the mouse. It is like there is not this node, then the parent node, or the node under it will receive the event.

In the case of bar:
* "readonly" property is more interesting
* "ghost" will do something like the same job, but without the right semantic
* "excluderect" on the full node size will do the same job as ghost, but it will be harder to manage


--- Quote ---3. how does the nodes capture zone is defined? a square by the pos/size or by the image (if present) because i seen few none square buttons?
--- End quote ---
Only with the box of pos and size, and all parents pos and size. It mean a node must be inside his parent box, else we can't click on it (and we can't see it too).

H-Hour:
The cvar thing works great. Thanks for the fast fix bayo.

bayo:
It looks (without parenthesis or quotes)

--- Code: ---*node:root.team.team_sld0_status@current = *cvar:mn_tu0
--- End code ---
now work like a link (same as syntax with quotes).

No idea if it is good or bad.

The quote syntax is not very nice, but i am sure the one without anything is ambiguous with the one with parenthesis.

mor2:
thanks bayo, yesterday i decided to move from the planing stage and actually do something (so i can better understand how it works and what is possible) for the first time i spent some time working on it instead of just brief looks at it, so after 3 hours of mostly rearranging the file to my liking i finished it, i now have a working bottom bar with all the graphics and basic functions i intend to add.

its actually more simple than i though, thou i am still uncomfortable with some of the syntax, for example can i do this:

--- Code: --- cmd "mn_modify *cvar:group +1 0 1;"
call *node:root.hudenable
--- End code ---
and if so, will this?

--- Code: --- onClick { cmd "actor_select (2 + (*cvar:group * 8)" }
--- End code ---
intended to work as either actor_select 2 or 10.



--- Quote ---In the case of bar:
* "readonly" property is more interesting
--- End quote ---
then i should use the 'readonly' instead of the current used 'disable' property?


also is there some kind of array declaration or any chance i am allowed to declare something like that:

--- Code: --- while (*cvar:i ...) {
*cvar:temp<*cvar:i> = 0
}
--- End code ---

because
*cvar:temp0=
*cvar:temp1=
...
*cvar:temp7=
is just so wasteful, when all i need is 3...  


and last, according to this the button node has very limited use for 64x64 buttons, any chance there is some kind of hidden property that allows me to set the size for example 120x60 or should i stick with image and keep playing with the texl texh.


EDIT: sorry last, last (i am not near the pc with script, so i do this from memory and stuff just keep poping up into my head)
in the battlescape UI we use container node i want to display the weapon, so supposedly this should work:

--- Code: ---displayammoofweapon true
--- End code ---
but it doesnt, why? i also checked the equipment script and it used a different node for that called baseinventory which has no documentation of but in the container comments its mentioned, so should i work with baseinventory then?


thanks.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version