From dcf35e4877e82f5213a728f82fab54612786a089 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Mon, 11 Mar 2024 22:06:43 +0200 Subject: [PATCH] Clicking "Create New Room" button with active room now will switch to game lobby UI --- client/globalLobby/GlobalLobbyWidget.cpp | 2 +- config/widgets/lobbyWindow.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/globalLobby/GlobalLobbyWidget.cpp b/client/globalLobby/GlobalLobbyWidget.cpp index c2cd35f07..562aa7835 100644 --- a/client/globalLobby/GlobalLobbyWidget.cpp +++ b/client/globalLobby/GlobalLobbyWidget.cpp @@ -31,7 +31,7 @@ GlobalLobbyWidget::GlobalLobbyWidget(GlobalLobbyWindow * window) { addCallback("closeWindow", [](int) { GH.windows().popWindows(1); }); addCallback("sendMessage", [this](int) { this->window->doSendChatMessage(); }); - addCallback("createGameRoom", [this](int) { this->window->doCreateGameRoom(); }); + addCallback("createGameRoom", [this](int) { if (!CSH->inGame()) this->window->doCreateGameRoom(); else GH.windows().popWindows(1); }); REGISTER_BUILDER("accountList", &GlobalLobbyWidget::buildAccountList); REGISTER_BUILDER("roomList", &GlobalLobbyWidget::buildRoomList); diff --git a/config/widgets/lobbyWindow.json b/config/widgets/lobbyWindow.json index dd87236b4..cb173d7e5 100644 --- a/config/widgets/lobbyWindow.json +++ b/config/widgets/lobbyWindow.json @@ -190,7 +190,7 @@ "font": "medium", "alignment": "center", "color": "yellow", - "text": "Create Room" + "text": "Create New Room" } ] },