General > User modifications
Lazy battlescape HUD
homunculus:
Another curiosity:
--- Code: --- confunc updateLevelStatus
{
*node:parent.controls.level.scroll@left = ((*cvar:cl_worldlevel * 50) / (*cvar:cl_maxworldlevel + 1))
// when i increase level from 0 to 1, i get this (and a crash):
// UI_GetNodeAbsPos: Node 'hud_wheel.controls.level.scroll' position 12.500000,0.000000 is not integer
}
--- End code ---
--- Quote ---left V_FLOAT Left position of the node (see also pos)
--- End quote ---
If 'left' and 'top' can be set as floats, it seems like those could be used as a way to enter 'pos' safely even if they might not be integers (seems the other way round atm--a way to enter invalid 'pos').
Probably same about 'width' and 'height', but didn't try those yet.
Any way I could force it to be int in my scipt?
bayo:
I dont remember a function to round the number
bayo:
--- Quote from: geever on December 26, 2011, 10:53:49 pm ---[...] and don't know if the auto-generated behaviour pages are really auto-generated, or generated by scripts a year ago or before...
--- End quote ---
I update the documentation and add comment into the page to explain how to update it. I also can create a script to autoupdate it, but not sure it is need.
homunculus:
--- Code: --- cmd "ui_addcvarlistener mn_rweapon_item testlistener;"
--- End code ---
Could not register change listener, cvar 'mn_rweapon_item' wasn't found
not that it would be the only way to do it.
bayo:
everything is on the comment.
listener do not work when:
* cvar do not exist and created later
* cvar is deleted and created again
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version