mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
ImGui: also take vertical scrollbar into account
Show horizontal scrollbar when console text gets overlapped by the vertical scrollbar.
This commit is contained in:
parent
e198980be4
commit
91d00d0ab3
4
r5dev/thirdparty/imgui/misc/imgui_logger.cpp
vendored
4
r5dev/thirdparty/imgui/misc/imgui_logger.cpp
vendored
@ -765,6 +765,7 @@ void CTextLogger::Render()
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0.0f, 0.0f));
|
||||
|
||||
ImGuiWindow* const pWindow = ImGui::GetCurrentWindow();
|
||||
const ImGuiStyle& style = ImGui::GetStyle();
|
||||
|
||||
const ImGuiID activeID = ImGui::GetActiveID();
|
||||
const ImGuiID hoveredID = ImGui::GetHoveredID();
|
||||
@ -878,7 +879,8 @@ void CTextLogger::Render()
|
||||
// This dummy is here to let Dear ImGui know where the last character of
|
||||
// the line had ended, so that it could properly process the horizontal
|
||||
// scrollbar
|
||||
ImGui::Dummy(ImVec2((longest + 2), m_Lines.size() * m_CharAdvance.y));
|
||||
const float additional = pWindow->ScrollbarY ? style.ScrollbarSize : 0.0f;
|
||||
ImGui::Dummy(ImVec2(longest + additional, m_Lines.size() * m_CharAdvance.y));
|
||||
|
||||
m_bScrolledToStart = ImGui::GetScrollX() == 0.0f;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user