Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix healthbar HUD #981

Merged
merged 4 commits into from
Mar 16, 2022
Merged

Fix healthbar HUD #981

merged 4 commits into from
Mar 16, 2022

Conversation

appgurueu
Copy link
Contributor

@appgurueu appgurueu commented Jan 31, 2022

Closes #979, closes #986

@LoneWolfHT
Copy link
Member

Shall I close in favor of an engine fix as discussed in Discord?

@appgurueu
Copy link
Contributor Author

appgurueu commented Feb 2, 2022

Shall I close in favor of an engine fix as discussed in Discord?

If the engine gets a feature PR that allows implementing this slightly neater and the PR is merged, I will redo this.

@appgurueu
Copy link
Contributor Author

This is how it looks now:
Screenshot

@appgurueu
Copy link
Contributor Author

Last commit closes #986 by right-aligning the hearts.
Bildschirmfoto von 2022-02-06 17-56-26
Bildschirmfoto von 2022-02-06 17-55-47

@appgurueu
Copy link
Contributor Author

Note that this legitimizes duplicating the HUD bar def, as it requires repositioning the health bar.

@appgurueu appgurueu mentioned this pull request Feb 25, 2022
@appgurueu
Copy link
Contributor Author

appgurueu commented Mar 12, 2022

@savilli Bump. I see no reason not to merge this. This fixes two bugs. Implementing a builtin feature would be significantly more work (especially if inclusion in the engine is desired). This is now very clean and duplicates very little code (negligible). Pretty much everything that overrides the builtin defs has to duplicate just as much (small parts of the HUD element def). The only minor dirty thing I see is the use of the undocumented register_on_playerevent thing, which is properly annotated as a "hack".

@savilli
Copy link
Contributor

savilli commented Mar 13, 2022

LGTM

@appgurueu
Copy link
Contributor Author

@LoneWolfHT please review

@LoneWolfHT LoneWolfHT merged commit 2be697e into MT-CTF:master Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bubbles overlap with hearts for knights Health bar background is incorrectly sized
3 participants