ui: experimental message box width auto-sizing #2

Merged
NotAShelf merged 2 commits from amr/rogged:msgfix into main 2026-04-04 17:37:19 +00:00
Collaborator

I noticed that the "Descend to next floor? (Y/N)" messagebox was the wrong width. So I decided to do some quick math and try to work out the optimum sizing for each message.
As it is now, it's balanced for the exact font and size you're using, so if you change it the msg_ratio and possibly the width divisor would need to be tweaked again, though that's not too hard.
Down the line this could be automated as well, just by inputting the character width (if monospace) or at least average character width and then doing all calculations from that.

It works pretty well as far as I've tested it.

I noticed that the "Descend to next floor? (Y/N)" messagebox was the wrong width. So I decided to do some quick math and try to work out the optimum sizing for each message. As it is now, it's balanced for the exact font and size you're using, so if you change it the msg_ratio and possibly the width divisor would need to be tweaked again, though that's not too hard. Down the line this could be automated as well, just by inputting the character width (if monospace) or at least average character width and then doing all calculations from that. It works pretty well as far as I've tested it.
amr requested review from NotAShelf 2026-04-04 04:18:41 +00:00
Author
Collaborator

Weird, I clicked "assign to me" and it assigned you

Weird, I clicked "assign to me" and it assigned you
Owner

I think "assign to me" doesn't work becauase you aren't a repository member. I'll add you as one, so it works in the future.

I think "assign to me" doesn't work becauase you aren't a repository member. I'll add you as one, so it works in the future.
NotAShelf approved these changes 2026-04-04 17:37:14 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
NotAShelf/rogged!2
No description provided.