UFO:Alien Invasion

Development => Newbie Coding => Topic started by: mor2 on October 20, 2010, 10:41:45 pm

Title: UI Adjustments.
Post by: mor2 on October 20, 2010, 10:41:45 pm
i decided to see what does it take to make UI Adjustments, i think it will be more productive if i know what we work with.

i have found and extracted  0pics.pk3 file, few questions:
1. hud vs althud?  and besides those two and UI is there any other relevant folders?
3. if i want to try new textures all i have to do is replace the originals? is there some kind of mod mechanic that i can place my file with different textures that will be loaded instead. (easier than working with 170MB file)
3. scripts? where they are located? C++? do i need to compile the game if i change them? if so anyway to compile only that section because compiling the whole game will send my laptop to early retirement  ::)

EDIT:
4. is there any documentation?
Title: Re: UI Adjustments.
Post by: H-Hour on October 20, 2010, 11:39:39 pm
For new graphics, simply slot new image files over the existing image files you find in /base/pics.

Hud or Alt Hud depends on which configuration you want to deal with. The Hud is only the battlescape UI.

Documentation of the menu system is in the wiki (http://ufoai.ninex.info/wiki/index.php/Create_menu).
Title: Re: UI Adjustments.
Post by: mor2 on October 21, 2010, 12:08:24 am
Quote
Create the images for this menu (in base/pics)
Create the script files for this menu (in base/ufos/ui)

so if i understand to overwrite an existing menu i need to place it in base/pic
which is where the game will look for it by default otherwise it will load the 0pics.pk3

and i assume the 0ufos.pk3 hides the current ui?
Title: Re: UI Adjustments.
Post by: mor2 on October 21, 2010, 02:11:36 am
i would also like to know the answers to the below questions:

I have a couple questions for Bayo to start:

1) We can do horizontal bars for health/etc, but is it possible to do vertical bars as well?

2) Is it possible to insert a button onto the edge of a container, as the attached image shows, and would this break with the existing UI style too much?

3) Is it possible to have a box that collapses when not in use? I'm thinking of the left-hand weapon. If there is no weapon, can you change the size of the box or is this not changable based on such parameters?

1. i dont think so unless there is some hidden property for vertical or there is bar2 class? ( but i assume its really easy to add)
Code: [Select]
pos "130 21"
size "298 6"

2. why not, you can place the button where ever you want or is it limited by the floor object initial pos,size ?
3. you should be able to disable the whole left panel or at least all of its individual elements?
after checking the appropriate var, where is the question... i assume in the hudinv? or something through ahud? (didnt watched further than the hud class)


another few:
a. is there a more technical documentation of the properties, for exmaple excluderect? ghost? mousefx? etc
b. can i do:

