X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fshared%2Fstates.cpp;h=630d9a72e498cf87fae9d2793c4f4a48c9aac369;hb=cdd865c1934eccbb1f1d0ffaf041e53f0fdd524b;hp=f98382e39d30b587bcce82a3722dbda9350f3394;hpb=10a310869c61cc52046e165f36ac9639fe9d0c69;p=blank.git diff --git a/src/shared/states.cpp b/src/shared/states.cpp index f98382e..630d9a7 100644 --- a/src/shared/states.cpp +++ b/src/shared/states.cpp @@ -18,8 +18,8 @@ ChatState::ChatState(Environment &env, State &parent, Responder &responder) , input(env.assets.small_ui_font) { input.Position(glm::vec3(25.0f, -25.0f, -1.0f), Gravity::SOUTH_WEST, Gravity::SOUTH_WEST); input.Width(env.viewport.Width() - 50.0f); - input.Foreground(glm::vec4(1.0f)); - input.Background(glm::vec4(0.5f)); + input.Foreground(PrimitiveMesh::Color(255)); + input.Background(PrimitiveMesh::Color(127)); } void ChatState::Preset(const std::string &text) { @@ -138,12 +138,12 @@ void MessageState::ClearMessage() { } void MessageState::Handle(const SDL_Event &e) { - if (e.type == SDL_KEYDOWN) { + if (e.type == SDL_QUIT || e.type == SDL_KEYDOWN) { env.state.Pop(); } } -void MessageState::Update(int dt) { +void MessageState::Update(int) { }