Some changes

This commit is contained in:
Federico Cecchetto 2022-07-15 00:12:27 +02:00
parent 941766597f
commit bd56afd4c5
3 changed files with 10 additions and 12 deletions

View File

@ -27,7 +27,7 @@ namespace discord
state = {}; state = {};
details.reset(); details.reset();
discord_presence.details = "Main Menu"; discord_presence.details = game::UI_SafeTranslateString("MENU_MAIN_MENU");
discord_presence.state = ""; discord_presence.state = "";
discord_presence.startTimestamp = 0; discord_presence.startTimestamp = 0;

View File

@ -194,14 +194,8 @@ namespace game_console
con.globals.left_x = con.globals.x; con.globals.left_x = con.globals.x;
con.globals.auto_complete_choice[0] = 0; con.globals.auto_complete_choice[0] = 0;
/*
game::R_AddCmdDrawTextWithCursor(con.buffer, 0x7FFFFFFF, console_font, 18, con.globals.x, game::R_AddCmdDrawTextWithCursor(con.buffer, 0x7FFFFFFF, console_font, 18, con.globals.x,
con.globals.y + con.globals.font_height, 1.0f, 1.0f, 0, color_white, 0, con.globals.y + con.globals.font_height, 1.0f, 1.0f, 0, color_white, nullptr, con.cursor, '|');
con.cursor, '|');
*/
game::R_AddCmdDrawText(con.buffer, 0x7FFF, console_font, con.globals.x,
con.globals.y + con.globals.font_height, 1.0f, 1.0f, 0.0f, color_white, 0);
// check if using a prefixed '/' or not // check if using a prefixed '/' or not
const auto input = con.buffer[1] && (con.buffer[0] == '/' || con.buffer[0] == '\\') const auto input = con.buffer[1] && (con.buffer[0] == '/' || con.buffer[0] == '\\')
@ -443,13 +437,13 @@ namespace game_console
{ {
if (con.globals.may_auto_complete) if (con.globals.may_auto_complete)
{ {
const auto firstChar = con.buffer[0]; const auto first_char = con.buffer[0];
clear(); clear();
if (firstChar == '\\' || firstChar == '/') if (first_char == '\\' || first_char == '/')
{ {
con.buffer[0] = firstChar; con.buffer[0] = first_char;
con.buffer[1] = '\0'; con.buffer[1] = '\0';
} }

View File

@ -124,9 +124,13 @@ namespace game
float rotation, float* color1, float* color2, int style)> R_AddCmdDrawText2{0x14076C860}; float rotation, float* color1, float* color2, int style)> R_AddCmdDrawText2{0x14076C860};
WEAK symbol<void(rectangle* rect, float a2, float a3, float a4, float a5, float* color, Material* material)> R_DrawRectangle{0x14076A280}; WEAK symbol<void(rectangle* rect, float a2, float a3, float a4, float a5, float* color, Material* material)> R_DrawRectangle{0x14076A280};
WEAK symbol<void(const char* text, int maxChars, Font_s* font, int fontSize, float x, float y, float xScale, float yScale, float rotation, WEAK symbol<void(const char* text, int maxChars, Font_s* font, int fontSize, float x, float y, float xScale, float yScale, float rotation,
const float* color, int style, int cursorPos, char cursor)> R_AddCmdDrawTextWithCursor{0x14076CAF0}; const float* color, int style, int cursorPos, char cursor, void* fontGlowStyle)> AddBaseDrawTextCmd{0x14076CAF0};
WEAK symbol<int(void* font)> R_GetFontHeight{0x1407470C0};
WEAK symbol<void*(int style)> R_GetFontGlowStyle{0x140746680};
WEAK symbol<void*(const char* text, int maxChars, Font_s* font, float x, float y, float xScale, float yScale, WEAK symbol<void*(const char* text, int maxChars, Font_s* font, float x, float y, float xScale, float yScale,
int a8, float* color1, unsigned int style, rgba color2)> R_AddCmdDrawTextGradient{0x14076C570}; int a8, float* color1, unsigned int style, rgba color2)> R_AddCmdDrawTextGradient{0x14076C570};
WEAK symbol<void(char const* text, int maxChars, Font_s* font, int height, float x, float y, float xScale, float yScale,
float rotation, float const* color, void* font_glow_style, int, char)> R_AddCmdDrawTextWithCursor{0x14076CAF0};
WEAK symbol<Font_s*(const char* font, int size)> R_RegisterFont{0x140746FE0}; WEAK symbol<Font_s*(const char* font, int size)> R_RegisterFont{0x140746FE0};
WEAK symbol<int(const char* text, int maxChars, Font_s* font)> R_TextWidth{0x1407472A0}; WEAK symbol<int(const char* text, int maxChars, Font_s* font)> R_TextWidth{0x1407472A0};
WEAK symbol<void()> R_SyncRenderThread{0x14076E7D0}; WEAK symbol<void()> R_SyncRenderThread{0x14076E7D0};