Code: [Select]
onMouseClick( *floor.bt1@disabled = false
             *floor.bt2@disabled = true

EDIT: and last, i tired and going to sleep but a quick thought, all of the controls defined by position size, which makes a squre but we have none square controls, so the capture are determined by the image? so no invisible buttons? 
Title: Re: UI Adjustments.
Post by: DarkRain on October 21, 2010, 04:52:41 am
1. i dont think so unless there is some hidden property for vertical or there is bar2 class? ( but i assume its really easy to add)
Code: [Select]
            pos    "130 21"
            size    "298 6"
Bar has a direction property:
Code: [Select]
direction      V_UI_ALIGN      Orientation of the bar. Default value "cr". Other available values are "uc", "lc", "cr", "cl"
I understand that ALING_UC (up-center) and ALING_LC (low-center) will give horizontal bars (from bottom to top, and from top to bottom)
And of course you'd need to give it a sensible size (taller than wide)



Quote
a. is there a more technical documentation of the properties, for exmaple excluderect? ghost? mousefx? etc
UI node behaviours (http://ufoai.ninex.info/wiki/index.php/UI_node_behaviours)



Quote
EDIT: and last, i tired and going to sleep but a quick thought, all of the controls defined by position size, which makes a squre but we have none square controls, so the capture are determined by the image? so no invisible buttons? 
Node has an invis property. Maybe this could help?
Code: [Select]
invis      V_BOOL      If true, the node is not displayed nor or activatable.
Title: Re: UI Adjustments.
Post by: mor2 on October 21, 2010, 11:35:59 am
its called nodes not classes  :-\ i assumed it was c++ with "widget" like classes used to make it easier for none programmers like me(thus the little wired sintax at places) but i guess its not, what language is it? its look very much alike.

and so can you access a node from another node callback event, i didnt see any variable declaration but i assume that any node can call any other node? or its something todo with confunc?

so can i do this:
onMouseClick( *nodename.invis = true
Title: Re: UI Adjustments.
Post by: Kildor on October 21, 2010, 04:16:10 pm
there is something-like C syntax, but it is not C. It is just declarative language. Also, confuncs look like mix of xpath and some other language.
Title: Re: UI Adjustments.
Post by: bayo on October 21, 2010, 08:26:11 pm
Quote
...and so can you access a node from another node callback event, i didnt see any variable declaration but i assume that any node can call any other node? or its something todo with confunc?

so can i do this:
onMouseClick( *nodename.invis = true

I dont read before this message cause i am tired (but i will do it), anyway:
* We can access any nodes
* There is no variable declaration, but i am working on
* confunc or anyother work the same.

onMouseClick( *node:pathofthenode@invis = true

Please check http://ufoai.ninex.info/wiki/index.php/UFO-Scripts/ui/*.ufo (http://ufoai.ninex.info/wiki/index.php/UFO-Scripts/ui/*.ufo) and if the doc is not helpful, feed back or fix is welcome. The first entry of http://ufoai.ninex.info/wiki/index.php/How_to_script_UI show an example of node edition from another node.
Title: Re: UI Adjustments.
Post by: mor2 on October 21, 2010, 10:13:26 pm
what about my initial question, will placing a picture or script in base/folder/script.ufo
will make the game load it instead if the script.ufo  in base/0folder.pk3   ?
Title: Re: UI Adjustments.
Post by: bayo on October 21, 2010, 10:32:53 pm
file from "homedir /base" overwrite file from "gamedir /base" which overwrite file from "gamedir .pk3".
Title: Re: UI Adjustments.
Post by: bayo on October 21, 2010, 10:38:56 pm
/contrib/scripts/ui/examples/unittest_bar.ufo contain example of bar
Title: Re: UI Adjustments.
Post by: mor2 on October 21, 2010, 10:40:18 pm
and since its better to mess around with game dir, where is homedir?

p.s.
Quote
* We can access any nodes
*node:pathofthenode@invis = true
what i meant is that it looked like if i go high enough, i'll find that every node constructor creates a global variable with the same name holding a pointer to it, which is why i can basically access everything...
Title: Re: UI Adjustments.
Post by: bayo on October 21, 2010, 11:08:46 pm
For dir, run the game and check the logs below "---- filesystem initialization -----".

Quote
what i meant is that it looked like if i go high enough, i'll find that every node constructor creates a global variable with the same name holding a pointer to it, which is why i can basically access everything...
I am not sure i understand the image. Each nodes have an unique identifier called "path" (constructed with names of all parents), and we can use this path to access to the node.
Title: Re: UI Adjustments.
Post by: mor2 on October 21, 2010, 11:21:16 pm

ok, then speaking of node path, how does call function works? for example here when called from hud?

Code: [Select]
    onClick {
if (*path??:hudinv@visiblewhen) {
call *node:root.showinventory
} else {
call *path??:hudinv.hideinventory
}
}

what is the path?
Title: Re: UI Adjustments.
Post by: geever on October 21, 2010, 11:40:01 pm
what is the path?

UI path: *node:windowname.nodename or *node:windowname.panelname.nodename, you can use root and parent tokens as reference like *node:parent.nodename.

You should really check our current UI scripts. they're very informative and easy to understand IMHO.

Basedefence UI (http://ufoai.git.sourceforge.net/git/gitweb.cgi?p=ufoai/ufoai;a=blob_plain;f=base/ufos/ui/basedefence.ufo;hb=HEAD) is a good example IMHO, it's quite new so uses the newest features


-geever
Title: Re: UI Adjustments.
Post by: bayo on October 22, 2010, 07:41:08 pm
*path??:hudinv@visiblewhen, here u must use @invis (which it visibility status), not @visiblewhen (which is something like a function)
Title: Re: UI Adjustments.
Post by: mor2 on October 22, 2010, 07:58:29 pm
yep, i didnt looked at the data type before, its not even boolean  :-[
so its should be something like this:
Code: [Select]
    onClick {
if (*node:hudinv@invis) { call *node:root.showinventory }
else { call *node:hudinv.hideinventory }
}

the only problem is how do you check if *node:hudinv exist at all?  ==null?  
and is there a specific reason why hudinv is done as another window?(resources? readability?) because i would prefer if it was as another panel.
Title: Re: UI Adjustments.
Post by: bayo on October 22, 2010, 10:25:22 pm
*:node:something.another.anotherthing
mean "something" is a window.

A path must start with a window name, or must be relative and start with "this", "parent", or "root"
Title: Re: UI Adjustments.
Post by: mor2 on October 22, 2010, 11:28:57 pm
so  *hudinv@invis (a window extends abstruct node so why not) or do i have to type *hudinv:root@invis ?
and how do i check if it exist?   *hudinv != null  ?  otherwise i assume that *node:inventory@invis will return a nasty runtime error...
Title: Re: UI Adjustments.
Post by: bayo on October 23, 2010, 03:14:27 am
All nodes already exists. To know if a window is pushed or not, i dont think u can use invis. And i dont think there is a way to know it ATM. You must remember this status with a cvar.
Title: Re: UI Adjustments.
Post by: mor2 on October 25, 2010, 03:22:46 am
ok, how about placement, is there any suggestion how to do it or is it just notepad move 2px right start the game and back for more?
also is there a way to check if ctrl/shit is pressed when i click the mouse? and where are those functions located anyway?
Title: Re: UI Adjustments.
Post by: Mattn on October 25, 2010, 08:12:45 am
open the game console (shift+esc) and type ui_push editor
Title: Re: UI Adjustments.
Post by: mor2 on October 25, 2010, 10:11:17 pm
where do i need to put that?
in the main menu and geoscape it returns 'unknown command - wasnt sent to server'
in the battlescape it recognizes it as text and pops it on screen me:ui_push editor
in either case nothing happens beyond that.

EDIT:
found it its "mn_push editor" not ui...
Title: Re: UI Adjustments.
Post by: H-Hour on October 25, 2010, 10:28:13 pm
open the game console (shift+esc) and type ui_push editor

Ooh, that's a neat trick!
Title: Re: UI Adjustments.
Post by: mor2 on October 25, 2010, 10:50:22 pm
the question is where does the changes being saved?
Title: Re: UI Adjustments.
Post by: bayo on October 25, 2010, 11:29:26 pm
Quote
the question is where does the changes being saved?
On your home.

mn_push is for 2.3, ui_push is for 2.4 cause i rename everything, cause i dont like "menu" token.
Title: Re: UI Adjustments.
Post by: mor2 on October 26, 2010, 04:56:19 pm
its possible i have encountered a bug, replacing graphics works, for example:
original X.png from UFOAI-2.3\0base.pk3
replaced by placing it in  UFOAI-2.3\base\pics\hud\X.png

but replacing scripts, has a glitch and the game doesnt past the init stage.
i extracted althud.ufo from UFOAI-2.3\0ufos.pk3
to UFOAI-2.3\base\ufos\ui\althud.ufo
stuck.


as for the home dir, this didnt help, i have no such thing in my %appdata%\UFOAI\2.3\base\ufoconsole.log
For dir, run the game and check the logs below "---- filesystem initialization -----".
Title: Re: UI Adjustments.
Post by: DarkRain on October 29, 2010, 05:23:07 am
but replacing scripts, has a glitch and the game doesnt past the init stage.
i extracted althud.ufo from UFOAI-2.3\0ufos.pk3
to UFOAI-2.3\base\ufos\ui\althud.ufo
stuck.

Assuming you didn't have a typo, yes there are some bug with parsing, for example last time I tried to make a bar with a non-default direction (vertical) game crashed at startup -- size mismatch -- seems that the orientation of the bar is declared as a byte (http://ufoai.killfile.pl/doxygen/structbar_extra_data__t.html#a2dd181b8cea1a926aaffc1861fec9a5a) while the game is trying to parse an integer, so it crashes, maybe there's a similar bug somewhere else?

Title: Re: UI Adjustments.
Post by: bayo on October 29, 2010, 10:29:00 am
It dont crash, it exit with an error message.

If it crash, please provide a backtrace,
And if it dont crash and the message dont help you, please more explicite.

Bar direction only work for 2.4. Here you have examples http://ufoai.git.sourceforge.net/git/gitweb.cgi?p=ufoai/ufoai;a=blob;f=contrib/scripts/ui/examples/unittest_bar.ufo

Anyway, i dont check it for a will.
Title: Re: UI Adjustments.
Post by: DarkRain on October 29, 2010, 08:01:26 pm
TBH I hadn't checked it recently either -- when I said "the last time I tried, I didn't imply it was recently, the error message was helpful at that time (I just went for a standard bar)

I only meant to note that the game not going past startup could be due to an script typo or there could actually be parsing bugs.

Anyways a quick test (with althud.ufo) shows it still doesn't work:

Code: [Select]
----------- parse scripts ----------
52 script files
48 ui script files
UI_ParseNodeProperties: unknown property "orientation", node ignored (node althud.floor.health0)
UI_ParseNodeBody: node with bad body ignored (node "althud.floor.health0")
UI_ParseWindow: window "althud" has a bad body

FS_RemoveFile: remove /home/eliab/.ufoai/2.4-dev/base/keys.cfg
There are still 1 opened files
]./ufo[0x8189b80]
./ufo[0x818915d]
./ufo[0x8129fab]
./ufo[0x80f65c7]
./ufo[0x805dd44]
./ufo[0x8140743]
./ufo[0x812b4e7]
./ufo[0x8188397]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0x670bd6]
./ufo[0x804e191]
Error: Shutdown
(that last part does *look* like a backtrace btw)

using direction instead of orientation:
Code: [Select]
----------- parse scripts ----------
52 script files
48 ui script files
UI_ParseProperty: "cl" is not a well formed node name (it must be quoted, uppercase const, a number, or prefixed with '*')
UI_ParseNodeProperties: Problem with parsing of node property 'althud.floor.health0@direction'. See upper
UI_ParseNodeBody: node with bad body ignored (node "althud.floor.health0")
UI_ParseWindow: window "althud" has a bad body

FS_RemoveFile: remove /home/eliab/.ufoai/2.4-dev/base/keys.cfg
There are still 1 opened files
]./ufo[0x8189b80]
./ufo[0x818915d]
./ufo[0x8129fab]
./ufo[0x80f65c7]
./ufo[0x805dd44]
./ufo[0x8140743]
./ufo[0x812b4e7]
./ufo[0x8188397]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0x2f3bd6]
./ufo[0x804e191]
Error: Shutdown

and using direction ALING_CL:
Code: [Select]
----------- parse scripts ----------
52 script files
48 ui script files
UI_ParseProperty: Invalid value for property 'direction': Size mismatch: given size: 1, should be: 4. (type: 3)
UI_ParseNodeProperties: Problem with parsing of node property 'althud.floor.health0@direction'. See upper
UI_ParseNodeBody: node with bad body ignored (node "althud.floor.health0")
UI_ParseWindow: window "althud" has a bad body

FS_RemoveFile: remove /home/eliab/.ufoai/2.4-dev/base/keys.cfg
There are still 1 opened files
]./ufo[0x8189b80]
./ufo[0x818915d]
./ufo[0x8129fab]
./ufo[0x80f65c7]
./ufo[0x805dd44]
./ufo[0x8140743]
./ufo[0x812b4e7]
./ufo[0x8188397]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0x2f7bd6]
./ufo[0x804e191]
Error: Shutdown

which was the error I got at that time

anyway got to go
Title: Re: UI Adjustments.
Post by: bayo on October 30, 2010, 12:52:02 am
I fix that in the master and i move all samples to unittest/ufos/uisample.
Then, now, everything is checked, and we should have less regressions
Title: Re: UI Adjustments.
Post by: H-Hour on October 30, 2010, 04:27:07 am
I'm trying to change the cvar's for a bar node in a confunc that get's called when the player clicks an image. I'm getting the following error:

Code: [Select]
Com_EParseValue: Illegal float statement '*cvar:mn_tu0' (file: 'C:\Program Files (x86)\UFOAI\ufoai\src\client\ui\ui_parse.c', line: 272)
The code for the bar, image and confunc is:

Code: [Select]
bar team_sld0_status
{
pos "65 10"
size "4 46"
color ".2187 .73 .23 1"
current *cvar:mn_hp0
max *cvar:mn_hpmax0
disabled true
direction "uc"
excluderect { pos "0 0" size "4 46" }
}

...

// Select tu button
image showtu_btn {
align LAYOUTALIGN_MIDDLE
src "hhud/tm_sldbg_sel"
pos "27 10"
size "64 64"
onClick { cmd "showtu;" }
}
confunc showtu {
*node:root.team.team_sld0_status@color = ".65 .23 .23 1"
*node:root.team.team_sld0_status@current = *cvar:mn_tu0
*node:root.team.team_sld0_status@max = *cvar:mn_tumax0
}

Am I doing something wrong or is it not possible to reassign the @current and @max values for a node this way?
Title: Re: UI Adjustments.
Post by: mor2 on October 30, 2010, 12:12:58 pm
@H-Hour, i understand you want to force an update but i dont think its how it works, the way i understand it 'current' is of type "V_CVAR_OR_FLOAT"
which i assume is ufoai for pointer to/or float, so you already linked the cvar to current and any change will be reflected when the bar gets an update event, which i assume the mouse movement trigger(among other things) the question if it tigers an update or if its call for specific nodes update (like the TU).


~unrelated questions:
1. if the above is correct what is the syntax difference between getting V_CVAR and its value?
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?
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?

Title: Re: UI Adjustments.
Post by: H-Hour on October 30, 2010, 12:40:12 pm
@H-Hour, i understand you want to force an update but i dont think its how it works, the way i understand it...

I'm sorry but I don't understand your explanation. I'm not really a programmer. If this won't work I can do it by creating multiple nodes and swapping them out with invis, but it would be better if I could update swap the data used for a single node.
Title: Re: UI Adjustments.
Post by: mor2 on October 30, 2010, 01:18:13 pm
neither do i, i wanted to explain this by providing an example of actor_select but it looks like i was wrong. i think that 'updateactorvalues' from the parent ahud class is what you are looking for (its in the_hud file) do the same for onclick event. also maybe try "*cvar:mn_tu0"


if not you'll have to do as i do wait for someone who actually knows this stuff  ;)  (if someone like that comes, then some help with the question in my previous post will be greatly appreciated)
Title: Re: UI Adjustments.
Post by: bayo on October 31, 2010, 11:10:16 am
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: [Select]
*node:root.team.team_sld0_status@current = (*cvar:mn_tu0)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: [Select]
*node:root.team.team_sld0_status@current = "*cvar:mn_tu0"
Title: Re: UI Adjustments.
Post by: bayo on October 31, 2010, 11:22:49 am
Quote
1. if the above is correct what is the syntax difference between getting V_CVAR and its value?
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?
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?
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).
Title: Re: UI Adjustments.
Post by: H-Hour on October 31, 2010, 11:24:50 am
The cvar thing works great. Thanks for the fast fix bayo.
Title: Re: UI Adjustments.
Post by: bayo on October 31, 2010, 11:41:17 am
It looks (without parenthesis or quotes)
Code: [Select]
*node:root.team.team_sld0_status@current = *cvar:mn_tu0now 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.
Title: Re: UI Adjustments.
Post by: mor2 on October 31, 2010, 03:13:23 pm
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: [Select]
cmd "mn_modify *cvar:group +1 0 1;"
call *node:root.hudenable
and if so, will this?
Code: [Select]
onClick { cmd "actor_select (2 + (*cvar:group * 8)" } intended to work as either actor_select 2 or 10.


