Development > Newbie Coding

UI Adjustments.

<< < (13/17) > >>

H-Hour:
Yes, I know not everything is available. But the UI system is always changing and I find it's best not to make assumptions about what is and is not possible.

@bayo: I can use the existing checkbox for the crouching I think, but I'd like to handle the reservation of tu for firing (none/single/multi shot) differently. Would it be a lot of work to handle this as I suggested in this feature request, or would it be better if I worked up an example to show you what I want to do?

bayo:
BTW if you use custombutton or radiobutton on your local scripts please check http://ufoai.ninex.info/wiki/index.php?title=UI_node_behaviours/2.4-dev&curid=6254&diff=35338&oldid=35334 and use "background" instead of "image" and "texl". I will soon remove this old way to define a background, cause it is to hard to manage, it create useless constaints, and it is not flexible.

Here an example for radiobutton http://ufoai.git.sourceforge.net/git/gitweb.cgi?p=ufoai/ufoai;a=commitdiff;h=a08255e047ef41f956ee7020b7c96206a2f1ca50
I extract all current button background to base/pics/buttons.

H-Hour:
Here is an image showing what I want to accomplish with the reaction fire reservation buttons.

mor2:
then you are looking at the wrong functions, a.hud already does this, here what you need:

--- Code: --- confunc startreactionmany { }
confunc startreactionmany_impos { }
confunc startreactiononce { }
confunc startreactiononce_impos { }
confunc deselect_reaction { }
confunc disable_reaction { }
--- End code ---
just make it a radio button and flip states, its easy.

p.s. great looking graphics, "pixel hack" my ass,  compared to me you are a grand master ;D

mor2:
i still dont understand the difference between the syntax *cvar:i and <cvar:i> the first is a reference the second is its value
or is < > used to inject data into a string for example  "actor_select <cvar:i>;" mayne something instead the old "actor_select" + string(<cvar:i>) +";"

and what does "*cvar:i"  or is it "<cvar:i>" means, that you ask to do, pass the info as a string  ???


also when i pass it as parameter, if use:
call *node.root.whatever (*cvar:i)

func whatever{
*node.root.radiobutton@cvar = <1>  its ok because i assign the reference as needed but then how do i pass it value in onClicK?
*node.root.radiobutton@onClick = { cmd "actor_select <1>;" } this doesnt work.

should i call it like this  ???
*node.root.radiobutton@onClick = { cmd "actor_select <<1>>;" }


also can i use  call *node.parent.parent.function  or *node.parent@parent.function  or something like it?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version