- TextProxy works for any widget that sets PlatformImeData.WantTextInput (+ SelectedText) - TextProxy: key-code fallback waits for the TextBox (fixes doubled typing); no stuck Ctrl after paste - Raster: reversed rects (min > max) draw like upstream (fixes ImNodes/ImPlot box select) - test harness: --module NAME=path loads extra ModuleScripts - new tests: t_textproxy_custom, t_rect_flip - extensions/: submodules for imguicolortextedit-luau, imguizmo-luau, implot-luau, implot3d-luau, imnodes-luau
This commit is contained in:
1 parent
c5a0b20132
commit
e2d1cf5cf9
24 files changed
+291
-46
No files matched your search
+6
-2
@@ -1438,6 +1438,7 @@ end
|
||||
--- @field InputPos ImVec2
|
||||
--- @field InputLineHeight float
|
||||
--- @field ViewportId ImGuiID
|
||||
--- @field SelectedText string
|
||||
|
||||
--- @return ImGuiPlatformImeData
|
||||
--- @nodiscard
|
||||
@@ -1447,7 +1448,8 @@ function ImGuiPlatformImeData()
|
||||
WantTextInput = false, -- A widget wants text input, not necessarily IME to be visible. This is automatically set to the upcoming value of io.WantTextInput.
|
||||
InputPos = ImVec2(), -- Position of input cursor (for IME).
|
||||
InputLineHeight = 0.0, -- Line height (for IME).
|
||||
ViewportId = 0 -- ID of platform window/viewport.
|
||||
ViewportId = 0, -- ID of platform window/viewport.
|
||||
SelectedText = "" -- [Port] Text currently selected in the widget wanting text input (backends may mirror it, e.g. for native copy).
|
||||
}
|
||||
end
|
||||
|
||||
@@ -1459,6 +1461,7 @@ function ImGuiPlatformImeData_Copy(dest, src)
|
||||
ImVec2_Copy(dest.InputPos, src.InputPos)
|
||||
dest.InputLineHeight = src.InputLineHeight
|
||||
dest.ViewportId = src.ViewportId
|
||||
dest.SelectedText = src.SelectedText -- [Port]
|
||||
end
|
||||
|
||||
--- @param data1 ImGuiPlatformImeData
|
||||
@@ -1468,7 +1471,8 @@ function ImGuiPlatformImeData_Compare(data1, data2)
|
||||
data1.WantTextInput ~= data2.WantTextInput or
|
||||
data1.InputPos ~= data2.InputPos or
|
||||
data1.InputLineHeight ~= data2.InputLineHeight or
|
||||
data1.ViewportId ~= data2.ViewportId then
|
||||
data1.ViewportId ~= data2.ViewportId or
|
||||
data1.SelectedText ~= data2.SelectedText then
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user