Skip to content

Conversation

@Xenius97
Copy link
Contributor

@Xenius97 Xenius97 commented Nov 22, 2025

Closes #1029

This PR adds timestamp display option for chatbox/console

image image image

@Xenius97 Xenius97 changed the title Add timestamp display option to chatbox settings Add timestamp display option for chatbox/console Nov 22, 2025
@FileEX FileEX added the enhancement New feature or request label Nov 22, 2025
@omar-o22
Copy link
Contributor

Loved it.

@Xenius97 Xenius97 closed this by deleting the head repository Nov 23, 2025
@Xenius97 Xenius97 reopened this Nov 23, 2025
@SpeedyFolf
Copy link
Contributor

It'd be nice if chat and console were separate options, I'd like to have timestamp shown in console but not chat, I don't want to clutter chat too much but console is a bigger window

Copy link
Member

@qaisjp qaisjp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the pull request, here's some feedback

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Toggling the setting should show/hide the time in the chat and the console.

The current implementation conditionally modifies the chat string to include the time.

Instead I suggest you save the timestamp string + message string separately, and include the timestamp string conditionally at render time.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to change Console to support toggling. (mainly because the console is implemented as simply appending raw text to m_pHistory / a CGuiMemo, and I don't want to introduce another copy of the buffer)

DEFAULT("chat_text_alignment", Chat::Text::Align::LEFT); // chatbox horizontal text alignment
DEFAULT("server_can_flash_window", true); // allow server to flash the window
DEFAULT("allow_tray_notifications", true); // allow scripts to create tray balloon notifications
DEFAULT("show_time_in_chat", false); // show time prefix in chat messages
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SpeedyFolf's feedback is valid:

It'd be nice if chat and console were separate options, I'd like to have timestamp shown in console but not chat, I don't want to clutter chat too much but console is a bigger window

@Pieter-Dewachter
Copy link
Contributor

Pieter-Dewachter commented Jan 18, 2026

Maybe also a good idea to add it to the getChatboxLayout() function in Lua (CLuaGUIDefs.cpp)?

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

Successfully merging this pull request may close these issues.

Add a timestamp option in the chat configuration

6 participants