Pārlūkot izejas kodu

InputText: fixed single-line InputText() not applying fine character clipping properly (regression in 1.92.3). (#8967)

ocornut 3 nedēļas atpakaļ
vecāks
revīzija
1c87024840
2 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 2 0
      docs/CHANGELOG.txt
  2. 1 1
      imgui_widgets.cpp

+ 2 - 0
docs/CHANGELOG.txt

@@ -62,6 +62,8 @@ Other Changes:
 - Windows: added lower-right resize grip on child windows using both
   ImGuiChildFlags_ResizeX and ImGuiChildFlags_ResizeY flags. (#8501) [@aleksijuvani]
   The grip is not visible before hovering to reduce clutter.
+- InputText: fixed single-line InputText() not applying fine character clipping
+  properly (regression in 1.92.3). (#8967) [@Cyphall]
 - IO: added ImGuiPlatformIO::ClearPlatformHandlers(), ClearRendererHandlers()
   helpers to null all handlers. (#8945, #2769)
 - Misc: Debuggers: added type formatters for the LLDB debuggers (e.g. Xcode,

+ 1 - 1
imgui_widgets.cpp

@@ -5525,7 +5525,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
             text_col, clip_rect.AsVec4(),
             line_index->get_line_begin(buf_display, line_visible_n0),
             line_index->get_line_end(buf_display, line_visible_n1 - 1),
-            wrap_width, ImDrawTextFlags_WrapKeepBlanks);
+            wrap_width, ImDrawTextFlags_WrapKeepBlanks | ImDrawTextFlags_CpuFineClip);
 
     // Render blinking cursor
     if (render_cursor)