Skip to content
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

Add /clear chat command #6457

Merged
merged 5 commits into from Jan 30, 2022
Merged

Conversation

macabeus
Copy link
Contributor

Solves #3202

Add /clear chat command

Jan-23-2022.22-54-15.mp4

Copy link
Contributor

@stevecotton stevecotton left a comment

Choose a reason for hiding this comment

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

Welcome to the project, but sadly this crashes when used in the MP lobby's chatbox. I've just added a screenshot to #3202 showing which screen I mean.

For in-game chat, I think it's good to have /clear work here too. There's already a :clear command, but having both is user-friendly.

@Wedge009 Wedge009 added the UI User interface issues, including both back-end and front-end issues. label Jan 24, 2022
@stevecotton
Copy link
Contributor

Sorry, but the latest version still crashes when /clear is used in the multiplayer lobby.

Steps:

  1. Start Wesnoth
  2. Click on "Multiplayer", "Host Networked Game"
  3. Type "/clear"
  4. game_display::get_singleton() returns a null pointer, leading to a crash in game_display::get_chat_manager()

@macabeus
Copy link
Contributor Author

@stevecotton Yeah. I got to reproduce it, but I'm wondering how to fix it.
Do you have some tips on how to fix it?

I noticed the lobby chat is pretty different.

@macabeus macabeus marked this pull request as draft January 25, 2022 11:03
@macabeus
Copy link
Contributor Author

@stevecotton I hope it's working well now

Jan-26-2022.00-42-38.mp4

@macabeus macabeus marked this pull request as ready for review January 26, 2022 00:44
src/chat_events.cpp Outdated Show resolved Hide resolved
@macabeus macabeus marked this pull request as draft January 26, 2022 01:39
@macabeus macabeus marked this pull request as ready for review January 27, 2022 04:04
@macabeus macabeus marked this pull request as draft January 27, 2022 05:32
@macabeus macabeus marked this pull request as ready for review January 29, 2022 18:27
Copy link
Contributor

@stevecotton stevecotton left a comment

Choose a reason for hiding this comment

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

Looks good. Happy to merge as-is, or after changing that line to use .empty().

src/gui/widgets/chatbox.cpp Outdated Show resolved Hide resolved
@stevecotton stevecotton merged commit 3035a1a into wesnoth:master Jan 30, 2022
@macabeus macabeus deleted the add/clear-command branch January 30, 2022 20:18
macabeus added a commit to macabeus/wesnoth that referenced this pull request Jan 31, 2022
Asheviere pushed a commit to Asheviere/wesnoth that referenced this pull request Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UI User interface issues, including both back-end and front-end issues.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants