Update game_console

This commit is contained in:
Federico Cecchetto 2021-04-24 00:26:31 +02:00
parent 457605c2b2
commit 6ee4a8a6af
2 changed files with 13 additions and 11 deletions

View File

@ -58,7 +58,7 @@ namespace game_console
std::vector<std::string> matches;
float color_white[4] = {1.0f, 1.0f, 1.0f, 1.0f};
float color_iw6[4] = { 0.0f, 0.7f, 1.0f, 1.0f };
float color_h2[4] = {0.9f, 0.9f, 0.5f, 1.0f};
void clear()
{
@ -215,7 +215,7 @@ namespace game_console
con.globals.left_x = con.screen_min[0] + 6.0f;
draw_input_box(1, dvars::con_inputBoxColor->current.vector);
draw_input_text_and_over("h1-mod >", color_iw6);
draw_input_text_and_over("h1-mod >", color_h2);
con.globals.left_x = con.globals.x;
con.globals.auto_complete_choice[0] = 0;
@ -334,7 +334,7 @@ namespace game_console
const auto height = ((con.screen_max[1] - con.screen_min[1]) - 32.0f) - 12.0f;
game::R_AddCmdDrawText("h1-mod", 0x7FFFFFFF, console_font, x,
((height - 16.0f) + y) + console_font->pixelHeight, 1.0f, 1.0f, 0.0f, color_iw6, 0);
((height - 16.0f) + y) + console_font->pixelHeight, 1.0f, 1.0f, 0.0f, color_h2, 0);
draw_output_scrollbar(x, y, width, height);
draw_output_text(x, y);
@ -381,7 +381,7 @@ namespace game_console
bool console_char_event(const int localClientNum, const int key)
{
if (key == game::keyNum_t::K_GRAVE || key == game::keyNum_t::K_TILDE)
if (key == '|' || key == '\\')
{
return false;
}
@ -604,7 +604,7 @@ namespace game_console
history.push_front(con.buffer);
print("]"s.append(con.buffer));
print(""s.append(con.buffer));
if (history.size() > 10)
{
@ -676,7 +676,7 @@ namespace game_console
dvars::con_outputSliderColor = game::Dvar_RegisterVec4(
game::generateHashValue("con_outputSliderColor"), a2,
0.0f, 0.7f, 1.0f, 1.00f,
0.9f, 0.9f, 0.5f, 1.00f,
0.0f, 1.0f,
1);

View File

@ -32,6 +32,8 @@ namespace game
WEAK symbol<unsigned int(int entnum, unsigned int classnum)> FindEntityId{0x5C1C50};
WEAK symbol<void(VariableValue* result, unsigned int classnum, int entnum, int offset)> GetEntityFieldValue{0x5C6100};
WEAK symbol<char*(char* string)> I_CleanStr{0x620660};
WEAK symbol<Material*(const char* material)> Material_RegisterHandle{0x759BA0};
WEAK symbol<const float* (const float* v)> Scr_AllocVector{0x5C3220};