UI Discussion - Page 2

UI Discussion

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

Moderators: SpikedHelmet, FLOZi, Moderators, Content Developer

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

Re: UI Discussion

Post by FLOZi » 06 Jan 2014, 21:38

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?
0 x

User avatar
smoth
Posts: 22295
Joined: 13 Jan 2005, 00:46

Re: UI Discussion

Post by smoth » 06 Jan 2014, 22:50

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.
0 x

User avatar
smoth
Posts: 22295
Joined: 13 Jan 2005, 00:46

Re: UI Discussion

Post by smoth » 07 Jan 2014, 06:43

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 6 times
0 x

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

Re: UI Discussion

Post by FLOZi » 07 Jan 2014, 22:33

Pretty damned awesome. 8)
0 x

User avatar
smoth
Posts: 22295
Joined: 13 Jan 2005, 00:46

Re: UI Discussion

Post by smoth » 07 Jan 2014, 23:21

No issues?
0 x

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

Re: UI Discussion

Post by FLOZi » 07 Jan 2014, 23:40

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)
0 x

User avatar
smoth
Posts: 22295
Joined: 13 Jan 2005, 00:46

Re: UI Discussion

Post by smoth » 08 Jan 2014, 05:27

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.
0 x

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

Re: UI Discussion

Post by FLOZi » 08 Jan 2014, 20:07

Seems unit deck sometimes shows enemy units, which can then break teamplatters if you try and select the lance.
0 x

User avatar
smoth
Posts: 22295
Joined: 13 Jan 2005, 00:46

Re: UI Discussion

Post by smoth » 08 Jan 2014, 20:23

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
0 x

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

Re: UI Discussion

Post by FLOZi » 08 Jan 2014, 22:49

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)
0 x

User avatar
smoth
Posts: 22295
Joined: 13 Jan 2005, 00:46

Re: UI Discussion

Post by smoth » 09 Jan 2014, 02:58

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.
0 x

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

Re: UI Discussion

Post by FLOZi » 09 Jan 2014, 17:50

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.
0 x

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

Re: UI Discussion

Post by FLOZi » 10 Jan 2014, 18:42

I got weapon toggling working, you may now micro button click to setup chain-firing to your hearts content.
0 x

User avatar
smoth
Posts: 22295
Joined: 13 Jan 2005, 00:46

Re: UI Discussion

Post by smoth » 10 Jan 2014, 18:54

Sweet! Chili is awesome!
0 x

User avatar
smoth
Posts: 22295
Joined: 13 Jan 2005, 00:46

Re: UI Discussion

Post by smoth » 11 Jan 2014, 03:33

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 8 times
0 x

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

Re: UI Discussion

Post by FLOZi » 11 Jan 2014, 14:32

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)
0 x

User avatar
smoth
Posts: 22295
Joined: 13 Jan 2005, 00:46

Re: UI Discussion

Post by smoth » 11 Jan 2014, 16:23

this should restore the text, no time to test, gotta run
Attachments
mcl_gui_unitcard.lua
(17.82 KiB) Downloaded 8 times
0 x

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

Re: UI Discussion

Post by FLOZi » 13 Jan 2014, 23:14

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.
0 x

User avatar
REVENGE
Posts: 2376
Joined: 24 Aug 2006, 06:13

Re: UI Discussion

Post by REVENGE » 15 Jan 2014, 08:52

I am interested in helping you work on UI coding / debugging.
0 x

User avatar
smoth
Posts: 22295
Joined: 13 Jan 2005, 00:46

Re: UI Discussion

Post by smoth » 19 Jan 2014, 18:57

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.
0 x

Post Reply

Return to “MechCommander: Legacy”