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
Feature: Reveal chat history when chat message box is open. #9025
Conversation
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.
Some minor thingie. :)
static std::deque<ChatMessage> _chatmsg_list; ///< The actual chat message list. | ||
static bool _chatmessage_dirty = false; ///< Does the chat message need repainting? | ||
static bool _chatmessage_visible = false; ///< Is a chat message visible. | ||
static bool _chat_tab_completion_active; ///< Whether tab completion is active. | ||
static uint MAX_CHAT_MESSAGES = 0; ///< The limit of chat messages to show. | ||
|
||
/** | ||
* Time the chat history was marked dirty. This is used to determine if expired | ||
* messages have recently expired and should cause a redraw to hide them. | ||
*/ | ||
static std::chrono::steady_clock::time_point _chatmessage_dirty_time; |
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.
Might be worth combining these all into a struct? Just to hold everything together
Tweaked to keep list in the order it is displayed, so no reverse iteration is required. |
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.
Sure.
Motivation / Problem
Chat history is removed from the screen after a few seconds. It is visible by opening the console, but this fills a large portion of the screen and may also contain other non-chat messages. It also requires extra keypresses.
Description
Instead of removing chat messages after the chat duration, they are now hidden from the normal chat history, until the chat message box is opened, where the full message history is automatically revealed.
Limitations
Default chat history length seems to be quite long by default.
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.