Skip to content

Commit

Permalink
fix console size
Browse files Browse the repository at this point in the history
  • Loading branch information
Yangff committed Jun 9, 2024
1 parent 1dd73a4 commit da76231
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions UE4SS/include/GUI/GUI.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ namespace RC::GUI
#define XDIV (g_backend_properties.xdiv)
#define YDIV (g_backend_properties.ydiv)
#define SEPARATOR_HEIGHT (g_backend_properties.separator_height)
#define NEGATIVE_MARGIN(x) (IS_TUI ? (-0.01f) : (x))
#define IS_TUI (g_backend_properties.quirk_tui)

class GfxBackendBase
Expand Down
5 changes: 1 addition & 4 deletions UE4SS/src/GUI/Console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,8 @@ namespace RC::GUI
std::lock_guard<std::mutex> guard(m_lines_mutex);
// TODO: ensure this ydiv is okay?
// the old value is const float footer_height_to_reserve = ((ImGui::GetStyle().ItemSpacing.y * 10.0f) + ImGui::GetFrameHeightWithSpacing()) / YDIV;

const float footer_height_to_reserve = ((ImGui::GetStyle().ItemSpacing.y * 10.0f) + ImGui::GetFrameHeightWithSpacing()) / YDIV;

// m_text_editor.Render("TextEditor", {-16.0f / XDIV, (-31.0f + -8.0f) / YDIV});
m_text_editor.Render("TextEditor", {-16.0f / XDIV, footer_height_to_reserve});
m_text_editor.Render("TextEditor", {-16.0f / XDIV, NEGATIVE_MARGIN(-31.0f + -8.0f)});

ImGui_AutoScroll("TextEditor", &m_previous_max_scroll_y);
//*/
Expand Down

0 comments on commit da76231

Please sign in to comment.