Development > Newbie Coding
UI Adjustments.
mor2:
that perfect! and the example on line 66 is exactly what i needed, i assume its ( "name", "node type")
btw i think you already linked me to this git site, but i just didnt noticed this example and had to suffer foolishly reinventing the wheel :-\
anyway thnaks, i'll try implementing some of the stuff on my next shift.
mor2:
ok worked like a charm, i got 60 lines instead of 350 lines ;D if only i could do the same with reset ...
few questions:
1. according to this the val indicates which button is selected.
but the example suggest that it also allow to set it (onInit)
if so, what happens when its selected? the icons updated on all the radio buttons?
and if i dont use those icons and want to set my own sequence, can i use onchange function?
for example if @cvar:radio1 ==2 and i set it to @cvar:radio1=1
will it trigger onchange on both 1,2 buttons so i can draw change their state?
2. huddisable called when soldier die?
thanks.
bayo:
1) onChange is only call when the user do an action on the radiobutton. If you change the cvar with"hands" it will not call any callback events, but radiobuttons will look like right.
--- Quote ---if i dont use those icons and want to set my own sequence
--- End quote ---
I dont really understand what you mean.
2) yes, i think
mor2:
i want to change the bar_teambox's, to show which one selected, so i need to change the previous selected and the currently selected one.
manually, i can:
call *node:wahtever:select <cvar:radio1> false
*cvar:radio1 = 2
call *node:wahtever:select <cvar:radio1> true
question is what does the user action prompts, onChange only on the newly selected button or on the old one as well?
if only on the new one, i have a problem because i need to unselecte the old one and i dont know which one it is...
i can use something like the bar_selbox or another cvar but i dont want to before i checked this out.
2. how can i check if <1> argument was received?
bayo:
onChange is only send to the clicked node.
You should check althud code, maybe it use something like that.
2) you only can check internal function with a debuger, there is no trace. If you talk about a script function you can use thing like cmd "echo --> <1>". If you want to support random param number, you can use paramcount (there is no documentation, but u can check unittest/ufos/uitest/test_action2.ufo)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version