Quote
In the case of bar:
* "readonly" property is more interesting
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: [Select]
while (*cvar:i ...) {
*cvar:temp<*cvar:i> = 0
}

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


and last, according to this (http://ufoai.ninex.info/wiki/index.php/UI_node_behaviours/2.4-dev#button) 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 (http://ufoai.ninex.info/wiki/index.php/UI_node_behaviours/2.4-dev#container) i want to display the weapon, so supposedly this should work:
Code: [Select]
displayammoofweapon truebut 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.
Title: Re: UI Adjustments.
Post by: bayo on October 31, 2010, 05:38:28 pm
Code: [Select]
cmd "mn_modify *cvar:group +1 0 1;"I remove mn_modify from 2.4.
It is more understandable to use math. For example (only an example, cause i dont remember mn_modify param and results):
Code: [Select]
*cvar:group = ((*cvar:group + 1) % 2)
Code: [Select]
call *node:root.hudenableFunction also support params. I dont know what u want to do, but it is often more easy to use params. Check unittest/uisample/* or unittest/uitest for examples.

Code: [Select]
onClick { cmd "actor_select (2 + (*cvar:group * 8)" }Everything inside quote is not evaluated, else very simple replacement using "<>".
Code: [Select]
onClick {
    *cvar:tmp = (2 + (*cvar:group * 8))
    cmd "actor_select <cvar:tmp>"
    delete *cvar:tmp
}

Quote
then i should use the 'readonly' instead of the current used 'disable' property?
Yes, 'disable=true' also should to the same result, but it is also not the same sementic. For example, disable should display bar with a grey color (but we dont do it at the moment).

Code: [Select]
*cvar:temp<*cvar:i>Thing like that should work. It can exists some case work it dont work, but in this case, we must fix it. Only rememeber to delete cvar when you no more need it, cause it is global values.

Quote
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.
This is a constraint only for the skin of the random size button, not on the button size itself. You also can use "custombutton" which have is own contraint too. I should rework every about tiles. But i dont know when i will do it, if i do it one day. I think i easily can remove contraintes on the "custombutton".

About "displayammoofweapon", yes, it only work with "baseinventory". The "baseinventory" node display all items from a base in a scrollable container. It is not created for soldiers. To display ammo, we must use a "model" or an "item" node, but it also need to update the .c code somewhere, like we do it with soldier weapon. If it is need, i can do it.

Quote
for that called baseinventory which has no documentation
I will add now a cron to update wiki doc every day.
Title: Re: UI Adjustments.
Post by: mor2 on October 31, 2010, 07:05:18 pm
Everything inside quote is not evaluated, else very simple replacement using "<>".
not evaluated? you mean in cmd, string or generally expression are not evaluated when injected?


Quote from: bayo
It is more understandable to use math.
it is more readable but unlike mn_modify you cannot use it with cmd, so like in the example before you get additional 2 lines to clutter the screen.  :(


Quote from: bayo
Thing like that should work. It can exists some case work it dont work, but in this case, we must fix it. Only rememeber to delete cvar when you no more need it, cause it is global values.
interesting, any chance i can create nodes this way as well? maybe with abstractnode createChild method?   i tried looking into it but coldnt find any documentation on how to use it...

the reason i want this is that yesterday i was dumb founded by the amount of manual data entry i has to do and would have to do again, for every ;ittle fix.
for a team of 8, i got: 8 head nodes, 8 models nodes, 3*8 bar nodes, 8 name nodes etc all of them with at least 5 properties, its ammounts to a shit load of lines, and its only 8!   >:(    

i was thinking on something along those lines:
Code: [Select]
confunc hudenable
{
*cvar:team_size = <1>
*cvar:position = 0
*cvar:i = 1

while ( *cvar:i < *cvar:team_size ){
call *node:root.team@createChild( ???   model head<*cvar:i> )
*node:root.team.head<*cvar:i>@src = *cvar:mn_head<*cvar:i>
*node:root.team.head<*cvar:i>@angles = "15 60 100"
*node:root.team.head<*cvar:i>@autoscale = true

*cvar:position = * 200 + (*cvar:i * 60 )
*node:root.team.head<*cvar:i>@pos = "<*cvar:position> 20"

*node:root.team.head<*cvar:i>@size = "50 78"
*node:root.team.head<*cvar:i>@ghost = true


same with the rest bars, strings etc nodes...
call *node:root.team@createChild ???  image bar_teambox<*cvar:i>
*node:root.team.bar_teambox<*cvar:i>@src

*cvar:i++
}
clean
}
is it possible? and is there some kind of documentation(or c declarations) on createChild and the like ?


Quote from: bayo
About "displayammoofweapon", yes, it only work with "baseinventory". The "baseinventory" node display all items from a base in a scrollable container. It is not created for soldiers. To display ammo, we must use a "model" or an "item" node, but it also need to update the .c code somewhere, like we do it with soldier weapon. If it is need, i can do it.
my best guess will be to add another container nodes for L/R ammo?
i mean there is already containers for: extension, right,left,backpack,belt,holster,headgear,armour   
why not for right_ammo, left_ammo, no?
Title: Re: UI Adjustments.
Post by: bayo on October 31, 2010, 09:28:43 pm
Quote
not evaluated?
cmd is like executing a shell command. It can't evaluate math operations.

Quote
interesting, any chance i can create nodes this way as well? maybe with abstractnode createChild method?
You can check unittest/ufos/uisample/unittest_nodeallocation.ufo. I think it is not very easy to use atm. I can create a little documentation. But you also should check "component" code too, it is also not fully usable, but it is useful. Anyway there is also an example in unittest_nodeallocation.ufo

Quote
my best guess will be to add another container nodes for L/R ammo?
I dont think. But it depend where you talking about. For the weapon container from the solider inventory, we can edit the containe code to display the ammo. But for the HUD, i dont know.
Title: Re: UI Adjustments.
Post by: mor2 on October 31, 2010, 09:52:39 pm
1. ok, np.
2. where are all those "unittest/ufos/uisample/unittest_nodeallocation.ufo" examples you point me to? its not in the ufos.pk3 nor i seen it in the src folder  ???
3. i mean for our weapon/ammo concept,  for example like here (http://ufoai.ninex.info/forum/index.php?action=dlattach;topic=5477.0;attach=5774;image).
all we need is something to show the ammo near the weapon, if you can make it in separate nodes then its will be more flexible but displayammoofweapon property will work too (i can always use them as ghost and place two buttons above it to capture onclick event over the weapon and over the ammo)

thanks.
Title: Re: UI Adjustments.
Post by: bayo on October 31, 2010, 10:18:18 pm
http://ufoai.git.sourceforge.net/git/gitweb.cgi?p=ufoai/ufoai;a=blob;f=unittest/ufos/uisample/unittest_nodeallocation.ufo
Title: Re: UI Adjustments.
Post by: mor2 on October 31, 2010, 10:37:52 pm
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.
Title: Re: UI Adjustments.
Post by: mor2 on November 01, 2010, 09:21:20 pm
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 (http://ufoai.ninex.info/wiki/index.php/UI_node_behaviours/2.4-dev#radiobutton) the val indicates which button is selected.
but the example (http://ufoai.git.sourceforge.net/git/gitweb.cgi?p=ufoai/ufoai;a=blob;f=unittest/ufos/uisample/unittest_radiobutton.ufo;h=a26a87e0856f19b83a16d96022199c1f527ad0d5;hb=HEAD) 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.
Title: Re: UI Adjustments.
Post by: bayo on November 01, 2010, 11:10:45 pm
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
I dont really understand what you mean.

2) yes, i think
Title: Re: UI Adjustments.
Post by: mor2 on November 01, 2010, 11:51:45 pm
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?
Title: Re: UI Adjustments.
Post by: bayo on November 02, 2010, 09:29:39 am
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)
Title: Re: UI Adjustments.
Post by: mor2 on November 02, 2010, 12:14:09 pm
it has, it uses the bar_selbox i am trying something different.
and if (paramcount == 0)  sound wonderful  ;)
Title: Re: UI Adjustments.
Post by: mor2 on November 02, 2010, 07:09:12 pm
i seem to bump into somethin i cannot solve, the game keep quite on me with the error
Code: [Select]
Com_AlignPtr: can't align V_NULL
i found that excluding the two lines 94,95 allows me to load the game but then my radiobuttons dont work.
Code: [Select]
*node:parent.tab<cvar:i>.bt_soldier@value = (*cvar:i)
*node:parent.tab<cvar:i>.bt_soldier@cvar = *cvar:selected_soldier

i dont know if its a syntax problem (tried quite few combination on the value) or something else, i attached the script (just extract it into %appdata%/base/) if someone can look into it i'll appreciate it, thanks.
Title: Re: UI Adjustments.
Post by: bayo on November 02, 2010, 07:44:49 pm
I fix it in the master, but please, quote the cvar value you want to set:
Code: [Select]
*node:parent.tab<cvar:i>.bt_soldier@cvar = "*cvar:selected_soldier"
Title: Re: UI Adjustments.
Post by: bayo on November 02, 2010, 07:53:50 pm
BTW you should use a component. At least you can fix const values without any setters, and this cvar name too.
Title: Re: UI Adjustments.
Post by: mor2 on November 02, 2010, 08:09:37 pm
I fix it in the master, but please, quote the cvar value you want to set:
Code: [Select]
*node:parent.tab<cvar:i>.bt_soldier@cvar = "*cvar:selected_soldier"

are you sure that is it, i just replaced my:
*node:parent.tab<cvar:i>.bt_soldier@cvar = *cvar:selected_soldier
with
*node:parent.tab<cvar:i>.bt_soldier@cvar = "*cvar:selected_soldier"
 and got the same error  ???

besides if you look at hud, this exactly how they use it without the " "   :(


and what is a component?
Title: Re: UI Adjustments.
Post by: bayo on November 02, 2010, 10:24:23 pm
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.
Title: Re: UI Adjustments.
Post by: mor2 on November 02, 2010, 11:58:55 pm
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 (http://ufoai.ninex.info/forum/index.php?topic=3462.msg44256#new) 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  :-\
Title: Re: UI Adjustments.
Post by: H-Hour on November 03, 2010, 09:45:25 am
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: [Select]
confunc crouch_checkbox_disable { }
confunc crouch_checkbox_clear { }
confunc crouch_checkbox_check { }

These are overridden in hud.ufo with the following:

Code: [Select]
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
}

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?
Title: Re: UI Adjustments.
Post by: mor2 on November 03, 2010, 10:38:16 am
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.
Title: Re: UI Adjustments.
Post by: bayo on November 03, 2010, 10:53:48 am
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.
Title: Re: UI Adjustments.
Post by: H-Hour on November 03, 2010, 10:59:18 am
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 (https://sourceforge.net/tracker/?func=detail&aid=3100642&group_id=157793&atid=805245), or would it be better if I worked up an example to show you what I want to do?
Title: Re: UI Adjustments.
Post by: bayo on November 03, 2010, 11:19:06 am
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.
Title: Re: UI Adjustments.
Post by: H-Hour on November 03, 2010, 11:37:44 am
Here is an image showing what I want to accomplish with the reaction fire reservation buttons.
Title: Re: UI Adjustments.
Post by: mor2 on November 03, 2010, 12:40:55 pm
then you are looking at the wrong functions, a.hud already does this, here what you need:
Code: [Select]
confunc startreactionmany { }
confunc startreactionmany_impos { }
confunc startreactiononce { }
confunc startreactiononce_impos { }
confunc deselect_reaction { }
confunc disable_reaction { }
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
Title: Re: UI Adjustments.
Post by: mor2 on November 03, 2010, 06:03:30 pm
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?
Title: Re: UI Adjustments.
Post by: dodon on November 03, 2010, 07:13:29 pm
Here is an image showing what I want to accomplish with the reaction fire reservation buttons.

At the moment the "Multiple shots" button does nothing extra. I think it is a relict from the time, when the TU for RF was taken from the next turn. (And it should be removed.)
Title: Re: UI Adjustments.
Post by: bayo on November 03, 2010, 07:57:29 pm
Quote
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>) +";"
You must first understand the current script is the result of many small patches according to needs and the way it is easy to implement. Anyway <foo> mean you replace something in a string. It is an easy way to do it. There is no real way atm to concatenate string with operator.

Quote
and what does "*cvar:i"  or is it "<cvar:i>" means, that you ask to do, pass the info as a string 
Then "*cvar:i" isastring containing *cvar:i, and "<cvar:i>" is a string where the injection syntax is replaced by the value of the cvar. The injection value is substituted at runtime.

Quote
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.
There is no references, the reference is the name of the cvar. You should use *node.root.whatever ( "*cvar:i" ). If it dont work, i must fix the C code. I will add a test to check it. But well, the <1> on the onClick function will be wrong, cause <1> is substituted at runtime. But u may use:
Code: [Select]
*node.root.radiobutton@onClick = { cmd "actor_select <cvar>;" }Which should substitute the syntax with the value of the cvar property, which should be the value of the cvar. BTW, there is no "dynamic" nasted/inner function, the nasted function is compiled at parsing time (you can't use status of the parent function to the nasted function).

Quote
also can i use  call *node.parent.parent.function  or *node.parent@parent.function  or something like it?
"@" is to access to properties, "." is to access nodes, then *node.parent.parent@function, if the function is an event property, *node.parent.parent.function ifthefunction is a func/confunc node.
Title: Re: UI Adjustments.
Post by: mor2 on November 03, 2010, 08:47:07 pm
Code: [Select]
*node.root.radiobutton@onClick = { cmd "actor_select <cvar>;" }Which should substitute the syntax with the value of the cvar property, which should be the value of the cvar. BTW, there is no "dynamic" nasted/inner function, the nasted function is compiled at parsing time (you can't use status of the parent function to the nasted function).
not sure i understand this part.

and can i use your example from few post back?
Code: [Select]
*cvar:temp = <1>
*node.root.radiobutton@onClick = { cmd "actor_select <cvar:temp>;" }
delete *cvar:temp


Quote
"@" is to access to properties, "." is to access nodes, then *node.parent.parent@function, if the function is an event property, *node.parent.parent.function ifthefunction is a func/confunc node.
obviously, i just wasnt sure if i can use call *node.parent.parent.function (got an error that it couldnt be located), so i made a guess that a node has a parent property, which makes *node.parent@parent valid and so maybe i can use its value, maybe i should have written it like that (*node.parent@parent).function    anyway NM, i'll just double check it.
Title: Re: UI Adjustments.
Post by: bayo on November 03, 2010, 09:11:05 pm
Quote
not sure i understand this part.
I hope it help.
http://ufoai.git.sourceforge.net/git/gitweb.cgi?p=ufoai/ufoai;a=commitdiff;h=7984e7ee76b71d2e29bffe348608ea83bc367980
It is a unittest. <cvar> is the value of the property @cvar from the radiobutton. And you can see it is 306.

Note here we can call
Code: [Select]
*node:root.radioTest@cvar = "*cvar:test6"after
Code: [Select]
*node:root.radioTest@onClick = { ...But both must be set before the last call (cause <cvar> it is replaced at the runtime)

Code: [Select]
*cvar:temp = <1>
*node.root.radiobutton@onClick = { cmd "actor_select <cvar:temp>;" }
delete *cvar:temp
It mean nothing. You never execute onClick, and <cvar:temp> is only replaced at the runtime of the nested function. Then, when onClick is executed, the cvar temp do no exists.

Quote
obviously, i just wasnt sure if i can use call...
Well, with a full example i can say something, but here, i really dont understand.
Title: Re: UI Adjustments.
Post by: Mattn on November 04, 2010, 12:57:51 pm
At the moment the "Multiple shots" button does nothing extra. I think it is a relict from the time, when the TU for RF was taken from the next turn. (And it should be removed.)

i don't the chance yet to verify this statement, are you really sure about this? there is rf-multiple and rf-single stuff in the game lib code the last time i looked at it.
Title: Re: UI Adjustments.
Post by: dodon on November 04, 2010, 04:02:35 pm
i don't the chance yet to verify this statement, are you really sure about this? there is rf-multiple and rf-single stuff in the game lib code the last time i looked at it.

Yes STATE_REACTION_ONCE and STATE_REACTION_MANY are still in use (just checked that with a month old copy of the master branch)

But most of the time the code handles the existing UI. (e_event_actorstatechange.c, cl_hud.c and cl_hud_callbacks.c).
In g_ai.c, g_ai_lua.c and g_morale.c the state is only set.
g_client.c handles the "Request to turn on multi- or single-reaction fire mode." and uses the same code for both states.

g_reaction.c only checks if one of the states is set and handles both the same way.

So I am quite shure: at the moment STATE_REACTION_ONCE and STATE_REACTION_MANY work the same way.


Title: Re: UI Adjustments.
Post by: mor2 on November 04, 2010, 10:18:23 pm
pffft, how many big boys in this little newby thread  ;D

btw speaking of which any chance for that ammo container/node/whatever, so we can show which ammo the weapon is loaded with in the hud similar to the base container (i would have created an entry on source forge but it has declared a crusade against my laptop  :-\ )

so big please (http://www.bigmagpie.com/somehype/stories/staugs/Harvey%20&%20Andrew_files/PussInBoots.gif)
Title: Re: UI Adjustments.
Post by: H-Hour on November 05, 2010, 12:01:20 am
Regarding the single/multi-shot reaction fire. What is the benefit of having both? As I understand it, in the past reaction fire would have taken some of the next turn's TU, so I can see the benefit of it. But I believe that doesn't happen now, so I guess choosing single would only preserve ammo.

Is that necessary or just an added complication? Would anyone really use single-shot?
Title: Re: UI Adjustments.
Post by: Kildor on November 05, 2010, 04:20:46 am
When I`ve played last time, there was at least one difference. RF-single reserved TU for single shot, and RF-multi reserved as much TU as possible. That`s all.
Title: Re: UI Adjustments.
Post by: H-Hour on November 05, 2010, 09:32:59 am
When I`ve played last time, there was at least one difference. RF-single reserved TU for single shot, and RF-multi reserved as much TU as possible. That`s all.

That makes sense and sounds like a good enough reason to keep it.
Title: Re: UI Adjustments.
Post by: H-Hour on November 05, 2010, 10:15:48 am
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.

I get an error when I try to use background with a radiobutton node.

Quote
UI_ParseNode: node behaviour/component 'background' doesn't exists

The code that causes the error:

Code: [Select]
radiobutton res_none
{
background "hhud/res_none"
pos "306 63"
size "31 23"
value 0
cvar *cvar:rf_reserve
onClick { cmd "deselect_reaction;" }
}

Title: Re: UI Adjustments.
Post by: mor2 on November 05, 2010, 10:19:51 am
its available only in the new nighties.

EDIT: also i am not sure what is "res_none" but you are allow to make background less buttons.

for example you can use image and add buttons above only to capture events (onClick etc)
or add images above them and make effects like glow, thus you can make one hovered effect for all the buttons and move it to the correct button instead of making another hovered image with effect for all (just dont forget to set them as ghost)
Title: Re: UI Adjustments.
Post by: H-Hour on November 05, 2010, 10:54:30 am
I git-fetched and compiled before trying.
Title: Re: UI Adjustments.
Post by: bayo on November 05, 2010, 10:55:43 am
It also can be a parsing problem, moving backround from the first position can help in this case. Only an idea, i can't test here.
Code: [Select]
radiobutton res_none
{
pos "306 63"
background "hhud/res_none"
      
Title: Re: UI Adjustments.
Post by: H-Hour on November 05, 2010, 11:43:41 am
Sorry, that was my fault. Git used to automatically upbase when I fetched but I forget that I have to do that manually now.
Title: Re: UI Adjustments.
Post by: dodon on November 07, 2010, 10:16:45 am
When I`ve played last time, there was at least one difference. RF-single reserved TU for single shot, and RF-multi reserved as much TU as possible. That`s all.
That makes sense and sounds like a good enough reason to keep it.
From the changehistory it looks like it was (accidentally?) removed 8 month ago, but it should not be to difficult to to make it work again. On the other hand I am not aware that anybody complained about that, so it maybe was not used at all.
Title: Re: UI Adjustments.
Post by: bayo on November 07, 2010, 11:23:35 am
for example you can use image and add buttons above only to capture events (onClick etc) ...
Which is IMO the worst solution.
Title: Re: UI Adjustments.
Post by: mor2 on November 07, 2010, 11:54:45 am
it depends on the case, for example the soldier bar, if its has a fixed size then there is no purpose in creating multiple nodes for dividers etc, you just make one background image for all, then you place those background less nodes to capture events, you may use the model's for that but they has different size consideration for best looks, so here you go.

or if the ammo will be shown as part of the weapon node and not separate nodes, so the only way for me to capture clicks and provide different tooltips for weapon and ammo is to place 2 buttons background less buttons above it.

or if you just think it pointless to make tooltip's for the soldier selection mini bars(not main) because they are too small, you can place one above the whole and give general description

etc, everything has its use, its all depends on what you need...
Title: Re: UI Adjustments.
Post by: dodon on December 05, 2010, 01:03:27 pm
btw speaking of which any chance for that ammo container/node/whatever, so we can show which ammo the weapon is loaded with in the hud similar to the base container (i would have created an entry on source forge but it has declared a crusade against my laptop  :-\ )

Just learned how to do something like that.
Are you still interested in such a node?