mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 21:47:40 -05:00
fix: Text Editor Scrollbars being added multiple times
This commit is contained in:
@@ -1263,12 +1263,14 @@ void TextEditor::Render(const char *aTitle, const ImVec2 &aSize, bool aBorder) {
|
||||
window->ScrollbarSizes = ImVec2(scrollBarSize * scroll_x, scrollBarSize * scroll_y);
|
||||
ImGui::GetCurrentWindowRead()->ScrollbarSizes = ImVec2(scrollBarSize * scroll_y, scrollBarSize * scroll_x);
|
||||
if (scroll_y) {
|
||||
ImGui::GetCurrentWindow()->ScrollbarY= true;
|
||||
ImGui::GetCurrentWindow()->ScrollbarY = true;
|
||||
ImGui::Scrollbar(ImGuiAxis_Y);
|
||||
ImGui::GetCurrentWindow()->ScrollbarY = false;
|
||||
}
|
||||
if (scroll_x) {
|
||||
ImGui::GetCurrentWindow()->ScrollbarX= true;
|
||||
ImGui::GetCurrentWindow()->ScrollbarX = true;
|
||||
ImGui::Scrollbar(ImGuiAxis_X);
|
||||
ImGui::GetCurrentWindow()->ScrollbarX = false;
|
||||
}
|
||||
|
||||
if (mHandleKeyboardInputs) {
|
||||
|
||||
Reference in New Issue
Block a user