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: color tags texts drawn in item info #78784

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Brambor
Copy link
Contributor

@Brambor Brambor commented Dec 27, 2024

Summary

Bugfixes "color tags texts drawn in item info"

Purpose of change

Item info colour tags would render if they are the first character after a line wrap.

The bug also needed the window to be sufficiently high. That is why it is reproducible in ( disassembly menu.

Describe the solution

Don't draw the text when textStart == drawEnd. When the text starts with a color tag, textStart == drawEnd is true.

I don't really get the code. @db48x, as the author of that code, could you check if my change makes sense?

Describe alternatives you've considered

Waiting for somebody else. This took way too long.

Testing

Additional context

 - item info color tags would render if they are first character after a line wrap
@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Dec 27, 2024
@Brambor Brambor added Info / User Interface Game - player communication, menus, etc. ImGui Anything related to the new ImGui UI for SDL/tiles or ImTui for curses builds labels Dec 27, 2024
@moxian
Copy link
Contributor

moxian commented Dec 27, 2024

This should also fix #78601 (i was meaning to mention that in the issue that it's a duplicate, but kept forgetting)

@Brambor Brambor changed the title fix: item info color tags texts drawn in You could use it to craft fix: color tags texts drawn in item info Dec 27, 2024
@Brambor
Copy link
Contributor Author

Brambor commented Dec 27, 2024

This should also fix #78601 (i was meaning to mention that in the issue that it's a duplicate, but kept forgetting)

It does. Thank God. I was lost in my compiled versions for a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` ImGui Anything related to the new ImGui UI for SDL/tiles or ImTui for curses builds Info / User Interface Game - player communication, menus, etc. json-styled JSON lint passed, label assigned by github actions
Projects
None yet
2 participants