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

if announce string is too long, draw author on next line #2195

Merged
merged 2 commits into from
Feb 11, 2025

Conversation

rfomin
Copy link
Collaborator

@rfomin rfomin commented Feb 11, 2025

Fix #2177

Copy link
Owner

@fabiangreffrath fabiangreffrath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks a lot better, thank you!

if (hud_map_announce && leveltime == 0)
{
if (gamemapinfo && gamemapinfo->author)
{
M_snprintf(announce_string, sizeof(announce_string), "%s by %s",
string, gamemapinfo->author);
if (MN_StringWidth(announce_string) > SCREENWIDTH)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we really only act if the string spans the whole screen?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe something in the range of 200 or 240 would be a reasonable limit?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we really only act if the string spans the whole screen?

It only spans the entire screen with 4:3 aspect ratio, #define SCREENWIDTH 320. I think it works fine with 16:9, which is what most users have.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, okay.

@fabiangreffrath fabiangreffrath merged commit 4faa283 into fabiangreffrath:master Feb 11, 2025
8 checks passed
@rfomin rfomin deleted the announce_author branch February 11, 2025 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature] give separate lines for levelname and author in level announcement
2 participants