mirror of
https://git.citron-emu.org/citron/emulator
synced 2025-12-22 03:43:42 +00:00
Edit: multiplayer_room_overlay.cpp
This commit is contained in:
@@ -174,7 +174,7 @@ void MultiplayerRoomOverlay::ConnectToRoom() {
|
|||||||
if (multiplayer_state->IsClientRoomVisible()) {
|
if (multiplayer_state->IsClientRoomVisible()) {
|
||||||
chat_room_widget->setEnabled(false);
|
chat_room_widget->setEnabled(false);
|
||||||
chat_room_widget->Clear();
|
chat_room_widget->Clear();
|
||||||
chat_room_widget->AppendStatusMessage(tr("Chat available in main window."));
|
chat_room_widget->AppendStatusMessage(tr("In order to use chat functionality in the Overlay, please close the Multiplayer Room Window."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -217,7 +217,7 @@ void MultiplayerRoomOverlay::UpdateRoomData() {
|
|||||||
if (chat_room_widget->isEnabled()) {
|
if (chat_room_widget->isEnabled()) {
|
||||||
chat_room_widget->setEnabled(false);
|
chat_room_widget->setEnabled(false);
|
||||||
chat_room_widget->Clear();
|
chat_room_widget->Clear();
|
||||||
chat_room_widget->AppendStatusMessage(tr("Chat available in main window."));
|
chat_room_widget->AppendStatusMessage(tr("In order to use chat functionality in the Overlay, please close the Multiplayer Room Window."));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -231,9 +231,6 @@ void MultiplayerRoomOverlay::UpdateRoomData() {
|
|||||||
QString label_text = QString::fromStdString("Players Online: <span style='color: #4CAF50;'>%1</span>").arg(members.size());
|
QString label_text = QString::fromStdString("Players Online: <span style='color: #4CAF50;'>%1</span>").arg(members.size());
|
||||||
players_online_label->setText(label_text);
|
players_online_label->setText(label_text);
|
||||||
|
|
||||||
// FIX: Removed the redundant logic that was generating duplicate join/leave messages.
|
|
||||||
// The ChatRoom widget is now the single source of truth for these messages.
|
|
||||||
|
|
||||||
if (chat_room_widget->isEnabled()) {
|
if (chat_room_widget->isEnabled()) {
|
||||||
chat_room_widget->SetPlayerList(members);
|
chat_room_widget->SetPlayerList(members);
|
||||||
}
|
}
|
||||||
@@ -249,4 +246,4 @@ void MultiplayerRoomOverlay::UpdatePosition() {
|
|||||||
QPoint main_window_pos = main_window->mapToGlobal(QPoint(0, 0));
|
QPoint main_window_pos = main_window->mapToGlobal(QPoint(0, 0));
|
||||||
move(main_window_pos.x() + main_window->width() - this->width() - 10, main_window_pos.y() + 10);
|
move(main_window_pos.x() + main_window->width() - this->width() - 10, main_window_pos.y() + 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user