project-navigation
Personal tools

Author Topic: UI Adjustments.  (Read 35420 times)

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: UI Adjustments.
« Reply #75 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;" }
}


Offline mor2

  • Squad Leader
  • ****
  • Posts: 145
    • View Profile
Re: UI Adjustments.
« Reply #76 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)
« Last Edit: November 05, 2010, 10:55:01 am by mor2 »

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: UI Adjustments.
« Reply #77 on: November 05, 2010, 10:54:30 am »
I git-fetched and compiled before trying.

Offline bayo

  • Professional loser
  • Project Coder
  • Captain
  • ***
  • Posts: 733
    • View Profile
Re: UI Adjustments.
« Reply #78 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"
      

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: UI Adjustments.
« Reply #79 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.

Offline dodon

  • Rookie
  • ***
  • Posts: 48
    • View Profile
Re: UI Adjustments.
« Reply #80 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.

Offline bayo

  • Professional loser
  • Project Coder
  • Captain
  • ***
  • Posts: 733
    • View Profile
Re: UI Adjustments.
« Reply #81 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.

Offline mor2

  • Squad Leader
  • ****
  • Posts: 145
    • View Profile
Re: UI Adjustments.
« Reply #82 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...
« Last Edit: November 07, 2010, 12:02:00 pm by mor2 »

Offline dodon

  • Rookie
  • ***
  • Posts: 48
    • View Profile
Re: UI Adjustments.
« Reply #83 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?