1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

Added list of active accounts and rooms to UI. Added room creation logic

This commit is contained in:
Ivan Savenko
2024-01-21 16:48:36 +02:00
parent 9e62eb28c5
commit 388ca6e776
37 changed files with 698 additions and 304 deletions

View File

@@ -16,6 +16,8 @@
#include "../gui/CGuiHandler.h"
#include "../gui/EventDispatcher.h"
#include "../gui/ShortcutHandler.h"
#include "../CServerHandler.h"
#include "../globalLobby/GlobalLobbyClient.h"
#include <SDL_clipboard.h>
#include <SDL_events.h>
@@ -31,6 +33,8 @@ InputSourceKeyboard::InputSourceKeyboard()
void InputSourceKeyboard::handleEventKeyDown(const SDL_KeyboardEvent & key)
{
assert(key.state == SDL_PRESSED);
if (SDL_IsTextInputActive() == SDL_TRUE)
{
if(key.keysym.sym == SDLK_v && isKeyboardCtrlDown())
@@ -51,7 +55,11 @@ void InputSourceKeyboard::handleEventKeyDown(const SDL_KeyboardEvent & key)
return; // ignore periodic event resends
}
assert(key.state == SDL_PRESSED);
if(key.keysym.sym == SDLK_TAB && isKeyboardCtrlDown())
{
CSH->getGlobalLobby().activateInterface();
}
if(key.keysym.sym >= SDLK_F1 && key.keysym.sym <= SDLK_F15 && settings["session"]["spectate"].Bool())
{