-
Notifications
You must be signed in to change notification settings - Fork 284
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
feat: togglable message log window size #2511
Conversation
keeping it draft for a while until adding toggleable hotkey @olanti-p requested. |
spent 3 hours and inputs.h is a pain, i guess toggleable panel could be done in another PR |
Why would you be looking in The message window lives entirely in |
...oh wait it was |
6e0ef28
to
86b574a
Compare
...wait again, nevermind. had a nap and fixed it. |
When I wrote
I was referring to the window height, and to make it expandable, not expanded-by-default. On the screenshot, it's very hard to make out the text or follow what time the messages refer to because of the enormous height. |
...oh, i thought you meant about the width. could you clarify how should i change the behavior?
nevermind, i'm adding both |
@olanti-p ready to review. now message logs are default collapsed down per your request, and their width and height can be both widened via |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works nicely. Could you also add a hint for users somewhere?
You could extend the existing hint in Messages::dialog::show()
e.g. from
_( "< Press %s to filter, %s to reset >" )
to
_( "< Press %s to filter, %s to reset, %s or %s to adjust size >" )
we're not providing way to customize message log dimension so using struct is overkill.
pre-step for furthur refactorings
i doubt this is the best solution but it works
Co-authored-by: Olanti <olanti-p@yandex.ru>
Co-authored-by: olanti-p <olanti-p@yandex.ru>
Co-authored-by: Olanti <olanti-p@yandex.ru>
Co-authored-by: olanti-p <olanti-p@yandex.ru>
Summary
SUMMARY: Interface "Toggleable message log window size"
Purpose of change
Describe the solution
now width and height of message log can be toggled via
w
andh
respectively.Core logic
logic help from @olanti-p.
flowchart:
input
, toggle_wide_display() is triggered.init()
.init()
. new size is selected when set_size() is triggered.Describe alternatives you've considered
pain
Testing
tried restarting game after changing display size. it was persistent.
also, as olanti requested, key help correctly works.