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

@ -57,8 +57,8 @@ namespace game_console
std::string fixed_input;
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_white[4] = {1.0f, 1.0f, 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

@ -18,11 +18,11 @@ namespace game
DB_EnumXAssets_Internal{0x4129F0};
WEAK symbol<const char* (const XAsset* asset)> DB_GetXAssetName{0x3E4090};
WEAK symbol<dvar_t* (const char* name)> Dvar_FindVar{0x618F90};
WEAK symbol<dvar_t*(const char* name)> Dvar_FindVar{0x618F90};
WEAK symbol<void(char* buffer, int index)> Dvar_GetCombinedString{0x5A75D0};
WEAK symbol<dvar_t* (const char* dvarName, bool value, unsigned int flags, const char* description)>
WEAK symbol<dvar_t*(const char* dvarName, bool value, unsigned int flags, const char* description)>
Dvar_RegisterBool{0x617BB0};
WEAK symbol<dvar_t* (int dvarName, const char* a2, float x, float y, float z, float w, float min, float max,
WEAK symbol<dvar_t*(int dvarName, const char* a2, float x, float y, float z, float w, float min, float max,
unsigned int flags)> Dvar_RegisterVec4{0x6185F0};
WEAK symbol<const char* (dvar_t* dvar, void* a2, void* value)> Dvar_ValueToString{0x61B8F0};
WEAK symbol<void(int hash, const char* name, const char* buffer)> Dvar_SetCommand{0x61A5C0};
@ -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};
@ -56,7 +58,7 @@ namespace game
WEAK symbol<void()> Sys_ShowConsole{0x633080};
WEAK symbol<void* (jmp_buf* Buf, int Value)> longjmp{0x89EED0};
WEAK symbol<void*(jmp_buf* Buf, int Value)> longjmp{0x89EED0};
WEAK symbol<int(jmp_buf* Buf)> _setjmp{0x8EC2E0};
// Variables