mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-26 00:40:15 +00:00
feat: add Guild chat tab and fix Trade/LFG tab index after insertion
Inserts a dedicated "Guild" tab between Whispers and Trade/LFG that shows guild, officer, and guild achievement messages. Updates the Trade/LFG channel-name filter from hardcoded index 3 to 4 to match the new tab order.
This commit is contained in:
parent
afcd6f2db3
commit
db1f111054
1 changed files with 6 additions and 2 deletions
|
|
@ -222,6 +222,10 @@ void GameScreen::initChatTabs() {
|
|||
// Whispers tab
|
||||
chatTabs_.push_back({"Whispers", (1ULL << static_cast<uint8_t>(game::ChatType::WHISPER)) |
|
||||
(1ULL << static_cast<uint8_t>(game::ChatType::WHISPER_INFORM))});
|
||||
// Guild tab: guild and officer chat
|
||||
chatTabs_.push_back({"Guild", (1ULL << static_cast<uint8_t>(game::ChatType::GUILD)) |
|
||||
(1ULL << static_cast<uint8_t>(game::ChatType::OFFICER)) |
|
||||
(1ULL << static_cast<uint8_t>(game::ChatType::GUILD_ACHIEVEMENT))});
|
||||
// Trade/LFG tab: channel messages
|
||||
chatTabs_.push_back({"Trade/LFG", (1ULL << static_cast<uint8_t>(game::ChatType::CHANNEL))});
|
||||
}
|
||||
|
|
@ -233,8 +237,8 @@ bool GameScreen::shouldShowMessage(const game::MessageChatData& msg, int tabInde
|
|||
|
||||
uint64_t typeBit = 1ULL << static_cast<uint8_t>(msg.type);
|
||||
|
||||
// For Trade/LFG tab, also filter by channel name
|
||||
if (tabIndex == 3 && msg.type == game::ChatType::CHANNEL) {
|
||||
// For Trade/LFG tab (now index 4), also filter by channel name
|
||||
if (tabIndex == 4 && msg.type == game::ChatType::CHANNEL) {
|
||||
const std::string& ch = msg.channelName;
|
||||
if (ch.find("Trade") == std::string::npos &&
|
||||
ch.find("General") == std::string::npos &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue