summaryrefslogtreecommitdiffstats
path: root/src/Render.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Render.cpp')
-rw-r--r--src/Render.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/Render.cpp b/src/Render.cpp
index a76bba7..3bf1e6b 100644
--- a/src/Render.cpp
+++ b/src/Render.cpp
@@ -29,7 +29,8 @@ const std::map<SDL_Keycode, Rml::Input::KeyIdentifier> keyMapping = {
{SDLK_RIGHT, Rml::Input::KI_RIGHT},
{SDLK_UP, Rml::Input::KI_UP},
{SDLK_DOWN, Rml::Input::KI_DOWN},
- {SDLK_TAB, Rml::Input::KI_TAB}
+ {SDLK_TAB, Rml::Input::KI_TAB},
+ {SDLK_RETURN, Rml::Input::KI_RETURN}
};
inline int ConvertKeymodsSdlToRml(unsigned short keyMods) {
@@ -288,9 +289,6 @@ void Render::HandleEvents() {
if (state == State::Playing) {
SetState(State::Chat);
}
- else if (state == State::Chat) {
- SetState(State::Playing);
- }
break;
}
@@ -477,12 +475,6 @@ void Render::InitEvents() {
SetState(State::Loading);
});
- listener.RegisterHandler("ChatMessageReceived", [this](const Event& eventData) {
- auto data = eventData.get<std::tuple<Chat, unsigned char>>();
- std::string msg = "(" + std::to_string((int)std::get<1>(data)) + ") " + (std::get<0>(data).ToPlainText());
- chatMessages.push_back(msg);
- });
-
listener.RegisterHandler("StateUpdated", [this](const Event& eventData) {
switch (GetState()) {
case State::Playing: