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 HUD image (waypoint) docs #14235

Merged
merged 1 commit into from Jan 10, 2024
Merged

Fix HUD image (waypoint) docs #14235

merged 1 commit into from Jan 10, 2024

Conversation

appgurueu
Copy link
Contributor

Fixes #14158.

Relevant code:

minetest/src/client/hud.cpp

Lines 451 to 456 in 2766c70

v2s32 dstsize(imgsize.Width * e->scale.X * m_scale_factor,
imgsize.Height * e->scale.Y * m_scale_factor);
if (e->scale.X < 0)
dstsize.X = m_screensize.X * (e->scale.X * -0.01);
if (e->scale.Y < 0)
dstsize.Y = m_screensize.Y * (e->scale.Y * -0.01);

I've also updated the test in devtest to check this.

The same applies to images, so I fixed the docs there too.

@appgurueu appgurueu added @ Documentation Trivial The change is a trivial bug fix, documentation or maintenance change, as per the Git Guidelines Bugfix 🐛 PRs that fix a bug labels Jan 9, 2024
@sfan5 sfan5 merged commit 7bae8ab into minetest:master Jan 10, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix 🐛 PRs that fix a bug @ Documentation Trivial The change is a trivial bug fix, documentation or maintenance change, as per the Git Guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lua_api is wrong about hud element type: image_waypoint
3 participants