Development > Newbie Coding

UI Adjustments.

<< < (12/17) > >>

bayo:
You also need to update the code, and compile it, cause i fix the source code... or wait the nightly build, if it work.

unittest_nodeallocation.ufo use a component and create it dynamicaly.

mor2:
nice, i can sure save a lot of space on redundant config and make it more easily adjustable and readable.

as for the updated code, will this do or should i still wait for another day for more updated binaries?

btw, about onInit, i assume that it supposed to be called automatically upon creation but in that script unless i called it directly it never did  :-\

H-Hour:
I can't seem to figure something out by looking at the code and I'm hoping you can help me.

With the default hud, if I select the checkbox for crouch reservation and then change to another soldier, the checkbox updates to the new soldier's status (checked or not).

I can't seem to figure out how that's done. There are no cvars that I can find to check the status and update it. I've found the three confunc's that seem to do this in _hud.ufo:


--- Code: --- confunc crouch_checkbox_disable { }
confunc crouch_checkbox_clear { }
confunc crouch_checkbox_check { }
--- End code ---

These are overridden in hud.ufo with the following:


--- Code: --- confunc crouch_checkbox_disable {
*node:root.left.bt_crouch_reservation@disabled = true
}
confunc crouch_checkbox_clear {
*node:root.left.bt_crouch_reservation@disabled = false
*node:root.left.bt_crouch_reservation@current = 0
}
confunc crouch_checkbox_check {
*node:root.left.bt_crouch_reservation@disabled = false
*node:root.left.bt_crouch_reservation@current = 1
}
--- End code ---

But none of those seem to "know" the current status, and I can't find any nodes that actually call the confuncs. What am I missing?

mor2:
that because of what i told you before, its only a script they didnt exported all the function to us, only those that were needed, for example didnt you wonder how actor_select X works?

in this case its simple they have listeners, so in the event of change to specific params they are monitor an update functions are called. in this case the function called  HUD_RefreshButtons, which receives the current actor "information" (its located in cl_hud) and its calls the appropriate functions you know.

bayo:
it is one of ways to create abstraction between the ui scripts and the client code. If the protocole is well done, we can display information as we want and the client code dont care about the look and feel.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version