Unvanquished icon indicating copy to clipboard operation
Unvanquished copied to clipboard

Migration from libRocket to RmlUi modified the appearance of progress bars

Open illwieckz opened this issue 2 years ago • 10 comments

Those are difference between libRocket and RmlUi, not between 0.53.1's RmlUi and RmlUi master (not introduced by https://github.com/Unvanquished/Unvanquished/pull/2027 ).

On 0.52.1 and before, the progress bar of deconstruction/lucifer cannon/mantis dash/dragoon pounce was coloured.

On 0.53.0 and after, the progress bar is pure white.

Unvanquished ≤ 0.52.1 on libRocket

librocket rmlui

librocket rmlui

librocket rmlui

librocket rmlui

Unvanquished ≥ 0.53.0 on RmlUi

librocket rmlui

librocket rmlui

librocket rmlui

librocket rmlui

The progress bar being colored was probably a side effect of:

  • https://github.com/Unvanquished/libRocket/issues/7

But it may have been kept on purpose and we may want to reproduce the effect on purpose.

In the same way people asked to dim a bit the map load screen as they considered the side effect of the bug to be useful:

  • https://github.com/Unvanquished/Unvanquished/issues/1834

I like the human progress bar being colored like the team and I always thought it was on purpose.

The alien progress bar being colored like humans is probably a bug due to reusing the same stuff.

illwieckz avatar Aug 11 '22 06:08 illwieckz

Probably a trivial rcss change.

DolceTriade avatar Aug 11 '22 06:08 DolceTriade

So, I'm not sure how it worked pre-rmlui, but I don't see any coloring done. Perhaps the progress bars would inherit the colors from the parent elements?

DolceTriade avatar Aug 13 '22 06:08 DolceTriade

Actually, that can't be it, because hud_chargebar is it's own thing. Maybe those chargebars outdated the RmlUI

DolceTriade avatar Aug 13 '22 06:08 DolceTriade

That might have been the color: property being accidentally used as image-color (a libRocket bug)

necessarily-equal avatar Aug 14 '22 08:08 necessarily-equal

Yes:

The progress bar being colored was probably a side effect of:

  • https://github.com/Unvanquished/libRocket/issues/7

But it may have been kept on purpose and we may want to reproduce the effect on purpose.

In the same way people asked to dim a bit the map load screen as they considered the side effect of the bug to be useful […] I like the human progress bar being colored like the team and I always thought it was on purpose.

illwieckz avatar Aug 14 '22 08:08 illwieckz

Fixing this would probably mean getting the team in ui/hud_chargebar.rml, but to be honest I'm not sure how. I guess one could write some lua and check the p_team cvar (or p_teamname) and add an alien or human class to the tag, but I'm not sure how to do that and keep it updated.

necessarily-equal avatar Sep 03 '22 11:09 necessarily-equal

Fixing this would probably mean getting the team in ui/hud_chargebar.rml, but to be honest I'm not sure how. I guess one could write some lua and check the p_team cvar (or p_teamname) and add an alien or human class to the tag, but I'm not sure how to do that and keep it updated.

Why would you need to do something fancy like that? You can put different CSS for the progressbar in the human and alien HUD documents.

slipher avatar Sep 03 '22 15:09 slipher

You can put different CSS for the progressbar in the human and alien HUD documents.

The ui/hud_chargebar.rml is shared, so I must say I didn't try, but I expect that a document will not be affected by other document's styles. Will check later

Le 3 septembre 2022 17:47:12 GMT+02:00, slipher @.***> a écrit :

Fixing this would probably mean getting the team in ui/hud_chargebar.rml, but to be honest I'm not sure how. I guess one could write some lua and check the p_team cvar (or p_teamname) and add an alien or human class to the tag, but I'm not sure how to do that and keep it updated.

Why would you need to do something fancy like that? You can put different CSS for the progressbar in the human and alien HUD documents.

-- Reply to this email directly or view it on GitHub: https://github.com/Unvanquished/Unvanquished/issues/2058#issuecomment-1236147298 You are receiving this because you commented.

Message ID: @.***>

necessarily-equal avatar Sep 06 '22 12:09 necessarily-equal

gentle bump

necessarily-equal avatar Jan 09 '23 23:01 necessarily-equal

Moving to 0.55. I don't think this is really that big of a deal anyways. I think this was a change that worked just OK.

I think a real issue would be: make charge bars blue for humans and red for aliens.

DolceTriade avatar Jan 09 '23 23:01 DolceTriade