Page 2 of 3

Re: UI Discussion

Posted: 06 Jan 2014, 21:38
by FLOZi
Looks like the 'H' bar is showing health rather than heat, as indicated on the initial sketch. I love the glowing red progressing to the DANGER sign though.

IMO the Card should always show if a single unit is selected, regardless of its lance status - is that feasible?

Re: UI Discussion

Posted: 06 Jan 2014, 22:50
by smoth
oh my bad, I assumed the H was for health and just glanced on to xp and j :P.

Not hard to fix at all.

As far as when just a single unit is selected, sure, it will take a bit to work out the logic.

I really wish there was a way to issue a select on a unit. are you sure there is no example? I don't venture into all the spring widget stuff too often so I dunno.

Re: UI Discussion

Posted: 07 Jan 2014, 06:43
by smoth
Image
Now has different images for each of the vehicle types.

all parts are setup to read in the rules param as you requested, no idea how to test them :P.

New functionality:
when you click the lance, it selects the lance(control group)!
when you click the unit in the deck view it selects it!

When you select a unit, that unit's info card is pulled up. I do not close the card when you deselect the unit as there may be a time you want to keep that unit selected.

Test/temp functionality:
as we do not have a "%" for fonts, I derive the font size from screen width. It is the best solution I currently know of and if some play spring with horizontal spanning their font will be huge, I cannot help this as it is my last great hurdle of dealing with different resolutions/aspect ratios.

also if you are at 1024x768 or lower, I am sorry.

Correction:
fixed the "heat" bar, now displays heat instead of health :)

Note:
Delete your /bitmaps/ui folder before copying these files as I deleted a few images and it'll be easier to just override.

Re: UI Discussion

Posted: 07 Jan 2014, 22:33
by FLOZi
Pretty damned awesome. 8)

Re: UI Discussion

Posted: 07 Jan 2014, 23:21
by smoth
No issues?

Re: UI Discussion

Posted: 07 Jan 2014, 23:40
by FLOZi
smoth wrote:No issues?
Needs playtesting - Had some great games with jk last night, and knorke and jk had some good games too. Hope to do some more sometime this week (but not tonight)

Re: UI Discussion

Posted: 08 Jan 2014, 05:27
by smoth
Cool, I am helping my dad move int his place right now so I will be busy for a while. If you guys want any specific stuff for the resource etc at the top of the screen feel free to do another mockup. Just keep in mind my time is now like 1/8th what it was before.

Re: UI Discussion

Posted: 08 Jan 2014, 20:07
by FLOZi
Seems unit deck sometimes shows enemy units, which can then break teamplatters if you try and select the lance.

Re: UI Discussion

Posted: 08 Jan 2014, 20:23
by smoth
Odd I probably didn't check team or something. Still helping my dad move into his place I might not get to look into it this evening

Re: UI Discussion

Posted: 08 Jan 2014, 22:49
by FLOZi
Quick look suggests this may be my fault due to how units are assigned to groups. Looks like I need to send to unsynced and assign them there.


Could you put in a skeleton for clicking on the weapon buttons (I want to try implementing toggle)

Re: UI Discussion

Posted: 09 Jan 2014, 02:58
by smoth
not trying to switch the blame at all but it does look like your code may be the case.

probably need to grab unit team and then check it against the teamId.

Re: UI Discussion

Posted: 09 Jan 2014, 17:50
by FLOZi
smoth wrote:not trying to switch the blame at all but it does look like your code may be the case.

probably need to grab unit team and then check it against the teamId.
Yes, Spring.SetUnitGroup applies to the local player, but you only know who is the local player in unsynced, so needs comunicado.

Re: UI Discussion

Posted: 10 Jan 2014, 18:42
by FLOZi
I got weapon toggling working, you may now micro button click to setup chain-firing to your hearts content.

Re: UI Discussion

Posted: 10 Jan 2014, 18:54
by smoth
Sweet! Chili is awesome!

Re: UI Discussion

Posted: 11 Jan 2014, 03:33
by smoth
I noticed an issue with changing mechs and it no updating the weapon status.

I hope you don't mind, I tweaked it a bit. Added coloring to the buttons and fixes the minor issue when changing mechs.
Image

Here you go:

Re: UI Discussion

Posted: 11 Jan 2014, 14:32
by FLOZi
Why would I mind, it's a huge improvement, thanks! :mrgreen:

Perhaps it would be better if instead of changing the text the button colour was changed (so you can see what weapon it is that is disabled)

Re: UI Discussion

Posted: 11 Jan 2014, 16:23
by smoth
this should restore the text, no time to test, gotta run

Re: UI Discussion

Posted: 13 Jan 2014, 23:14
by FLOZi
If a mech gets into excess_heat, but manages to escape, the 'danger' sign isn't removed, even though the rest of the red glowy effect is.

Re: UI Discussion

Posted: 15 Jan 2014, 08:52
by REVENGE
I am interested in helping you work on UI coding / debugging.

Re: UI Discussion

Posted: 19 Jan 2014, 18:57
by smoth
flozi, that is because you don't have anything to reduce the excess heat in mech lua, that is why current heat cools down.
add this echo

Code: Select all

Spring.Echo(spGetUnitRulesParam(currentUnitId, "excess_heat"))
above

Code: Select all

if (spGetUnitRulesParam(currentUnitId, "excess_heat") or 0) > 50 then
excess_heat never changes after it rises.