Skip to content

Commit da76231

Browse files
committed
fix console size
1 parent 1dd73a4 commit da76231

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

UE4SS/include/GUI/GUI.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ namespace RC::GUI
8585
#define XDIV (g_backend_properties.xdiv)
8686
#define YDIV (g_backend_properties.ydiv)
8787
#define SEPARATOR_HEIGHT (g_backend_properties.separator_height)
88+
#define NEGATIVE_MARGIN(x) (IS_TUI ? (-0.01f) : (x))
8889
#define IS_TUI (g_backend_properties.quirk_tui)
8990

9091
class GfxBackendBase

UE4SS/src/GUI/Console.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,8 @@ namespace RC::GUI
132132
std::lock_guard<std::mutex> guard(m_lines_mutex);
133133
// TODO: ensure this ydiv is okay?
134134
// the old value is const float footer_height_to_reserve = ((ImGui::GetStyle().ItemSpacing.y * 10.0f) + ImGui::GetFrameHeightWithSpacing()) / YDIV;
135-
136-
const float footer_height_to_reserve = ((ImGui::GetStyle().ItemSpacing.y * 10.0f) + ImGui::GetFrameHeightWithSpacing()) / YDIV;
137135

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

141138
ImGui_AutoScroll("TextEditor", &m_previous_max_scroll_y);
142139
//*/

0 commit comments

Comments
 (0)