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

[Russian] text out of bounds in unique item stat window #7651

Open
Riccila opened this issue Jan 13, 2025 · 21 comments
Open

[Russian] text out of bounds in unique item stat window #7651

Riccila opened this issue Jan 13, 2025 · 21 comments
Labels
enhancement New feature or request

Comments

@Riccila
Copy link

Riccila commented Jan 13, 2025

Feature Type

Bug

Describe

Скрин_1 Скрин_2 Good evening! Dear developers. There are two screenshots in the attachment. Is it possible to correct the position of the text in the description of the objects (language Russian). Specifically these, as well as possible descriptions of other unique things. Thank you in advance!
@Riccila Riccila added the enhancement New feature or request label Jan 13, 2025
@Maderator3000
Copy link
Contributor

Maderator3000 commented Jan 13, 2025

--- EN ---

  1. The name of the bug report should also be in English.
  2. I fixed it in the new version of the Russian localization, losing the word "restore" to "restore." You can test it in the project builds or wait for the new version.
    I recommend closing this issue, because the problem has already been solved. If you have any questions about the Russian localization, write to me on social networks - Discord, Telegram, VKontakte. Everywhere I am @Maderator3000

UPD: with the inscription about absorbing damage from traps, I will also decide in the future.

--- RU ---

  1. Название сообщения о баге тоже должно быть на английском
  2. Я это пофиксил в новой версии русской локализации, утратив слово "восстановление" до "восст.". Протестировать можно в билдах проекта или ждать новую версию.

Рекомендую закрыть это issue, т.к. проблема уже решена. По любым вопросам касательно русской локализации пиши мне в соц. сети - Дискорд, Телеграм, ВКонтакте. Везде я @Maderator3000

UPD: с надписью о поглощении урона от ловушек тоже в дальнейшем порешаю.

@qndel qndel changed the title Положение шрифта [Russian] text out of bounds in unique item stat window Jan 13, 2025
@qndel
Copy link
Member

qndel commented Jan 13, 2025

@Maderator3000 we use english here
@Riccila that's not "quality of life", that's a bug

@Maderator3000
Copy link
Contributor

@Maderator3000 we use english here

I know, I just see that the guy is Russian and for his convenience I answered in Russian. In short: the problem is partially solved in the updated Russian localization, which I updated. A little later I will try to fix a couple more errors related to Russian localization that I know about.

@AJenbo
Copy link
Member

AJenbo commented Jan 13, 2025

I know, I just see that the guy is Russian and for his convenience I answered in Russian.

Pretty hard for us to know to close the issue or not if we can't understand what is being said.

@Maderator3000
Copy link
Contributor

Pretty hard for us to know to close the issue or not if we can't understand what is being said.

Oh, sorry. I'll take this into account in the future

@AJenbo
Copy link
Member

AJenbo commented Jan 13, 2025

UPD: I will also solve the problem with the inscription about absorbing damage from traps in the future.

Lets keep it open till this part is also solved. Thanks for handling it and the quick response.

@Riccila thank you for the nice bug report

@Riccila Riccila closed this as completed Jan 13, 2025
@qndel qndel reopened this Jan 13, 2025
@Maderator3000
Copy link
Contributor

Got it, tomorrow after the exam (evening-night Moscow time) I'll fix the problem with the text about traps 🙃

@glebm
Copy link
Collaborator

glebm commented Jan 13, 2025

A non-Russian specific issue here is that it clearly attempts to wrap the text but does so within incorrect boundaries. We should fix the boundaries passed to the text rendering function when drawing the unique item info text.

@glebm
Copy link
Collaborator

glebm commented Jan 13, 2025

The info window decoration is drawn here:

panelX = GetRightPanel().position.x - SidePanelSize.width + 27;

The text is drawn here:

Rectangle rect { position + Displacement { 32, 56 }, { 257, 0 } };

The text rectangle needs to be adjusted to fit within the box.

@glebm
Copy link
Collaborator

glebm commented Jan 14, 2025

The fix might be to simply return panelX on this line instead of what it's doing currently:

return isInStash ? leftInfoPos : rightInfoPos;

@Maderator3000
Copy link
Contributor

We should fix the boundaries passed to the text rendering function when drawing the unique item info text.

Should I fix the item's stat about absorbing half of the damage from traps at the localization level or wait for code-level edits?

@AJenbo
Copy link
Member

AJenbo commented Jan 14, 2025

wait for code

@StephenCWills
Copy link
Member

StephenCWills commented Jan 14, 2025

The text rectangle needs to be adjusted to fit within the box.

I'm not sure how the width of that bounding box compares to the info panel, but perhaps we should also consider allowing the text renderer to adjust character spacing.

Screenshot_20250114-054817

That said, it appears the last character gets cut off? Might need to look into that as well...

EDIT: I guess if you look closely, the last character is getting wrapped and then clipped.

image

The text rendering logic appears to be using the width of the first line to determine the spacing for multiline text.

@Riccila
Copy link
Author

Riccila commented Jan 17, 2025

Dear developers. Two more screenshots. As I understand it, the problem is similar. It may have already been fixed. But I decided to reset the information anyway, in case it helps.

@Riccila Riccila closed this as completed Jan 17, 2025
@Riccila
Copy link
Author

Riccila commented Jan 17, 2025

Image

@Riccila
Copy link
Author

Riccila commented Jan 17, 2025

Image

@Riccila Riccila reopened this Jan 17, 2025
@StephenCWills
Copy link
Member

To be clear, my screenshot was taken using a fairly recent test build. The screenshots Riccila shared just now appear to have been taken in a release build, because the text is rendering out of bounds to the left. I believe that behavior may have been fixed already since I didn't see it in the test build.

My thinking is that it may be a good idea to compute text width based on the widest line rather than stopping at the first newline character.

if (next == U'\n')
break;

@kphoenix137
Copy link
Collaborator

This may be a good time to implement floating info boxes for item information, perhaps as the only option. We can display only the item name in the control panel, then use a floating box with the panel/unique box information that dynamically stretches with the contents. The size limitations of the panel box and unique info box are just too restrictive and problematic, and aren't good for modding either.

@AJenbo
Copy link
Member

AJenbo commented Jan 18, 2025

Any time would be a good time for that :)

@Riccila
Copy link
Author

Riccila commented Jan 18, 2025

Dear developers, please note one more fact - I am attaching two screenshots. On one, it seems to me, the text is scaled and everything is perfectly visible on the other, it is not. In general, if a solution to the problem is found, it will be great. If everything has already been fixed, then consider that I just signaled.

@Riccila
Copy link
Author

Riccila commented Jan 18, 2025

Image Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants