UI Discussion - Page 2

UI Discussion

When a mechwarrior falls in battle, what does she leave to legacy?

Moderators: FLOZi, SpikedHelmet, Moderators, Content Developer

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: UI Discussion

Post 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?
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: UI Discussion

Post 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.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: UI Discussion

Post 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.
Attachments
backup.7z
(302.03 KiB) Downloaded 12 times
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: UI Discussion

Post by FLOZi »

Pretty damned awesome. 8)
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: UI Discussion

Post by smoth »

No issues?
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: UI Discussion

Post 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)
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: UI Discussion

Post 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.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: UI Discussion

Post by FLOZi »

Seems unit deck sometimes shows enemy units, which can then break teamplatters if you try and select the lance.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: UI Discussion

Post 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
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: UI Discussion

Post 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)
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: UI Discussion

Post 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.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: UI Discussion

Post 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.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: UI Discussion

Post by FLOZi »

I got weapon toggling working, you may now micro button click to setup chain-firing to your hearts content.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: UI Discussion

Post by smoth »

Sweet! Chili is awesome!
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: UI Discussion

Post 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:
Attachments
mcl_gui_unitcard.lua
(17.99 KiB) Downloaded 15 times
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: UI Discussion

Post 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)
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: UI Discussion

Post by smoth »

this should restore the text, no time to test, gotta run
Attachments
mcl_gui_unitcard.lua
(17.82 KiB) Downloaded 12 times
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: UI Discussion

Post 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.
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Re: UI Discussion

Post by REVENGE »

I am interested in helping you work on UI coding / debugging.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: UI Discussion

Post 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.
Post Reply

Return to “MechCommander: Legacy”