Game console fixes

This commit is contained in:
fed 2022-03-03 12:51:02 +01:00
parent 7624d400cb
commit 37fe43d426

View File

@ -59,7 +59,7 @@ namespace game_console
std::vector<std::string> matches{}; std::vector<std::string> matches{};
float color_white[4] = {1.0f, 1.0f, 1.0f, 1.0f}; float color_white[4] = {1.0f, 1.0f, 1.0f, 1.0f};
float color_title[4] = {0.9f, 0.9f, 0.5f, 1.0f}; float color_title[4] = {0.25f, 0.62f, 0.3f, 1.0f};
void clear() void clear()
{ {
@ -453,11 +453,19 @@ namespace game_console
bool console_char_event(const int local_client_num, const int key) bool console_char_event(const int local_client_num, const int key)
{ {
if (key == game::keyNum_t::K_GRAVE || key == game::keyNum_t::K_TILDE) if (key == game::keyNum_t::K_GRAVE ||
key == game::keyNum_t::K_TILDE ||
key == '|' ||
key == '\\')
{ {
return false; return false;
} }
if (key > 127)
{
return true;
}
if (*game::keyCatchers & 1) if (*game::keyCatchers & 1)
{ {
if (key == game::keyNum_t::K_TAB) // tab (auto complete) if (key == game::keyNum_t::K_TAB) // tab (auto complete)