input + game console, symbol changes

playerKeys isn't working though :P
This commit is contained in:
m
2022-05-18 19:14:06 -05:00
parent 16867939e2
commit b14af3433e
3 changed files with 20 additions and 16 deletions

View File

@ -391,7 +391,7 @@ namespace game_console
const auto width = (con.screen_max[0] - con.screen_min[0]) - 12.0f;
const auto height = ((con.screen_max[1] - con.screen_min[1]) - 32.0f) - 12.0f;
game::R_AddCmdDrawText("H1-Mod 1.4", 0x7FFFFFFF, console_font, x,
game::R_AddCmdDrawText("H1-Mod 1.15", 0x7FFFFFFF, console_font, x,
((height - 16.0f) + y) + console_font->pixelHeight, 1.0f, 1.0f, 0.0f, color_title, 0);
draw_output_scrollbar(x, y, width, height, output);
@ -586,7 +586,9 @@ namespace game_console
return false;
}
if (game::playerKeys[local_client_num].keys[game::keyNum_t::K_SHIFT].down)
const auto shift_down = game::playerKeys[local_client_num].keys[game::keyNum_t::K_SHIFT].down;
console::info("shift down? %d", shift_down);
if (shift_down)
{
if (!(*game::keyCatchers & 1))
toggle_console();
@ -721,14 +723,13 @@ namespace game_console
return;
}
//scheduler::loop(draw_console, scheduler::pipeline::renderer);
scheduler::loop(draw_console, scheduler::pipeline::renderer);
}
void post_unpack() override
{
scheduler::loop(draw_console, scheduler::pipeline::renderer);
if (game::environment::is_dedi())
{
return;
@ -797,4 +798,4 @@ namespace game_console
};
}
//REGISTER_COMPONENT(game_console::component)
REGISTER_COMPONENT(game_console::component)

View File

@ -16,9 +16,9 @@ namespace input
utils::hook::detour cl_char_event_hook;
utils::hook::detour cl_key_event_hook;
void cl_char_event_stub(const int local_client_num, const int key)
{
/*
if (ui_scripting::lui_running())
{
ui_scripting::notify("keypress",
@ -27,6 +27,7 @@ namespace input
{"key", game::Key_KeynumToString(key, 0, 1)},
});
}
*/
if (!game_console::console_char_event(local_client_num, key))
{
@ -38,6 +39,7 @@ namespace input
void cl_key_event_stub(const int local_client_num, const int key, const int down)
{
/*
if (ui_scripting::lui_running())
{
ui_scripting::notify(down ? "keydown" : "keyup",
@ -46,6 +48,7 @@ namespace input
{"key", game::Key_KeynumToString(key, 0, 1)},
});
}
*/
if (!game_console::console_key_event(local_client_num, key, down))
{
@ -72,4 +75,4 @@ namespace input
};
}
//REGISTER_COMPONENT(input::component)
REGISTER_COMPONENT(input::component)