Character limit label#1646
Conversation
…ers left - new StringID named characters_left_label - using buffer_2039 in TextInput::draw to display new counter
- making new label display position dependent on numer of digits in buffer_2039 - adding new string in language files
- changes to the code that displays the characters limit
|
Looks good. I've not tested it but can't see why it wouldn't work. |
|
this should get a changelog |
LeftofZen
left a comment
There was a problem hiding this comment.
- remove unused method, or use it
- use constant instead of hardcoded 199
- add changelog
|
edit: better idea from aaron below |
|
I'd show the character count left of the 'OK' button, below the input box. Leave the input box as-is, full-width. You could use the right-align text drawing function to this end as well. |
|
A quick google search shows most UI's put the count bottom right, so that's also an idea |
|
This begs the question if character limits are actually set correctly, as company names are actually limited to 32 characters. |
31 characters as you need the null |
|
I've resolved the conflicts this PR had as a result of merging #1651, and moved the label to look as proposed. Works nicely! |
|
@AaronVanGeffen @duncanspumpkin @LeftofZen. Thank you for all your reviews and help guys. Appreciate it :) |
|
@BartoszKedziorek my pleasure, thanks for a great feature and nice PR. Just a quick note for future PRs, after it's merged you can update the milestone to the next release as I did above ^ |
I believe only maintainers can do this, fwiw. |
Oh I didn't realise, sorry! I'm happy to add the versions anyways |

This PR refers to this issue: #1608
New label and counter, whichs allow user to see the characters limit and how many space is left.
Changes:
OpenLoco::Ui::Windows::TextInput::drawExample:


I was thinking about putting it between bottom-left corner of textbox and "ok" button, but in my opinion it looks good as it is.