From dad1a0c0f101038c570486bf32935a8b8283ed54 Mon Sep 17 00:00:00 2001 From: 4DBug <4DBug@github.com> Date: Thu, 15 Oct 2026 10:51:20 -0500 Subject: [PATCH] Port leftovers: BringWindowToDisplayBehind, ImGuiSizeCallbackData + CalcWindowSizeAfterConstraint, ErrorCheckUsingSetCursorPosToExtendParentBoundaries, PopFocusScope user error (+ SetCurrentWindow stack sizes fix), log text decorations (Button/Menu/TreeNode/Drag/Slider/InputText/Checkbox/Radio), DataTypeFormatString display, ImGuiDataType S64/U64 (upstream enum layout; doubles), sscanf %u/length modifiers, mouse arrays sized ImGuiMouseButton.COUNT, AddCallback userdata copy; TODO.txt refreshed --- build/ImGui.linemap.json | 2 +- build/ImGui.luau | 560 +++++--- build/imgui_love.linemap.json | 2 +- build/imgui_love.lua | 560 +++++--- docs/PORT_STATUS.txt | 2066 ++++++++++++++--------------- docs/TODO.txt | 38 +- imgui.lua | 75 +- imgui_demo.lua | 31 +- imgui_draw.lua | 34 +- imgui_h.lua | 67 +- imgui_widgets.lua | 188 ++- imstd_minstdio.lua | 45 +- tools/test/check_all.sh | 2 +- tools/test/love/run.sh | 2 +- tools/test/scripts/t_helpers.luau | 80 +- 15 files changed, 2161 insertions(+), 1591 deletions(-) diff --git a/build/ImGui.linemap.json b/build/ImGui.linemap.json index e89cd58..38bb745 100644 --- a/build/ImGui.linemap.json +++ b/build/ImGui.linemap.json @@ -1 +1 @@ -[[46, "imgui.lua"], [22668, "imgui_demo.lua"], [34519, "imgui_draw.lua"], [42824, "imgui_h.lua"], [45800, "imgui_impl_roblox.lua"], [47452, "imgui_impl_roblox_fonts.lua"], [53855, "imgui_internal.lua"], [57827, "imgui_tables.lua"], [62919, "imgui_widgets.lua"], [75061, "imstb_rectpack.lua"], [75725, "imstb_textedit.lua"], [77267, "imstb_truetype.lua"], [80055, "imstd_minstdio.lua"]] \ No newline at end of file +[[46, "imgui.lua"], [22675, "imgui_demo.lua"], [34533, "imgui_draw.lua"], [42860, "imgui_h.lua"], [45857, "imgui_impl_roblox.lua"], [47509, "imgui_impl_roblox_fonts.lua"], [53912, "imgui_internal.lua"], [57884, "imgui_tables.lua"], [62976, "imgui_widgets.lua"], [75210, "imstb_rectpack.lua"], [75874, "imstb_textedit.lua"], [77416, "imstb_truetype.lua"], [80204, "imstd_minstdio.lua"]] \ No newline at end of file diff --git a/build/ImGui.luau b/build/ImGui.luau index 3ce4002..db5fcb8 100644 --- a/build/ImGui.luau +++ b/build/ImGui.luau @@ -1,7 +1,7 @@ --!optimize 2 -- GENERATED by tools/bundle.py from *.lua, backends/, fonts/ - do not edit -local ImGui, ImVec2, ImVec4, ImRect, HelpMarker, ImVec2_Copy, IMGUI_DEMO_MARKER, ImGuiTableFlags, ImStd, ImVector, ImDrawFlags, ImGuiInputFlags, ImRect_Copy, ImStb, ImGuiDataType, IM_TRUNC, ImGuiKey, ImGuiStyleVarInfo, ImVec2_CopyV, IM_ASSERT_USER_ERROR, ImGuiHoveredFlags, ImFormatString, ImHashStr, IM_ASSERT_USER_ERROR_RET, ImIsPowerOfTwo, ImS32, ImGuiColorEditFlags, ImVec4_Copy, ImAbs, ExampleAppConsoleMT, IM_ROUND, ImGuiTableColumnFlags, ImGuiTreeNodeFlags, PopStyleCompact, PushStyleCompact, IM_ASSERT_PARANOID, ImU16, ExampleNames, ImGuiWindowFlags, ImGuiItemFlags, ImGui_ImplRoblox_GetBackendData, stbte, ImColor, ImCos, ImGuiButtonFlags, ImGuiDebugLogFlags, ImGuiListClipper, ImGuiLocKey, ImU32, ExampleTreeFuncs, ImS16, _PathArcToFastExXY, ImGuiMultiSelectFlags, ImSin, ImGuiTabBarFlags, ImLengthSqr, ImUpperPowerOfTwo, IM_F32_TO_INT8_SAT, ImFontAtlasPackGetRect, DockSettingsRenameNodeReferences, ExampleDualListBoxMT, IM_DRAWLIST_TEX_LINES_WIDTH_MAX, ImCeil, ImFabs, ImGuiCol, ImGuiSelectionBasicStorage, ImS8, ImU8, ExampleAppPropertyEditorMT, ImGuiChildFlags, ImGuiDockNodeFlags, ImGuiLastItemData_Copy, IMGUI_DEBUG_LOG_IO, ImGuiScrollFlags, ImLog, ImMemchr, ImStrByte, ExampleSelectionWithDeletionMT, IMGUI_DEBUG_LOG_VIEWPORT, ImFontCalcWordWrapPositionEx, ImGuiInputEvent, ImGuiPackedDate, ImGuiTextBuffer, ImHashData, ImPow, ImTrunc64, CustomConstraints, ExampleAppLogMT, IMGUI_DEBUG_LOG_FONT, IMGUI_DEBUG_LOG_SELECTION, IMGUI_DISABLE_DEBUG_TOOLS, ImAddClampOverflow, ImFontAtlasBuildInit, ImFontAtlasFontDestroyOutput, ImGuiComboFlags, ImGuiLastItemData, ImGuiPayload_IsDataType, ImGuiPopupFlags, ImGuiSliderFlags, ImGuiTextFilter, ImRotate, ImSqrt, ImSubClampOverflow, ImTextClassifierSetCharClass, ImTextureRef, MyDocument, ShowExampleMenuFile, CalcCornerArcStepAndCount, CalcNextScrollFromScrollTargetAndClamp, IMGUI_PAYLOAD_TYPE_WINDOW, IMGUI_VERSION, ImCharIsBlankW, ImCharIsSeparatorW, ImFmod, ImFontAtlasBakedAddFontGlyph, ImFontAtlasPackAddRect, ImFontBaked_BuildLoadGlyph, ImFontConfig, ImGuiInputTextFlags, ImGuiLogFlags, ImGuiNavMoveFlags, ImGuiStyle_Copy, ImVec1_Copy, ExampleAsset_s_current_sort_specs, ExampleMemberInfo, ExampleTree_CreateNode, IMGUI_PAYLOAD_TYPE_COLOR_4F, IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_CALC, IM_F32_TO_INT8_UNBOUND, IM_PI, ImCharIsBlankA, ImFontAtlasBuildNotifySetFont, ImFontAtlasBuildRenderBitmapFromString, ImFontAtlasFontDestroySourceData, ImFontAtlasFontDiscardBakes, ImFontAtlasFontSourceAddToFont, ImFontAtlasFontSourceInit, ImFontAtlasRectId_GetIndex, ImFontAtlasTextureAdd, ImFontAtlasTextureBlockQueueUpload, ImFontAtlasTextureGrow, ImFontBaked_BuildGrowIndex, ImFontGlyph, ImGuiTableColumn, ImGuiWindowClass, ImGui_ImplRoblox_RenderDrawData, ImParseFormatFindStart, ImRect_CopyFromV4, ImTextureRect, MyItem_s_current_sort_specs, stb_textedit_key, stbtt_GetGlyphBitmapBoxSubpixel, DockSettingsHandler_ClearAll, EditTableSizingFlags, ExampleSelectionWithDeletion, IMGUI_DEBUG_LOG_TABLE, IMGUI_PAYLOAD_TYPE_COLOR_3F, IM_FREE, ImDrawCmd, ImDrawList +local ImGui, ImVec2, ImVec4, ImRect, ImVec2_Copy, HelpMarker, IMGUI_DEMO_MARKER, ImGuiTableFlags, ImStd, ImVector, ImDrawFlags, ImGuiInputFlags, ImRect_Copy, ImStb, ImGuiDataType, IM_TRUNC, ImGuiKey, ImGuiStyleVarInfo, ImVec2_CopyV, IM_ASSERT_USER_ERROR, ImGuiHoveredFlags, ImHashStr, IM_ASSERT_USER_ERROR_RET, ImIsPowerOfTwo, ImS32, ImGuiColorEditFlags, ImVec4_Copy, ImAbs, ExampleAppConsoleMT, IM_ROUND, ImFormatString, ImGuiTableColumnFlags, ImGuiTreeNodeFlags, PopStyleCompact, PushStyleCompact, IM_ASSERT_PARANOID, ImU16, ExampleNames, ImGuiWindowFlags, ImGuiItemFlags, ImGui_ImplRoblox_GetBackendData, stbte, ImColor, ImCos, ImGuiButtonFlags, ImGuiDebugLogFlags, ImGuiListClipper, ImGuiLocKey, ImU32, ExampleTreeFuncs, ImS16, _PathArcToFastExXY, ImGuiMultiSelectFlags, ImSin, ImGuiTabBarFlags, ImLengthSqr, ImUpperPowerOfTwo, IM_F32_TO_INT8_SAT, ImFontAtlasPackGetRect, ImS64, DockSettingsRenameNodeReferences, ExampleDualListBoxMT, IM_DRAWLIST_TEX_LINES_WIDTH_MAX, ImCeil, ImFabs, ImGuiCol, ImGuiSelectionBasicStorage, ImS8, ImU8, ExampleAppPropertyEditorMT, ImGuiChildFlags, ImGuiDockNodeFlags, ImGuiLastItemData_Copy, IMGUI_DEBUG_LOG_IO, ImAddClampOverflow, ImGuiScrollFlags, ImLog, ImMemchr, ImStrByte, ImSubClampOverflow, ExampleSelectionWithDeletionMT, IMGUI_DEBUG_LOG_VIEWPORT, ImFontCalcWordWrapPositionEx, ImGuiInputEvent, ImGuiPackedDate, ImGuiTextBuffer, ImHashData, ImPow, ImTrunc64, ImU64, CustomConstraints, ExampleAppLogMT, IMGUI_DEBUG_LOG_FONT, IMGUI_DEBUG_LOG_SELECTION, IMGUI_DISABLE_DEBUG_TOOLS, ImFontAtlasBuildInit, ImFontAtlasFontDestroyOutput, ImGuiComboFlags, ImGuiLastItemData, ImGuiPayload_IsDataType, ImGuiPopupFlags, ImGuiSliderFlags, ImGuiTextFilter, ImRotate, ImSqrt, ImTextClassifierSetCharClass, ImTextureRef, MyDocument, ShowExampleMenuFile, CalcCornerArcStepAndCount, CalcNextScrollFromScrollTargetAndClamp, DataTypeFormatStringCached, IMGUI_PAYLOAD_TYPE_WINDOW, IMGUI_VERSION, ImCharIsBlankW, ImCharIsSeparatorW, ImFmod, ImFontAtlasBakedAddFontGlyph, ImFontAtlasPackAddRect, ImFontBaked_BuildLoadGlyph, ImFontConfig, ImGuiInputTextFlags, ImGuiLogFlags, ImGuiNavMoveFlags, ImGuiStyle_Copy, ImVec1_Copy, ExampleAsset_s_current_sort_specs, ExampleMemberInfo, ExampleTree_CreateNode, IMGUI_PAYLOAD_TYPE_COLOR_4F, IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_CALC, IM_F32_TO_INT8_UNBOUND, IM_PI, ImCharIsBlankA, ImFontAtlasBuildNotifySetFont, ImFontAtlasBuildRenderBitmapFromString, ImFontAtlasFontDestroySourceData, ImFontAtlasFontDiscardBakes, ImFontAtlasFontSourceAddToFont, ImFontAtlasFontSourceInit, ImFontAtlasRectId_GetIndex, ImFontAtlasTextureAdd, ImFontAtlasTextureBlockQueueUpload, ImFontAtlasTextureGrow, ImFontBaked_BuildGrowIndex, ImFontGlyph, ImGuiTableColumn, ImGuiWindowClass, ImGui_ImplRoblox_RenderDrawData, ImParseFormatFindStart, ImRect_CopyFromV4, ImTextureRect, MyItem_s_current_sort_specs, stb_textedit_key, stbtt_GetGlyphBitmapBoxSubpixel, DockSettingsHandler_ClearAll, EditTableSizingFlags, ExampleSelectionWithDeletion, FormatCached, IMGUI_DEBUG_LOG_TABLE local type, mathMin, mathMax, mathFloor, mathCeil, bitOr, bitLShift = type, math.min, math.max, math.floor, math.ceil, bit32.bor, bit32.lshift local function IM_COL32(R, G, B, A) return (bitOr(bitLShift(A, 24 --[[IM_COL32_A_SHIFT]]), bitLShift(B, 16 --[[IM_COL32_B_SHIFT]]), bitLShift(G, 8 --[[IM_COL32_G_SHIFT]]), bitLShift(R, 0 --[[IM_COL32_R_SHIFT]]))) end @native @@ -6534,7 +6534,7 @@ function ImGui.IsMouseDragPastThreshold(button, lock_threshold) if lock_threshold == nil then lock_threshold = -1.0 end local g = GImGui - assert(button >= 0 and button < 3) -- IM_COUNTOF(g.IO.MouseDown) + assert(button >= 0 and button < 5 --[[ImGuiMouseButton.COUNT]]) -- IM_COUNTOF(g.IO.MouseDown) if lock_threshold < 0.0 then lock_threshold = g.IO.MouseDragThreshold end @@ -6547,7 +6547,7 @@ function ImGui.IsMouseDragging(button, lock_threshold) if lock_threshold == nil then lock_threshold = -1.0 end local g = GImGui - assert(button >= 0 and button < 3) -- IM_COUNTOF(g.IO.MouseDown) + assert(button >= 0 and button < 5 --[[ImGuiMouseButton.COUNT]]) -- IM_COUNTOF(g.IO.MouseDown) if not g.IO.MouseDown[button] then return false end @@ -7093,7 +7093,7 @@ function ImGui.EndGroup() assert(group_data.WindowID == window.ID) -- EndGroup() in wrong window? if (window.DC.IsSetPos) then - -- TODO: ImGui.ErrorCheckUsingSetCursorPosToExtendParentBoundaries() + ImGui.ErrorCheckUsingSetCursorPosToExtendParentBoundaries() end -- Include LastItemData.Rect.Max as a workaround for e.g. EndTable() undershooting with CursorMaxPos report. (#7543) @@ -7560,7 +7560,16 @@ function ImGui.BringWindowToDisplayBehind(window, behind_window) local g = GImGui window = window.RootWindow behind_window = behind_window.RootWindow - -- TODO: + local pos_wnd = ImGui.FindWindowDisplayIndex(window) + 1 -- 1-based + local pos_beh = ImGui.FindWindowDisplayIndex(behind_window) + 1 + local data = g.Windows.Data + if pos_wnd < pos_beh then + for i = pos_wnd, pos_beh - 2 do data[i] = data[i + 1] end -- memmove + data[pos_beh - 1] = window + else + for i = pos_wnd, pos_beh + 1, -1 do data[i] = data[i - 1] end -- memmove + data[pos_beh] = window + end end --- @param under_this_window? ImGuiWindow @@ -7766,7 +7775,7 @@ function ImGui.PushOverrideID(id) local g = GImGui local window = g.CurrentWindow if g.DebugHookIdInfoId == id and id ~= 0 then - ImGui.DebugHookIdInfo(id, 12 --[[ImGuiDataType.ID]], nil) + ImGui.DebugHookIdInfo(id, 13 --[[ImGuiDataType.ID]], nil) end -- [Luau] inline window.IDStack:push_back(id) local stack = window.IDStack @@ -7799,7 +7808,7 @@ function MT.ImGuiWindow:GetID(id) end local g = GImGui if g.DebugHookIdInfoId == h and h ~= 0 then - ImGui.DebugHookIdInfo(h, (type(id) == "string") and 9 --[[ImGuiDataType.String]] or 4 --[[ImGuiDataType.S32]], id) + ImGui.DebugHookIdInfo(h, (type(id) == "string") and 11 --[[ImGuiDataType.String]] or 4 --[[ImGuiDataType.S32]], id) end return h end @@ -7847,7 +7856,7 @@ function ImGui.GetIDWithSeed(a, b, c) id = ImHashStr(a, b and (b - 1) or nil, c) end if GImGui.DebugHookIdInfoId == id and id ~= 0 then - ImGui.DebugHookIdInfo(id, (type(a) == "number") and 4 --[[ImGuiDataType.S32]] or 9 --[[ImGuiDataType.String]], (b and type(a) == "string") and string.sub(a, 1, b - 1) or a) + ImGui.DebugHookIdInfo(id, (type(a) == "number") and 4 --[[ImGuiDataType.S32]] or 11 --[[ImGuiDataType.String]], (b and type(a) == "string") and string.sub(a, 1, b - 1) or a) end return id end @@ -8343,7 +8352,7 @@ function MT.ImGuiIO:ClearInputMouse() self.MousePos = ImVec2(-3.4028234663853e+38 --[[FLT_MAX]], -3.4028234663853e+38 --[[FLT_MAX]]) - for n = 0, 2 do -- IM_COUNTOF(MouseDown) + for n = 0, 5 --[[ImGuiMouseButton.COUNT]] - 1 do self.MouseDown[n] = false self.MouseDownDuration[n] = -1.0 self.MouseDownDurationPrev[n] = -1.0 @@ -8886,7 +8895,6 @@ function ImGui.IsKeyPressedEx(key, flags, owner_id) return true end --- TODO: -- Return untranslated names: on macOS, Cmd key will show as Ctrl, Ctrl key will show as super. function ImGui.GetKeyChordName(key_chord) local key = bit32.band(key_chord, bit32.bnot(61440 --[[ImGuiMod_Mask_]])) @@ -9335,7 +9343,7 @@ end --- @return bool function ImGui.IsAnyMouseDown() local g = GImGui - for n = 0, 2 do -- IM_COUNTOF(g.IO.MouseDown) - 1 + for n = 0, 5 --[[ImGuiMouseButton.COUNT]] - 1 do if g.IO.MouseDown[n] then return true end @@ -9349,7 +9357,7 @@ function ImGui.IsMouseDown(button, owner_id) if owner_id == nil then owner_id = 0 --[[ImGuiKeyOwner_Any]] end local g = GImGui - assert(button >= 0 and button < 3) -- IM_COUNTOF(g.IO.MouseDown) + assert(button >= 0 and button < 5 --[[ImGuiMouseButton.COUNT]]) -- IM_COUNTOF(g.IO.MouseDown) return g.IO.MouseDown[button] and ImGui.TestKeyOwner(ImGui.MouseButtonToKey(button), owner_id) -- Should be same as IsKeyDown(MouseButtonToKey(button), owner_id), but this allows legacy code hijacking the io.Mousedown[] array. end @@ -9369,7 +9377,7 @@ function ImGui.IsMouseClickedEx(button, flags, owner_id) if owner_id == nil then owner_id = 0 --[[ImGuiKeyOwner_Any]] end local g = GImGui - assert(button >= 0 and button < 3) -- IM_COUNTOF(g.IO.MouseDown) + assert(button >= 0 and button < 5 --[[ImGuiMouseButton.COUNT]]) -- IM_COUNTOF(g.IO.MouseDown) if not g.IO.MouseDown[button] then -- In theory this should already be encoded as (DownDuration < 0.0f), but testing this facilitates eating mechanism (until we finish work on key ownership) return false @@ -9400,7 +9408,7 @@ function ImGui.IsMouseReleased(button, owner_id) if owner_id == nil then owner_id = 0 --[[ImGuiKeyOwner_Any]] end local g = GImGui - assert(button >= 0 and button < 3) -- IM_COUNTOF(g.IO.MouseDown) + assert(button >= 0 and button < 5 --[[ImGuiMouseButton.COUNT]]) -- IM_COUNTOF(g.IO.MouseDown) return g.IO.MouseReleased[button] and ImGui.TestKeyOwner(ImGui.MouseButtonToKey(button), owner_id) -- Should be same as IsKeyReleased(MouseButtonToKey(button), owner_id) end @@ -9413,7 +9421,7 @@ end function ImGui.IsMouseReleasedWithDelay(button, delay) if delay == nil then delay = -1.0 end local g = GImGui - assert(button >= 0 and button < 3) + assert(button >= 0 and button < 5 --[[ImGuiMouseButton.COUNT]]) -- IM_COUNTOF(g.IO.MouseDown) if ImGui.IsMouseDown(button) then return false end @@ -9429,14 +9437,14 @@ end function ImGui.IsMouseDoubleClicked(button, owner_id) if owner_id == nil then owner_id = 0 --[[ImGuiKeyOwner_Any]] end local g = GImGui - assert(button >= 0 and button < 3) + assert(button >= 0 and button < 5 --[[ImGuiMouseButton.COUNT]]) -- IM_COUNTOF(g.IO.MouseDown) return g.IO.MouseClickedCount[button] == 2 and ImGui.TestKeyOwner(ImGui.MouseButtonToKey(button), owner_id) end --- @param button ImGuiMouseButton function ImGui.GetMouseClickedCount(button) local g = GImGui - assert(button >= 0 and button < 3) + assert(button >= 0 and button < 5 --[[ImGuiMouseButton.COUNT]]) -- IM_COUNTOF(g.IO.MouseDown) return g.IO.MouseClickedCount[button] end @@ -9527,7 +9535,7 @@ function ImGui.GetMouseDragDelta(button, lock_threshold) if button == nil then button = 0 end if lock_threshold == nil then lock_threshold = -1.0 end local g = GImGui - assert(button >= 0 and button < 3) + assert(button >= 0 and button < 5 --[[ImGuiMouseButton.COUNT]]) -- IM_COUNTOF(g.IO.MouseDown) if lock_threshold < 0.0 then lock_threshold = g.IO.MouseDragThreshold end @@ -9545,7 +9553,7 @@ end function ImGui.ResetMouseDragDelta(button) if button == nil then button = 0 end local g = GImGui - assert(button >= 0 and button < 3) + assert(button >= 0 and button < 5 --[[ImGuiMouseButton.COUNT]]) -- IM_COUNTOF(g.IO.MouseDown) -- NB: We don't need to reset g.IO.MouseDragMaxDistanceSqr ImVec2_Copy(g.IO.MouseClickedPos[button], g.IO.MousePos) end @@ -9990,14 +9998,13 @@ local function CalcWindowSizeAfterConstraint(window, size_desired) new_size.x = (cr.Min.x >= 0 and cr.Max.x >= 0) and ImClamp(new_size.x, cr.Min.x, cr.Max.x) or window.SizeFull.x new_size.y = (cr.Min.y >= 0 and cr.Max.y >= 0) and ImClamp(new_size.y, cr.Min.y, cr.Max.y) or window.SizeFull.y if g.NextWindowData.SizeCallback then - local data = {} -- TODO: ImGuiSizeCallbackData + local data = ImGuiSizeCallbackData() data.UserData = g.NextWindowData.SizeCallbackUserData - data.Pos = ImVec2(window.Pos.x, window.Pos.y) - data.CurrentSize = ImVec2(window.SizeFull.x, window.SizeFull.y) - data.DesiredSize = ImVec2(new_size.x, new_size.y) + ImVec2_Copy(data.Pos, window.Pos) + ImVec2_Copy(data.CurrentSize, window.SizeFull) + ImVec2_Copy(data.DesiredSize, new_size) g.NextWindowData.SizeCallback(data) - new_size.x = data.DesiredSize.x - new_size.y = data.DesiredSize.y + ImVec2_Copy(new_size, data.DesiredSize) end new_size.x = IM_TRUNC(new_size.x) new_size.y = IM_TRUNC(new_size.y) @@ -11206,6 +11213,7 @@ local function SetCurrentWindow(window) local g = GImGui --- @diagnostic disable-next-line g.CurrentWindow = window + g.StackSizesInBeginForCurrentWindow = window and g.CurrentWindowStack:back().StackSizesInBegin or nil g.CurrentTable = (window and window.DC.CurrentTableIdx ~= -1) and g.Tables:GetByIndex(window.DC.CurrentTableIdx) or nil if window then @@ -11222,7 +11230,6 @@ local function SetCurrentWindow(window) end end --- TODO: function ImGui.GcCompactTransientMiscBuffers() local g = GImGui g.ItemFlagsStack:clear() @@ -13444,7 +13451,6 @@ local function FindHoveredWindowEx(pos, find_first_and_in_any_viewport) return hovered_window, hovered_window_under_moving_window end --- TODO: -- The reason this is exposed in imgui_internal.h is: on touch-based system that don't have hovering, we want to dispatch inputs to the right target (imgui vs imgui+app) function ImGui.UpdateHoveredWindowAndCaptureFlags(mouse_pos) local g = GImGui @@ -13481,7 +13487,7 @@ function ImGui.UpdateHoveredWindowAndCaptureFlags(mouse_pos) local mouse_earliest_down = -1 local mouse_any_down = false - for i = 0, 2 do -- IM_COUNTOF(io.MouseDown) + for i = 0, 5 --[[ImGuiMouseButton.COUNT]] - 1 do if io.MouseClicked[i] then io.MouseDownOwned[i] = (g.HoveredWindow ~= nil) or has_open_popup io.MouseDownOwnedUnlessPopupClose[i] = (g.HoveredWindow ~= nil) or has_open_modal @@ -13570,7 +13576,7 @@ function ImGui.UpdateKeyboardInputs() end -- Update aliases - for n = 0, 2 do -- TODO: ImGuiMouseButton.COUNT - 1 + for n = 0, 5 --[[ImGuiMouseButton.COUNT]] - 1 do ImGui.UpdateAliasKey(ImGui.MouseButtonToKey(n), io.MouseDown[n], io.MouseDown[n] and 1.0 or 0.0) end ImGui.UpdateAliasKey(661 --[[ImGuiKey.MouseWheelX]], io.MouseWheelH ~= 0.0, io.MouseWheelH) @@ -13678,7 +13684,7 @@ function ImGui.UpdateMouseInputs() g.NavHighlightItemUnderNav = false end - for i = 0, 2 do -- IM_COUNTOF(io.MouseDown) + for i = 0, 5 --[[ImGuiMouseButton.COUNT]] - 1 do io.MouseClicked[i] = io.MouseDown[i] and (io.MouseDownDuration[i] < 0.0) io.MouseClickedCount[i] = 0 -- Will be filled below io.MouseReleased[i] = not io.MouseDown[i] and (io.MouseDownDuration[i] >= 0.0) @@ -14630,7 +14636,6 @@ function ImGui.EndFrame() ImGui.CallContextHooks(g, 3 --[[ImGuiContextHookType.EndFramePost]]) end --- TODO: -- Prepare the data for rendering so you can call GetDrawData() -- (As with anything within the ImGui:: namespace this doesn't touch your GPU or graphics API at all: -- it is the role of the ImGui_ImplXXXX_RenderDrawData() function provided by the renderer backend) @@ -15208,9 +15213,9 @@ function ImGui.PushStyleVar(idx, val) local g = GImGui local var_info = ImGui.GetStyleVarInfo(idx) if type(val) == "number" then - IM_ASSERT_USER_ERROR_RET(var_info.DataType == 6 --[[ImGuiDataType.Float]] and var_info.Count == 1, "Calling PushStyleVar() with wrong type!") + IM_ASSERT_USER_ERROR_RET(var_info.DataType == 8 --[[ImGuiDataType.Float]] and var_info.Count == 1, "Calling PushStyleVar() with wrong type!") else -- ImVec2 - IM_ASSERT_USER_ERROR_RET(var_info.DataType == 6 --[[ImGuiDataType.Float]] and var_info.Count == 2, "Calling PushStyleVar() with wrong type!") + IM_ASSERT_USER_ERROR_RET(var_info.DataType == 8 --[[ImGuiDataType.Float]] and var_info.Count == 2, "Calling PushStyleVar() with wrong type!") end local var = g.Style[var_info.Key] g.StyleVarStack:push_back(ImGuiStyleMod(idx, var)) @@ -15226,7 +15231,7 @@ end function ImGui.PushStyleVarX(idx, val_x) local g = GImGui local var_info = ImGui.GetStyleVarInfo(idx) - IM_ASSERT_USER_ERROR_RET(var_info.DataType == 6 --[[ImGuiDataType.Float]] and var_info.Count == 2, "Calling PushStyleVarX() with wrong type!") + IM_ASSERT_USER_ERROR_RET(var_info.DataType == 8 --[[ImGuiDataType.Float]] and var_info.Count == 2, "Calling PushStyleVarX() with wrong type!") local pvar = g.Style[var_info.Key] g.StyleVarStack:push_back(ImGuiStyleMod(idx, pvar)) pvar.x = val_x @@ -15237,7 +15242,7 @@ end function ImGui.PushStyleVarY(idx, val_y) local g = GImGui local var_info = ImGui.GetStyleVarInfo(idx) - IM_ASSERT_USER_ERROR_RET(var_info.DataType == 6 --[[ImGuiDataType.Float]] and var_info.Count == 2, "Calling PushStyleVarY() with wrong type!") + IM_ASSERT_USER_ERROR_RET(var_info.DataType == 8 --[[ImGuiDataType.Float]] and var_info.Count == 2, "Calling PushStyleVarY() with wrong type!") local pvar = g.Style[var_info.Key] g.StyleVarStack:push_back(ImGuiStyleMod(idx, pvar)) pvar.y = val_y @@ -15257,9 +15262,9 @@ function ImGui.PopStyleVar(count) local backup = stack.Data[stack.Size] -- [Luau] inline back()/pop_back() local var_info = ImGui.GetStyleVarInfo(backup.VarIdx) local data = g.Style[var_info.Key] - if (var_info.DataType == 6 --[[ImGuiDataType.Float]] and var_info.Count == 1) then + if (var_info.DataType == 8 --[[ImGuiDataType.Float]] and var_info.Count == 1) then g.Style[var_info.Key] = backup.BackupVal[1] - elseif (var_info.DataType == 6 --[[ImGuiDataType.Float]] and var_info.Count == 2) then + elseif (var_info.DataType == 8 --[[ImGuiDataType.Float]] and var_info.Count == 2) then data.x = backup.BackupVal[1]; data.y = backup.BackupVal[2] end stack.Size = stack.Size - 1 @@ -16497,7 +16502,7 @@ end function ImGui.PopFocusScope() local g = GImGui - -- TODO: IM_ASSERT_USER_ERROR_RET(g.FocusScopeStack.Size > g.StackSizesInBeginForCurrentWindow.SizeOfFocusScopeStack, "Calling PopFocusScope() too many times!") + IM_ASSERT_USER_ERROR_RET(g.FocusScopeStack.Size > g.StackSizesInBeginForCurrentWindow.SizeOfFocusScopeStack, "Calling PopFocusScope() too many times!") g.FocusScopeStack:pop_back() if g.FocusScopeStack.Size > 0 then g.CurrentFocusScopeId = g.FocusScopeStack:back().ID @@ -19512,9 +19517,10 @@ function ImGui.ErrorCheckUsingSetCursorPosToExtendParentBoundaries() window.DC.IsSetPos = false if window.DC.CursorPos.x <= window.DC.CursorMaxPos.x and window.DC.CursorPos.y <= window.DC.CursorMaxPos.y then return end if window.SkipItems then return end - -- Upstream asserts (user error): "Code uses SetCursorPos()/SetCursorScreenPos() to extend window/parent boundaries. - -- Please submit an item e.g. Dummy() afterwards". We keep the old, tolerant behavior instead of erroring. - window.DC.CursorMaxPos = ImMax(window.DC.CursorMaxPos, window.DC.CursorPos) + IM_ASSERT_USER_ERROR(false, "Code uses SetCursorPos()/SetCursorScreenPos() to extend window/parent boundaries.\nPlease submit an item e.g. Dummy() afterwards in order to grow window/parent boundaries.") + + -- For reference, the old behavior was essentially: + --window.DC.CursorMaxPos = ImMax(window.DC.CursorMaxPos, window.DC.CursorPos) end ------------------------------------------------------------------------------- @@ -21513,7 +21519,7 @@ function ImGui.DebugHookIdInfo(id, data_type, data_id) if info == nil or info.ID ~= id then return end if info.Desc == nil then if data_type == 4 --[[ImGuiDataType.S32]] then info.Desc = string.format("%d", data_id) - elseif data_type == 9 --[[ImGuiDataType.String]] then info.Desc = tostring(data_id) + elseif data_type == 11 --[[ImGuiDataType.String]] then info.Desc = tostring(data_id) else info.Desc = string.format("0x%08X [override]", id) end -- PushOverrideID() is often used to avoid hashing twice, which would lead to 2 calls to DebugHookIdInfo(). We prioritize the first one. end info.QuerySuccess = true @@ -21530,7 +21536,7 @@ local function DebugItemPathQuery_FormatLevelInfo(query, n, format_for_ui) local info = query.Results[n + 1] local window = (info.Desc == nil and n == 0) and ImGui.FindWindowByID(info.ID) or nil if window then return string.format(format_for_ui and "\"%s\" [window]" or "%s", SkipUncontributingPrefix(window.Name)) end -- Source: window name (because the root ID don't call GetID() and so doesn't get hooked) - if info.QuerySuccess then return string.format((format_for_ui and info.DataType == 9 --[[ImGuiDataType.String]]) and "\"%s\"" or "%s", SkipUncontributingPrefix(info.Desc)) end -- Source: GetID() hooks (prioritize over ItemInfo() because we frequently use patterns like: PushID(str), Button("") where they both have same id) + if info.QuerySuccess then return string.format((format_for_ui and info.DataType == 11 --[[ImGuiDataType.String]]) and "\"%s\"" or "%s", SkipUncontributingPrefix(info.Desc)) end -- Source: GetID() hooks (prioritize over ItemInfo() because we frequently use patterns like: PushID(str), Button("") where they both have same id) if query.Step < #query.Results then return "" end -- Only start using fallback below when all queries are done, so during queries we don't flickering ??? markers. return "???" end @@ -22501,11 +22507,12 @@ function ImGui.ShowMetricsWindow(p_open) if ImGui.IsMousePosValid() then ImGui.Text("Mouse pos: (%g, %g)", io.MousePos.x, io.MousePos.y) else ImGui.Text("Mouse pos: ") end ImGui.Text("Mouse delta: (%g, %g)", io.MouseDelta.x, io.MouseDelta.y) ImGui.Text("Mouse down:") - for i = 0, 2 do if ImGui.IsMouseDown(i) then ImGui.SameLine(); ImGui.Text("b%d (%.02f secs)", i, io.MouseDownDuration[i]) end end + local count = 5 --[[ImGuiMouseButton.COUNT]] -- IM_COUNTOF(io.MouseDown) + for i = 0, count - 1 do if ImGui.IsMouseDown(i) then ImGui.SameLine(); ImGui.Text("b%d (%.02f secs)", i, io.MouseDownDuration[i]) end end ImGui.Text("Mouse clicked:") - for i = 0, 2 do if ImGui.IsMouseClicked(i) then ImGui.SameLine(); ImGui.Text("b%d (%d)", i, io.MouseClickedCount[i]) end end + for i = 0, count - 1 do if ImGui.IsMouseClicked(i) then ImGui.SameLine(); ImGui.Text("b%d (%d)", i, io.MouseClickedCount[i]) end end ImGui.Text("Mouse released:") - for i = 0, 2 do if ImGui.IsMouseReleased(i) then ImGui.SameLine(); ImGui.Text("b%d", i) end end + for i = 0, count - 1 do if ImGui.IsMouseReleased(i) then ImGui.SameLine(); ImGui.Text("b%d", i) end end ImGui.Text("Mouse wheel: %.1f", io.MouseWheel) ImGui.Text("MouseStationaryTimer: %.2f", g.MouseStationaryTimer) ImGui.Text("Mouse source: %s", GetMouseSourceName(io.MouseSource)) @@ -24187,7 +24194,8 @@ S.DemoWindowWidgetsDataTypes = { u16_v = 65535, s32_v = -1, u32_v = 4294967295, -- (ImU32)-1 - -- [Port] s64_v / u64_v: 64-bit integer types are not supported (Lua numbers are doubles) + s64_v = -1, + u64_v = 18446744073709551615, -- (ImU64)-1 [Port] Lua numbers are doubles: 64-bit values are exact only within +-2^53 f32_v = 0.123, f64_v = 90000.01234567890123456789, drag_clamp = false, @@ -24218,14 +24226,15 @@ function DemoWindowWidgetsDataTypes() -- Setup limits (as helper variables so we can take their address, as explained above) -- Note: SliderScalar() functions have a maximum usable range of half the natural type maximum, hence the /2. - -- [Port] LLONG_MIN/LLONG_MAX/ULLONG_MAX fallback block dropped: no 64-bit integer types + local LLONG_MIN, LLONG_MAX, ULLONG_MAX = -9223372036854775808, 9223372036854775807, 18446744073709551615 -- [Port] doubles (LLONG_MAX/ULLONG_MAX round up) local s8_zero, s8_one, s8_fifty, s8_min, s8_max = 0, 1, 50, -128, 127 local u8_zero, u8_one, u8_fifty, u8_min, u8_max = 0, 1, 50, 0, 255 local s16_zero, s16_one, s16_fifty, s16_min, s16_max = 0, 1, 50, -32768, 32767 local u16_zero, u16_one, u16_fifty, u16_min, u16_max = 0, 1, 50, 0, 65535 local s32_zero, s32_one, s32_fifty, s32_min, s32_max, s32_hi_a, s32_hi_b = 0, 1, 50, -1073741824, 1073741823, 1073741823 - 100, 1073741823 -- INT_MIN/2, INT_MAX/2 local u32_zero, u32_one, u32_fifty, u32_min, u32_max, u32_hi_a, u32_hi_b = 0, 1, 50, 0, 2147483647, 2147483647 - 100, 2147483647 -- UINT_MAX/2 - -- [Port] s64_* / u64_* limits: ImGuiDataType.S64/U64 are not supported + local s64_zero, s64_one, s64_fifty, s64_min, s64_max, s64_hi_a, s64_hi_b = 0, 1, 50, LLONG_MIN / 2, LLONG_MAX / 2, LLONG_MAX / 2 - 100, LLONG_MAX / 2 + local u64_zero, u64_one, u64_fifty, u64_min, u64_max, u64_hi_a, u64_hi_b = 0, 1, 50, 0, ULLONG_MAX / 2, ULLONG_MAX / 2 - 100, ULLONG_MAX / 2 local f32_zero, f32_one, f32_lo_a, f32_hi_a = 0.0, 1.0, -10000000000.0, 10000000000.0 local f64_zero, f64_one, f64_lo_a, f64_hi_a = 0.0, 1.0, -1000000000000000.0, 1000000000000000.0 @@ -24247,12 +24256,12 @@ function DemoWindowWidgetsDataTypes() s.s32_v = ImGui.DragScalar("drag s32", 4 --[[ImGuiDataType.S32]], s.s32_v, drag_speed, drag_clamp and s32_zero or nil, drag_clamp and s32_fifty or nil) s.s32_v = ImGui.DragScalar("drag s32 hex", 4 --[[ImGuiDataType.S32]], s.s32_v, drag_speed, drag_clamp and s32_zero or nil, drag_clamp and s32_fifty or nil, "0x%08X") s.u32_v = ImGui.DragScalar("drag u32", 5 --[[ImGuiDataType.U32]], s.u32_v, drag_speed, drag_clamp and u32_zero or nil, drag_clamp and u32_fifty or nil, "%u ms") - -- [Port] ImGui.DragScalar("drag s64", ImGuiDataType.S64, s64_v, ...) -- 64-bit types not supported - -- [Port] ImGui.DragScalar("drag u64", ImGuiDataType.U64, u64_v, ...) -- 64-bit types not supported - s.f32_v = ImGui.DragScalar("drag float", 6 --[[ImGuiDataType.Float]], s.f32_v, 0.005, f32_zero, f32_one, "%f") - s.f32_v = ImGui.DragScalar("drag float log", 6 --[[ImGuiDataType.Float]], s.f32_v, 0.005, f32_zero, f32_one, "%f", 32 --[[ImGuiSliderFlags.Logarithmic]]) - s.f64_v = ImGui.DragScalar("drag double", 7 --[[ImGuiDataType.Double]], s.f64_v, 0.0005, f64_zero, nil, "%.10f grams") - s.f64_v = ImGui.DragScalar("drag double log",7 --[[ImGuiDataType.Double]], s.f64_v, 0.0005, f64_zero, f64_one, "0 < %.10f < 1", 32 --[[ImGuiSliderFlags.Logarithmic]]) + s.s64_v = ImGui.DragScalar("drag s64", 6 --[[ImGuiDataType.S64]], s.s64_v, drag_speed, drag_clamp and s64_zero or nil, drag_clamp and s64_fifty or nil) + s.u64_v = ImGui.DragScalar("drag u64", 7 --[[ImGuiDataType.U64]], s.u64_v, drag_speed, drag_clamp and u64_zero or nil, drag_clamp and u64_fifty or nil) + s.f32_v = ImGui.DragScalar("drag float", 8 --[[ImGuiDataType.Float]], s.f32_v, 0.005, f32_zero, f32_one, "%f") + s.f32_v = ImGui.DragScalar("drag float log", 8 --[[ImGuiDataType.Float]], s.f32_v, 0.005, f32_zero, f32_one, "%f", 32 --[[ImGuiSliderFlags.Logarithmic]]) + s.f64_v = ImGui.DragScalar("drag double", 9 --[[ImGuiDataType.Double]], s.f64_v, 0.0005, f64_zero, nil, "%.10f grams") + s.f64_v = ImGui.DragScalar("drag double log",9 --[[ImGuiDataType.Double]], s.f64_v, 0.0005, f64_zero, f64_one, "0 < %.10f < 1", 32 --[[ImGuiSliderFlags.Logarithmic]]) IMGUI_DEMO_MARKER("Widgets/Data Types/Sliders") ImGui.SeparatorText("Sliders") @@ -24267,21 +24276,26 @@ function DemoWindowWidgetsDataTypes() s.u32_v = ImGui.SliderScalar("slider u32 low", 5 --[[ImGuiDataType.U32]], s.u32_v, u32_zero, u32_fifty,"%u") s.u32_v = ImGui.SliderScalar("slider u32 high", 5 --[[ImGuiDataType.U32]], s.u32_v, u32_hi_a, u32_hi_b, "%u") s.u32_v = ImGui.SliderScalar("slider u32 full", 5 --[[ImGuiDataType.U32]], s.u32_v, u32_min, u32_max, "%u") - -- [Port] "slider s64 low" / "slider s64 high" / "slider s64 full" (ImGuiDataType.S64): 64-bit types not supported - -- [Port] "slider u64 low" / "slider u64 high" / "slider u64 full" (ImGuiDataType.U64): 64-bit types not supported - s.f32_v = ImGui.SliderScalar("slider float low", 6 --[[ImGuiDataType.Float]], s.f32_v, f32_zero, f32_one) - s.f32_v = ImGui.SliderScalar("slider float low log", 6 --[[ImGuiDataType.Float]], s.f32_v, f32_zero, f32_one, "%.10f", 32 --[[ImGuiSliderFlags.Logarithmic]]) - s.f32_v = ImGui.SliderScalar("slider float high", 6 --[[ImGuiDataType.Float]], s.f32_v, f32_lo_a, f32_hi_a, "%e") - s.f64_v = ImGui.SliderScalar("slider double low", 7 --[[ImGuiDataType.Double]], s.f64_v, f64_zero, f64_one, "%.10f grams") - s.f64_v = ImGui.SliderScalar("slider double low log",7 --[[ImGuiDataType.Double]], s.f64_v, f64_zero, f64_one, "%.10f", 32 --[[ImGuiSliderFlags.Logarithmic]]) - s.f64_v = ImGui.SliderScalar("slider double high", 7 --[[ImGuiDataType.Double]], s.f64_v, f64_lo_a, f64_hi_a, "%e grams") + s.s64_v = ImGui.SliderScalar("slider s64 low", 6 --[[ImGuiDataType.S64]], s.s64_v, s64_zero, s64_fifty,"%lld") -- "%" PRId64 + s.s64_v = ImGui.SliderScalar("slider s64 high", 6 --[[ImGuiDataType.S64]], s.s64_v, s64_hi_a, s64_hi_b, "%lld") + s.s64_v = ImGui.SliderScalar("slider s64 full", 6 --[[ImGuiDataType.S64]], s.s64_v, s64_min, s64_max, "%lld") + s.u64_v = ImGui.SliderScalar("slider u64 low", 7 --[[ImGuiDataType.U64]], s.u64_v, u64_zero, u64_fifty,"%llu ms") -- "%" PRIu64 " ms" + s.u64_v = ImGui.SliderScalar("slider u64 high", 7 --[[ImGuiDataType.U64]], s.u64_v, u64_hi_a, u64_hi_b, "%llu ms") + s.u64_v = ImGui.SliderScalar("slider u64 full", 7 --[[ImGuiDataType.U64]], s.u64_v, u64_min, u64_max, "%llu ms") + s.f32_v = ImGui.SliderScalar("slider float low", 8 --[[ImGuiDataType.Float]], s.f32_v, f32_zero, f32_one) + s.f32_v = ImGui.SliderScalar("slider float low log", 8 --[[ImGuiDataType.Float]], s.f32_v, f32_zero, f32_one, "%.10f", 32 --[[ImGuiSliderFlags.Logarithmic]]) + s.f32_v = ImGui.SliderScalar("slider float high", 8 --[[ImGuiDataType.Float]], s.f32_v, f32_lo_a, f32_hi_a, "%e") + s.f64_v = ImGui.SliderScalar("slider double low", 9 --[[ImGuiDataType.Double]], s.f64_v, f64_zero, f64_one, "%.10f grams") + s.f64_v = ImGui.SliderScalar("slider double low log",9 --[[ImGuiDataType.Double]], s.f64_v, f64_zero, f64_one, "%.10f", 32 --[[ImGuiSliderFlags.Logarithmic]]) + s.f64_v = ImGui.SliderScalar("slider double high", 9 --[[ImGuiDataType.Double]], s.f64_v, f64_lo_a, f64_hi_a, "%e grams") ImGui.SeparatorText("Sliders (reverse)") s.s8_v = ImGui.SliderScalar("slider s8 reverse", 0 --[[ImGuiDataType.S8]], s.s8_v, s8_max, s8_min, "%d") s.u8_v = ImGui.SliderScalar("slider u8 reverse", 1 --[[ImGuiDataType.U8]], s.u8_v, u8_max, u8_min, "%u") s.s32_v = ImGui.SliderScalar("slider s32 reverse", 4 --[[ImGuiDataType.S32]], s.s32_v, s32_fifty, s32_zero, "%d") s.u32_v = ImGui.SliderScalar("slider u32 reverse", 5 --[[ImGuiDataType.U32]], s.u32_v, u32_fifty, u32_zero, "%u") - -- [Port] "slider s64 reverse" / "slider u64 reverse": 64-bit types not supported + s.s64_v = ImGui.SliderScalar("slider s64 reverse", 6 --[[ImGuiDataType.S64]], s.s64_v, s64_fifty, s64_zero, "%lld") + s.u64_v = ImGui.SliderScalar("slider u64 reverse", 7 --[[ImGuiDataType.U64]], s.u64_v, u64_fifty, u64_zero, "%llu ms") IMGUI_DEMO_MARKER("Widgets/Data Types/Inputs") ImGui.SeparatorText("Inputs") @@ -24298,10 +24312,10 @@ function DemoWindowWidgetsDataTypes() s.s32_v = ImGui.InputScalar("input s32 hex", 4 --[[ImGuiDataType.S32]], s.s32_v, inputs_step and s32_one or nil, nil, "%04X", flags) s.u32_v = ImGui.InputScalar("input u32", 5 --[[ImGuiDataType.U32]], s.u32_v, inputs_step and u32_one or nil, nil, "%u", flags) s.u32_v = ImGui.InputScalar("input u32 hex", 5 --[[ImGuiDataType.U32]], s.u32_v, inputs_step and u32_one or nil, nil, "%08X", flags) - -- [Port] ImGui.InputScalar("input s64", ImGuiDataType.S64, ...) -- 64-bit types not supported - -- [Port] ImGui.InputScalar("input u64", ImGuiDataType.U64, ...) -- 64-bit types not supported - s.f32_v = ImGui.InputScalar("input float", 6 --[[ImGuiDataType.Float]], s.f32_v, inputs_step and f32_one or nil, nil, nil, flags) - s.f64_v = ImGui.InputScalar("input double", 7 --[[ImGuiDataType.Double]], s.f64_v, inputs_step and f64_one or nil, nil, nil, flags) + s.s64_v = ImGui.InputScalar("input s64", 6 --[[ImGuiDataType.S64]], s.s64_v, inputs_step and s64_one or nil, nil, nil, flags) + s.u64_v = ImGui.InputScalar("input u64", 7 --[[ImGuiDataType.U64]], s.u64_v, inputs_step and u64_one or nil, nil, nil, flags) + s.f32_v = ImGui.InputScalar("input float", 8 --[[ImGuiDataType.Float]], s.f32_v, inputs_step and f32_one or nil, nil, nil, flags) + s.f64_v = ImGui.InputScalar("input double", 9 --[[ImGuiDataType.Double]], s.f64_v, inputs_step and f64_one or nil, nil, nil, flags) ImGui.TreePop() end @@ -30855,10 +30869,10 @@ function DemoWindowInputs() end ImGui.Text("Mouse delta: (%g, %g)", io.MouseDelta.x, io.MouseDelta.y) ImGui.Text("Mouse down:") - for i = 0, 2 do if ImGui.IsMouseDown(i) then ImGui.SameLine(); ImGui.Text("b%d (%.02f secs)", i, io.MouseDownDuration[i]) end end -- IM_COUNTOF(io.MouseDown) == 3, 0-based + for i = 0, 5 --[[ImGuiMouseButton.COUNT]] - 1 do if ImGui.IsMouseDown(i) then ImGui.SameLine(); ImGui.Text("b%d (%.02f secs)", i, io.MouseDownDuration[i]) end end -- IM_COUNTOF(io.MouseDown), 0-based ImGui.Text("Mouse wheel: %.1f", io.MouseWheel) ImGui.Text("Mouse clicked count:") - for i = 0, 2 do if io.MouseClickedCount[i] > 0 then ImGui.SameLine(); ImGui.Text("b%d: %d", i, io.MouseClickedCount[i]) end end + for i = 0, 5 --[[ImGuiMouseButton.COUNT]] - 1 do if io.MouseClickedCount[i] > 0 then ImGui.SameLine(); ImGui.Text("b%d: %d", i, io.MouseClickedCount[i]) end end -- We iterate both legacy native range and named ImGuiKey ranges. This is a little unusual/odd but this allows -- displaying the data for old/new backends. @@ -32544,7 +32558,7 @@ function ExampleAppPropertyEditorMT:Draw(root_node) ImGui.TextUnformatted(field_desc.Name) ImGui.TableNextColumn() local field_ptr = field_desc.Offset -- [Port] Offset is the field name inside ExampleTreeNode - if field_desc.DataType == 8 --[[ImGuiDataType.Bool]] then + if field_desc.DataType == 10 --[[ImGuiDataType.Bool]] then assert(field_desc.DataCount == 1) _, node[field_ptr] = ImGui.Checkbox("##Editor", node[field_ptr]) elseif field_desc.DataType == 4 --[[ImGuiDataType.S32]] then @@ -32555,11 +32569,11 @@ function ExampleAppPropertyEditorMT:Draw(root_node) else ImGui.DragScalarN("##Editor", field_desc.DataType, node[field_ptr], field_desc.DataCount, 1.0, v_min, v_max) end - elseif field_desc.DataType == 6 --[[ImGuiDataType.Float]] then + elseif field_desc.DataType == 8 --[[ImGuiDataType.Float]] then local v_min, v_max = 0.0, 1.0 ImGui.SetNextItemWidth(-1.1754943508223e-38 --[[FLT_MIN]]) ImGui.SliderScalarN("##Editor", field_desc.DataType, node[field_ptr], field_desc.DataCount, v_min, v_max) - elseif field_desc.DataType == 9 --[[ImGuiDataType.String]] then + elseif field_desc.DataType == 11 --[[ImGuiDataType.String]] then local buf = self.StringBufs[node] -- [Port] edit the Lua string through a 28-byte buffer if buf == nil then buf = ImGui.NewTextBuffer(node[field_ptr], 28); self.StringBufs[node] = buf end if ImGui.InputText("##Editor", buf, 28) then node[field_ptr] = ImGui.TextBufferToString(buf) end @@ -38662,6 +38676,16 @@ function ImGui.AddDrawListToDrawDataEx(draw_data, out_list, draw_list) assert(draw_list._VtxCurrentIdx == draw_list.VtxBuffer.Size + 1) end + -- Resolve callback data pointers + local cb_buf = draw_list._CallbacksDataBuf + if cb_buf.Size > 0 then + for _, cmd in draw_list.CmdBuffer:iter() do + if cmd.UserCallback ~= nil and cmd.UserCallbackDataOffset ~= -1 and cmd.UserCallbackDataSize > 0 then + cmd.UserCallbackData = cb_buf.Data[cmd.UserCallbackDataOffset + 1] + end + end + end + -- Add to output list + records state in ImDrawData out_list:push_back(draw_list) draw_data.TotalVtxCount = draw_data.TotalVtxCount + draw_list.VtxBuffer.Size @@ -38768,7 +38792,6 @@ end -- Initialize before use in a new frame. We always have a command ready in the buffer. -- In the majority of cases, you would want to call PushClipRect() and PushTexture() after this. --- TODO: function MT.ImDrawList:_ResetForNewFrame() self._ContentClipX0 = nil -- set again by Begin() (Roblox backend scroll reuse) if self._Splitter._Count > 1 then @@ -38790,6 +38813,7 @@ function MT.ImDrawList:_ResetForNewFrame() self._IdxWritePtr = 1 self._ClipRectStack:resize(0) self._TextureStack:resize(0) + self._CallbacksDataBuf:resize(0) self._DrawFlagsStack.Size = 0 -- _DrawFlagsStack.clear() (ImSmallStack_) self._Path:resize(0) @@ -38810,7 +38834,7 @@ function MT.ImDrawList:_ClearFreeMemory() self._ClipRectStack:clear() self._TextureStack:clear() - -- self._CallbacksDataBuf:clear() + self._CallbacksDataBuf:clear() self._DrawFlagsStack.Size = 0 -- _DrawFlagsStack.clear() (ImSmallStack_) self._Path:clear() self._Splitter:ClearFreeMemory() @@ -38883,15 +38907,27 @@ function MT.ImDrawList:AddCallback(callback, userdata, userdata_size) curr_cmd = self.CmdBuffer.Data[self.CmdBuffer.Size] end curr_cmd.UserCallback = callback - -- TODO: _CallbacksDataBuf? if userdata_size == 0 then -- Store user data directly in command (no indirection) curr_cmd.UserCallbackData = userdata - + curr_cmd.UserCallbackDataSize = 0 + curr_cmd.UserCallbackDataOffset = -1 else + -- Copy and store user data in a buffer + -- [Lua] No raw bytes: the "copy" is a shallow copy of a table userdata (other values are immutable and stored as is), + -- so later changes to the caller's table don't affect this command. userdata_size is only recorded. assert(userdata ~= nil) - assert(userdata_size < bit32.lshift(1, 31)) - + assert(userdata_size < 2147483648) -- (1u << 31) + curr_cmd.UserCallbackData = nil -- Will be resolved during Render() + curr_cmd.UserCallbackDataSize = userdata_size + curr_cmd.UserCallbackDataOffset = self._CallbacksDataBuf.Size -- 0-based + local copy = userdata + if type(userdata) == "table" then + copy = {} + for k, v in pairs(userdata) do copy[k] = v end + setmetatable(copy, getmetatable(userdata)) + end + self._CallbacksDataBuf:push_back(copy) -- memcpy() end self:AddDrawCmd() -- Force a new command after us (see comment below) @@ -42898,6 +42934,14 @@ function ImU32(val) return bitAnd(val, 0xFFFFFFFF) end --- @return ImS32 function ImS32(val) return bitAnd(val, 0xFFFFFFFF) end +-- [Luau] 64-bit integers are stored in doubles (exact only within +-2^53): the cast just truncates toward zero like a C double->int64 cast. +--- @param val number +--- @return ImS64 +function ImS64(val) if val >= 0 then return math.floor(val) end return -math.floor(-val) end +--- @param val number +--- @return ImU64 +function ImU64(val) if val >= 0 then return math.floor(val) end return -math.floor(-val) end + --- @alias float number --- @class double : number @@ -42978,15 +43022,17 @@ ImGuiDataType = U16 = 3, -- unsigned short S32 = 4, -- int U32 = 5, -- unsigned int - Float = 6, -- float - Double = 7, -- double - Bool = 8, -- bool (provided for user convenience, not supported by scalar widgets) - String = 9, -- string (provided for user convenience, not supported by scalar widgets) - COUNT = 10 + S64 = 6, -- long long / __int64 -- [Luau] stored in a double: exact only within +-2^53 + U64 = 7, -- unsigned long long / unsigned __int64 -- [Luau] stored in a double: exact only within 0..2^53 + Float = 8, -- float + Double = 9, -- double + Bool = 10, -- bool (provided for user convenience, not supported by scalar widgets) + String = 11, -- string (provided for user convenience, not supported by scalar widgets) + COUNT = 12 } -- Extend ImGuiDataType_ -ImGuiDataType.Pointer = 11 -- [internal] -ImGuiDataType.ID = 12 -- [internal] +ImGuiDataType.Pointer = ImGuiDataType.COUNT -- [internal] +ImGuiDataType.ID = ImGuiDataType.COUNT + 1 -- [internal] ImTextureID_Invalid = -1 @@ -43496,7 +43542,7 @@ function ImDrawList(data) _Splitter = ImDrawListSplitter(), -- [Internal] for channels api (note: prefer using your own persistent instance of ImDrawListSplitter!) _ClipRectStack = ImVector(), -- [Internal] _TextureStack = ImVector(), -- [Internal] - _CallbacksDataBuf = nil, -- [Internal] + _CallbacksDataBuf = ImVector(), -- [Internal] [Lua] copies of AddCallback() userdata (userdata_size > 0) _DrawFlagsStack = ImVector(), -- [Internal] ImSmallStack_: capacity checked by PushDrawFlag() _FringeScale = 1.0, -- [Internal] anti-alias fringe is scaled by this value, this helps to keep things sharp while zooming at vertex buffer content -- [Luau] 1.0 instead of memset 0 so a list used before _SetPixelDensity() still works _InvFringeScale = 1.0, -- [internal] 1.0 / _FringeScale // FIXME: Consider renaming to _PixelDensity. @@ -44081,7 +44127,7 @@ function ImGuiIO() MouseDelta = ImVec2(), -- Mouse delta. Note that this is zero if either current or previous position are invalid (-FLT_MAX,-FLT_MAX), so a disappearing/reappearing mouse won't have a huge delta. - MouseDown = {[0] = false, [1] = false, [2] = false}, -- Mouse buttons: 0=left, 1=right, 2=middle + extras (ImGuiMouseButton.COUNT == 5). Dear ImGui mostly uses left and right buttons. Other buttons allow us to track if the mouse is being used by your application + available to user as a convenience via IsMouse** API. + MouseDown = {[0] = false, [1] = false, [2] = false, [3] = false, [4] = false}, -- Mouse buttons: 0=left, 1=right, 2=middle + extras (ImGuiMouseButton.COUNT == 5). Dear ImGui mostly uses left and right buttons. Other buttons allow us to track if the mouse is being used by your application + available to user as a convenience via IsMouse** API. MouseWheel = 0, -- Mouse wheel Vertical: 1 unit scrolls about 5 lines text. >0 scrolls Up, <0 scrolls Down. Hold Shift to turn vertical scroll into horizontal scroll. MouseWheelH = 0, -- Mouse wheel Horizontal. >0 scrolls Left, <0 scrolls Right. Most users don't have a mouse with a horizontal wheel, may not be filled by all backends. @@ -44183,23 +44229,23 @@ function ImGuiIO() -- (you can visualize and interact with all options in 'Demo->Configuration') MouseDrawCursor = false, -- = false -- Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor). Cannot be easily renamed to 'io.ConfigXXX' because this is frequently used by backend implementations. - MouseClicked = {[0] = false, [1] = false, [2] = false}, -- Mouse button went from !Down to Down (same as MouseClickedCount[x] != 0) - MouseReleased = {[0] = false, [1] = false, [2] = false}, -- Mouse button went from Down to !Down - MouseClickedCount = {[0] = 0, [1] = 0, [2] = 0}, -- == 0 (not clicked), == 1 (same as MouseClicked[]), == 2 (double-clicked), == 3 (triple-clicked) etc. when going from !Down to Down - MouseClickedLastCount = {[0] = 0, [1] = 0, [2] = 0}, -- Count successive number of clicks. Stays valid after mouse release. Reset after another click is done. - MouseDownDuration = {[0] = -1, [1] = -1, [2] = -1}, -- Duration the mouse button has been down (0.0f == just clicked) - MouseDownDurationPrev = {[0] = -1, [1] = -1, [2] = -1}, -- Previous time the mouse button has been down + MouseClicked = {[0] = false, [1] = false, [2] = false, [3] = false, [4] = false}, -- Mouse button went from !Down to Down (same as MouseClickedCount[x] != 0) + MouseReleased = {[0] = false, [1] = false, [2] = false, [3] = false, [4] = false}, -- Mouse button went from Down to !Down + MouseClickedCount = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0}, -- == 0 (not clicked), == 1 (same as MouseClicked[]), == 2 (double-clicked), == 3 (triple-clicked) etc. when going from !Down to Down + MouseClickedLastCount = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0}, -- Count successive number of clicks. Stays valid after mouse release. Reset after another click is done. + MouseDownDuration = {[0] = -1, [1] = -1, [2] = -1, [3] = -1, [4] = -1}, -- Duration the mouse button has been down (0.0f == just clicked) + MouseDownDurationPrev = {[0] = -1, [1] = -1, [2] = -1, [3] = -1, [4] = -1}, -- Previous time the mouse button has been down - MouseDragMaxDistanceAbs = {[0] = ImVec2(), [1] = ImVec2(), [2] = ImVec2()}, -- Maximum distance, absolute, on each axis, of how much mouse has traveled from the clicking point - MouseDragMaxDistanceSqr = {[0] = 0, [1] = 0, [2] = 0}, -- Squared maximum distance of how much mouse has traveled from the clicking point (used for moving thresholds) + MouseDragMaxDistanceAbs = {[0] = ImVec2(), [1] = ImVec2(), [2] = ImVec2(), [3] = ImVec2(), [4] = ImVec2()}, -- Maximum distance, absolute, on each axis, of how much mouse has traveled from the clicking point + MouseDragMaxDistanceSqr = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0}, -- Squared maximum distance of how much mouse has traveled from the clicking point (used for moving thresholds) - MouseDownOwned = {[0] = nil, [1] = nil, [2] = nil}, -- Track if button was clicked inside a dear imgui window or over void blocked by a popup. We don't request mouse capture from the application if click started outside ImGui bounds. - MouseDownOwnedUnlessPopupClose = {[0] = nil, [1] = nil, [2] = nil}, -- Track if button was clicked inside a dear imgui window. - MouseClickedTime = {[0] = 0, [1] = 0, [2] = 0}, -- Time of last click (used to figure out double-click) - MouseReleasedTime = {[0] = 0, [1] = 0, [2] = 0}, -- Time of last released (rarely used! but useful to handle delayed single-click when trying to disambiguate them from double-click). - MouseClickedPos = {[0] = ImVec2(), [1] = ImVec2(), [2] = ImVec2()}, -- Position at time of clicking + MouseDownOwned = {[0] = nil, [1] = nil, [2] = nil, [3] = nil, [4] = nil}, -- Track if button was clicked inside a dear imgui window or over void blocked by a popup. We don't request mouse capture from the application if click started outside ImGui bounds. + MouseDownOwnedUnlessPopupClose = {[0] = nil, [1] = nil, [2] = nil, [3] = nil, [4] = nil}, -- Track if button was clicked inside a dear imgui window. + MouseClickedTime = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0}, -- Time of last click (used to figure out double-click) + MouseReleasedTime = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0}, -- Time of last released (rarely used! but useful to handle delayed single-click when trying to disambiguate them from double-click). + MouseClickedPos = {[0] = ImVec2(), [1] = ImVec2(), [2] = ImVec2(), [3] = ImVec2(), [4] = ImVec2()}, -- Position at time of clicking - MouseDoubleClicked = {[0] = false, [1] = false, [2] = false}, -- Has mouse button been double-clicked? (same as MouseClickedCount[x] == 2) + MouseDoubleClicked = {[0] = false, [1] = false, [2] = false, [3] = false, [4] = false}, -- Has mouse button been double-clicked? (same as MouseClickedCount[x] == 2) -- Inputs Behaviors -- (other variables, ones which are expected to be tweaked within UI code, are exposed in ImGuiStyle) @@ -45600,6 +45646,17 @@ ImGuiTableBgTarget = { None = 0, RowBg0 = 1, RowBg1 = 2, CellBg = 3 } --- @enum ImGuiSortDirection ImGuiSortDirection = { None = 0, Ascending = 1, Descending = 2 } +-- Resizing callback data to apply custom constraint. As enabled by SetNextWindowSizeConstraints(). Callback is called during the next Begin(). +-- NB: For basic min/max size constraint on each axis you don't need to use the callback! The SetNextWindowSizeConstraints() parameters are enough. +--- @class ImGuiSizeCallbackData +--- @field UserData any Read-only. What user passed to SetNextWindowSizeConstraints(). Generally store an integer or float in here. +--- @field Pos ImVec2 Read-only. Window position, for reference. +--- @field CurrentSize ImVec2 Read-only. Current window size. +--- @field DesiredSize ImVec2 Read-write. Desired size, based on user's mouse position. Write to this field to restrain resizing. +--- @return ImGuiSizeCallbackData +function ImGuiSizeCallbackData() + return { UserData = nil, Pos = ImVec2(), CurrentSize = ImVec2(), DesiredSize = ImVec2() } +end -- Data payload for Drag and Drop operations: AcceptDragDropPayload(), GetDragDropPayload() @@ -62972,6 +63029,11 @@ local IM_S32_MIN = INT_MIN -- (-2147483647 - 1), (0x80000000); local IM_S32_MAX = INT_MAX -- (2147483647), (0x7FFFFFFF) local IM_U32_MIN = 0 local IM_U32_MAX = UINT_MAX -- (0xFFFFFFFF) +-- [Luau] 64-bit limits as doubles: IM_S64_MAX/IM_U64_MAX round up to 2^63/2^64 (values are exact only within +-2^53) +local IM_S64_MIN = -9223372036854775808 -- (-9223372036854775807ll - 1ll) +local IM_S64_MAX = 9223372036854775807 -- (9223372036854775807ll) +local IM_U64_MIN = 0 +local IM_U64_MAX = 18446744073709551615 -- (0xFFFFFFFFFFFFFFFFull) ------------------------------------------------------------------------------- -- [SECTION] Widgets: Text, etc. @@ -63704,8 +63766,9 @@ function ImGui.ButtonEx(label, size_arg, flags) ImGui.RenderNavCursor(bb, id) ImGui.RenderFrame(bb.Min, bb.Max, col, true, style.FrameRounding) - -- if (g.LogEnabled) - -- LogSetNextTextDecoration("[", "]"); + if g.LogEnabled then + ImGui.LogSetNextTextDecoration("[", "]") + end local text_min, text_max = ButtonEx_text_min, ButtonEx_text_max -- [Luau] scratch: RenderTextClipped() only reads them text_min.x = bb.Min.x + frame_padding.x; text_min.y = bb.Min.y + frame_padding.y text_max.x = bb.Max.x - frame_padding.x; text_max.y = bb.Max.y - frame_padding.y @@ -64287,7 +64350,7 @@ function ImGui.Checkbox(label, v) end if g.LogEnabled then - -- ImGui.LogRenderedText(label_pos, mixed_value and "[~]" or (v and "[x]" or "[ ]")) + ImGui.LogRenderedText(ImVec2(check_bb.Max.x + style.ItemInnerSpacing.x, check_bb.Min.y + style.FramePadding.y), mixed_value and "[~]" or (v and "[x]" or "[ ]")) -- label_pos end if is_visible and label_size.x > 0.0 then @@ -64384,7 +64447,7 @@ function ImGui.RadioButtonEx(label, active) end local label_pos = ImVec2(check_bb.Max.x + style.ItemInnerSpacing.x, check_bb.Min.y + style.FramePadding.y) if g.LogEnabled then - -- ImGui.LogRenderedText(label_pos, active and "(x)" or "( )") + ImGui.LogRenderedText(label_pos, active and "(x)" or "( )") end if label_size.x > 0.0 then ImGui.RenderText(label_pos, label, 1, label_end, false) @@ -64706,7 +64769,7 @@ function ImGui.SeparatorEx(flags, thickness) -- Draw window.DrawList:AddRectFilled(bb.Min, bb.Max, ImGui.GetColorU32(28 --[[ImGuiCol.Separator]])) if g.LogEnabled then - ImGui.LogRenderedText(bb.Min, "--------------------------------") + ImGui.LogRenderedText(bb.Min, "--------------------------------\n") end end @@ -65265,6 +65328,8 @@ local GDataTypeInfo = { ImGuiDataTypeInfo(2, "U16", "%u", "%u"), ImGuiDataTypeInfo(4, "S32", "%d", "%d"), -- ImGuiDataType.S32 ImGuiDataTypeInfo(4, "U32", "%u", "%u"), + ImGuiDataTypeInfo(8, "S64", "%lld", "%lld"), -- ImGuiDataType.S64 + ImGuiDataTypeInfo(8, "U64", "%llu", "%llu"), ImGuiDataTypeInfo(4, "float", "%.3f", "%f"), -- ImGuiDataType.Float ImGuiDataTypeInfo(8, "double", "%f", "%lf"), -- ImGuiDataType.Double ImGuiDataTypeInfo(1, "bool", "%d", "%d"), -- ImGuiDataType.Bool @@ -65273,37 +65338,68 @@ local GDataTypeInfo = { --- @param data_type ImGuiDataType function ImGui.DataTypeGetInfo(data_type) - assert(data_type >= 0 and data_type < 10 --[[ImGuiDataType.COUNT]]) + assert(data_type >= 0 and data_type < 12 --[[ImGuiDataType.COUNT]]) return GDataTypeInfo[data_type + 1] end +-- [Luau] string.format() has no length modifiers (%lld, %I64d...) and formats negative numbers as 64-bit for %u/%x/%X/%o: +-- strip modifiers and re-apply C's integer promotion/two's complement for signed types. +local DataTypeFormatStringCached do +local fmt_info_memo = {} -- format -> { stripped format, is unsigned conversion } +local function GetFormatInfo(format) + local info = fmt_info_memo[format] + if info == nil then + local stripped = string.gsub(string.gsub(format, "(%%[-+ #0']*%d*%.?%d*)[hlLqjzt]+", "%1"), "(%%[-+ #0']*%d*%.?%d*)I64", "%1") + local conv = string.match(stripped, "%%[-+ #0']*%d*%.?%d*([diouxXc])") + info = { stripped, conv == "u" or conv == "x" or conv == "X" or conv == "o" } + fmt_info_memo[format] = info + end + return info +end + +--- Lua-string version of DataTypeFormatString() (memoized), used for display. +--- @param data_type ImGuiDataType +--- @param data number +--- @param format string +--- @return string +function DataTypeFormatStringCached(data_type, data, format) + if data_type == 8 --[[ImGuiDataType.Float]] or data_type == 9 --[[ImGuiDataType.Double]] then + return FormatCached(format, data) + end + local info = GetFormatInfo(format) + if data_type == 0 --[[ImGuiDataType.S8]] then data = (ImS8)(data) + elseif data_type == 1 --[[ImGuiDataType.U8]] then data = (ImU8)(data) + elseif data_type == 2 --[[ImGuiDataType.S16]] then data = (ImS16)(data) + elseif data_type == 3 --[[ImGuiDataType.U16]] then data = (ImU16)(data) + elseif data_type == 4 --[[ImGuiDataType.S32]] then -- (signed values are already stored signed) + elseif data_type == 5 --[[ImGuiDataType.U32]] then data = (ImU32)(data) + elseif data_type == 6 --[[ImGuiDataType.S64]] or data_type == 7 --[[ImGuiDataType.U64]] then + -- (string.format() already prints negative numbers as 64-bit two's complement for %u/%x/%X/%o) + if info[2] then + if data >= 18446744073709551616 then data = -1 end -- (ImU64)-1 rounds to 2^64 in a double: print ULLONG_MAX + elseif data >= 9223372036854775808 then + data = 9223372036854774784 -- largest double below 2^63 (LLONG_MAX isn't representable) + end + return FormatCached(info[1], data) + else + assert(false) + end + if data < 0 and info[2] then data = data + 4294967296 end -- Signedness doesn't matter when pushing integer arguments + return FormatCached(info[1], data) +end +end + --- @param buf char[] --- @param buf_size int --- @param data_type ImGuiDataType --- @param data number --- @param format string +--- @return int function ImGui.DataTypeFormatString(buf, buf_size, data_type, data, format) - local str - if data_type == 4 --[[ImGuiDataType.S32]] then - str = ImFormatString(format, (ImS32)(data)) - elseif data_type == 5 --[[ImGuiDataType.U32]] then - str = ImFormatString(format, (ImU32)(data)) - elseif data_type == 6 --[[ImGuiDataType.Float]] then - str = ImFormatString(format, data) - elseif data_type == 7 --[[ImGuiDataType.Double]] then - str = ImFormatString(format, data) - elseif data_type == 0 --[[ImGuiDataType.S8]] then - str = ImFormatString(format, (ImS8)(data)) - elseif data_type == 1 --[[ImGuiDataType.U8]] then - str = ImFormatString(format, (ImU8)(data)) - elseif data_type == 2 --[[ImGuiDataType.S16]] then - str = ImFormatString(format, (ImS16)(data)) - elseif data_type == 3 --[[ImGuiDataType.U16]] then - str = ImFormatString(format, (ImU16)(data)) - else - assert(false) - end - ImStd.ImStrncpy(buf, 1, { string.byte(str, 1, #str) }, 1, ImMin(#str + 1, buf_size)) -- TODO: update this when new ImFormatString is implemented + local str = DataTypeFormatStringCached(data_type, data, format) + local len = ImMin(#str, buf_size - 1) -- ImFormatString(): truncate and return the written length + ImStd.ImStrncpy(buf, 1, { string.byte(str, 1, len) }, 1, len + 1) + return len end --- @param data_type ImGuiDataType @@ -65349,13 +65445,25 @@ function ImGui.DataTypeApplyOp(data_type, op, arg1, arg2) elseif op == 45 then return ImSubClampOverflow(arg1, arg2, IM_U32_MIN, IM_U32_MAX) end - elseif data_type == 6 --[[ImGuiDataType.Float]] then + elseif data_type == 6 --[[ImGuiDataType.S64]] then + if op == 43 then + return ImAddClampOverflow(arg1, arg2, IM_S64_MIN, IM_S64_MAX) + elseif op == 45 then + return ImSubClampOverflow(arg1, arg2, IM_S64_MIN, IM_S64_MAX) + end + elseif data_type == 7 --[[ImGuiDataType.U64]] then + if op == 43 then + return ImAddClampOverflow(arg1, arg2, IM_U64_MIN, IM_U64_MAX) + elseif op == 45 then + return ImSubClampOverflow(arg1, arg2, IM_U64_MIN, IM_U64_MAX) + end + elseif data_type == 8 --[[ImGuiDataType.Float]] then if op == 43 then return arg1 + arg2 elseif op == 45 then return arg1 - arg2 end - elseif data_type == 7 --[[ImGuiDataType.Double]] then + elseif data_type == 9 --[[ImGuiDataType.Double]] then if op == 43 then return arg1 + arg2 elseif op == 45 then @@ -65395,7 +65503,7 @@ function ImGui.DataTypeApplyFromText(buf, data_type, data, format, data_when_emp -- Sanitize format -- - For float/double we have to ignore format with precision (e.g. "%.2f") because sscanf doesn't take them in, so force them into %f and %lf local format_sanitized, format_sanitized_size = {}, 32 - if (data_type == 6 --[[ImGuiDataType.Float]] or data_type == 7 --[[ImGuiDataType.Double]]) then + if (data_type == 8 --[[ImGuiDataType.Float]] or data_type == 9 --[[ImGuiDataType.Double]]) then format = type_info.ScanFmt else format = ImParseFormatSanitizeForScanning(format, format_sanitized, format_sanitized_size) @@ -65452,8 +65560,10 @@ function ImGui.DataTypeCompare(data_type, arg1, arg2) elseif data_type == 3 --[[ImGuiDataType.U16]] then return DataTypeCompareT((ImU16)(arg1), (ImU16)(arg2)) elseif data_type == 4 --[[ImGuiDataType.S32]] then return DataTypeCompareT((ImS32)(arg1), (ImS32)(arg2)) elseif data_type == 5 --[[ImGuiDataType.U32]] then return DataTypeCompareT((ImU32)(arg1), (ImU32)(arg2)) - elseif data_type == 6 --[[ImGuiDataType.Float]] then return DataTypeCompareT(arg1, arg2) - elseif data_type == 7 --[[ImGuiDataType.Double]] then return DataTypeCompareT(arg1, arg2) + elseif data_type == 6 --[[ImGuiDataType.S64]] then return DataTypeCompareT((ImS64)(arg1), (ImS64)(arg2)) + elseif data_type == 7 --[[ImGuiDataType.U64]] then return DataTypeCompareT((ImU64)(arg1), (ImU64)(arg2)) + elseif data_type == 8 --[[ImGuiDataType.Float]] then return DataTypeCompareT(arg1, arg2) + elseif data_type == 9 --[[ImGuiDataType.Double]] then return DataTypeCompareT(arg1, arg2) end assert(false) return 0 @@ -65482,8 +65592,10 @@ function ImGui.DataTypeClamp(data_type, data, min, max) elseif data_type == 3 --[[ImGuiDataType.U16]] then return DataTypeClampT((ImU16)(data), min and (ImU16)(min), max and (ImU16)(max)) elseif data_type == 4 --[[ImGuiDataType.S32]] then return DataTypeClampT((ImS32)(data), min and (ImS32)(min), max and (ImS32)(max)) elseif data_type == 5 --[[ImGuiDataType.U32]] then return DataTypeClampT((ImU32)(data), min and (ImU32)(min), max and (ImU32)(max)) - elseif data_type == 6 --[[ImGuiDataType.Float]] then return DataTypeClampT(data, min, max) - elseif data_type == 7 --[[ImGuiDataType.Double]] then return DataTypeClampT(data, min, max) + elseif data_type == 6 --[[ImGuiDataType.S64]] then return DataTypeClampT((ImS64)(data), min and (ImS64)(min), max and (ImS64)(max)) + elseif data_type == 7 --[[ImGuiDataType.U64]] then return DataTypeClampT((ImU64)(data), min and (ImU64)(min), max and (ImU64)(max)) + elseif data_type == 8 --[[ImGuiDataType.Float]] then return DataTypeClampT(data, min, max) + elseif data_type == 9 --[[ImGuiDataType.Double]] then return DataTypeClampT(data, min, max) end assert(false) return data, false @@ -65522,7 +65634,7 @@ local ImParseFormatFindStart --- @param v number function ImGui.RoundScalarWithFormatT(format, data_type, v) -- IM_UNUSED(data_type) - assert(data_type == 6 --[[ImGuiDataType.Float]] or data_type == 7 --[[ImGuiDataType.Double]]) + assert(data_type == 8 --[[ImGuiDataType.Float]] or data_type == 9 --[[ImGuiDataType.Double]]) local fmt_start = ImParseFormatFindStart(format) if string.byte(format, fmt_start) ~= 37 or string.byte(format, fmt_start + 1) == 37 then return v -- Don't apply if the value is not visible in the format string @@ -65865,7 +65977,7 @@ function ImGui.InputScalar(label, data_type, data, step, step_fast, format, flag local data_default = (bit32.band(g.NextItemData.HasFlags, 8 --[[ImGuiNextItemDataFlags.HasRefVal]]) ~= 0) and g.NextItemData.RefVal or g.DataTypeZeroValue - local buf, buf_size = {}, 64 -- TODO: IM_COUNTOF() + local buf, buf_size = {}, 64 -- char buf[64]; IM_COUNTOF(buf) if bit32.band(flags, 16384 --[[ImGuiInputTextFlags.DisplayEmptyRefVal]]) ~= 0 and ImGui.DataTypeCompare(data_type, data, data_default) == 0 then buf[1] = 0 else @@ -66014,15 +66126,15 @@ end function ImGui.InputFloat3(label, v, format, flags) if format == nil then format = "%.3f" end - return ImGui.InputScalarN(label, 6 --[[ImGuiDataType.Float]], v, 3, nil, nil, format, flags) + return ImGui.InputScalarN(label, 8 --[[ImGuiDataType.Float]], v, 3, nil, nil, format, flags) end function ImGui.InputFloat2(label, v, format, flags) - return ImGui.InputScalarN(label, 6 --[[ImGuiDataType.Float]], v, 2, nil, nil, format or "%.3f", flags) + return ImGui.InputScalarN(label, 8 --[[ImGuiDataType.Float]], v, 2, nil, nil, format or "%.3f", flags) end function ImGui.InputFloat4(label, v, format, flags) - return ImGui.InputScalarN(label, 6 --[[ImGuiDataType.Float]], v, 4, nil, nil, format or "%.3f", flags) + return ImGui.InputScalarN(label, 8 --[[ImGuiDataType.Float]], v, 4, nil, nil, format or "%.3f", flags) end function ImGui.InputInt2(label, v, flags) @@ -66063,7 +66175,7 @@ function ImGui.InputFloat(label, v, step, step_fast, format, flags) if step_fast == nil then step_fast = .0 end if format == nil then format = "%.3f" end - return ImGui.InputScalar(label, 6 --[[ImGuiDataType.Float]], v, (step > 0.0 and step or nil), (step_fast > 0.0 and step_fast or nil), format, flags) + return ImGui.InputScalar(label, 8 --[[ImGuiDataType.Float]], v, (step > 0.0 and step or nil), (step_fast > 0.0 and step_fast or nil), format, flags) end --- @param label string @@ -66077,7 +66189,7 @@ function ImGui.InputDouble(label, v, step, step_fast, format, flags) if step_fast == nil then step_fast = .0 end if format == nil then format = "%.6f" end - return ImGui.InputScalar(label, 7 --[[ImGuiDataType.Double]], v, (step > 0.0 and step or nil), (step_fast > 0.0 and step_fast or nil), format, flags) + return ImGui.InputScalar(label, 9 --[[ImGuiDataType.Double]], v, (step > 0.0 and step or nil), (step_fast > 0.0 and step_fast or nil), format, flags) end ------------------------------------------------------------------------------- @@ -66118,7 +66230,7 @@ function ImGui.DragBehaviorT(TYPE, SIGNEDTYPE, data_type, v, v_speed, v_min, v_m local is_bounded = (v_min < v_max) or ((v_min == v_max) and (v_min ~= 0.0 or (bit32.band(flags, 1024 --[[ImGuiSliderFlags.ClampZeroRange]]) ~= 0))) local is_wrapped = is_bounded and (bit32.band(flags, 256 --[[ImGuiSliderFlags.WrapAround]]) ~= 0) local is_logarithmic = bit32.band(flags, 32 --[[ImGuiSliderFlags.Logarithmic]]) ~= 0 - local is_floating_point = (data_type == 6 --[[ImGuiDataType.Float]]) or (data_type == 7 --[[ImGuiDataType.Double]]) + local is_floating_point = (data_type == 8 --[[ImGuiDataType.Float]]) or (data_type == 9 --[[ImGuiDataType.Double]]) -- Default tweak speed if v_speed == 0.0 and is_bounded and (v_max - v_min < math.huge) then @@ -66319,9 +66431,13 @@ function ImGui.DragBehavior(id, data_type, v, v_speed, min, max, format, flags) return ImGui.DragBehaviorT(ImS32, ImS32, data_type, v, v_speed, min and min or IM_S32_MIN, max and max or IM_S32_MAX, format, flags) elseif data_type == 5 --[[ImGuiDataType.U32]] then return ImGui.DragBehaviorT(ImU32, ImS32, data_type, v, v_speed, min and min or IM_U32_MIN, max and max or IM_U32_MAX, format, flags) - elseif data_type == 6 --[[ImGuiDataType.Float]] then + elseif data_type == 6 --[[ImGuiDataType.S64]] then + return ImGui.DragBehaviorT(ImS64, ImS64, data_type, v, v_speed, min and min or IM_S64_MIN, max and max or IM_S64_MAX, format, flags) + elseif data_type == 7 --[[ImGuiDataType.U64]] then + return ImGui.DragBehaviorT(ImU64, ImS64, data_type, v, v_speed, min and min or IM_U64_MIN, max and max or IM_U64_MAX, format, flags) + elseif data_type == 8 --[[ImGuiDataType.Float]] then return ImGui.DragBehaviorT(float, float, data_type, v, v_speed, min and min or -3.4028234663853e+38 --[[FLT_MAX]], max and max or 3.4028234663853e+38 --[[FLT_MAX]], format, flags) - elseif data_type == 7 --[[ImGuiDataType.Double]] then + elseif data_type == 9 --[[ImGuiDataType.Double]] then return ImGui.DragBehaviorT(double, double, data_type, v, v_speed, min and min or -1.7976931348623e+308 --[[DBL_MAX]], max and max or 1.7976931348623e+308 --[[DBL_MAX]], format, flags) end @@ -66471,10 +66587,19 @@ function ImGui.DragScalar(label, data_type, data, v_speed, min, max, format, fla ImGui.MarkItemEdited(id) end - -- TODO: ImGui.DataTypeFormatString() should be used here instead of ImFormatString() - -- Display value using user-provided display format so user can add prefix/suffix/decorations to the value. - ImGui.RenderTextClipped(frame_bb.Min, frame_bb.Max, FormatCached(format, data), nil, nil, DRAG_TEXT_ALIGN) + local is_mixed = bit32.band(g.LastItemData.ItemFlags, 4096 --[[ImGuiItemFlags.MixedValue]]) ~= 0 + local value_buf = DataTypeFormatStringCached(data_type, data, (is_mixed and g.MixedValueLabel ~= nil) and g.MixedValueLabel or format) + if g.LogEnabled then + ImGui.LogSetNextTextDecoration("{", "}") + end + if is_mixed then + ImGui.PushStyleColor(0 --[[ImGuiCol.Text]], g.Style.Colors[1 --[[ImGuiCol.TextDisabled]]]) -- ImGuiCol_TextMixedValue + end + ImGui.RenderTextClipped(frame_bb.Min, frame_bb.Max, value_buf, nil, nil, DRAG_TEXT_ALIGN) + if is_mixed then + ImGui.PopStyleColor() + end if label_size.x > 0.0 then ImGui.RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label, 1, label_end, false) @@ -66497,7 +66622,7 @@ function ImGui.DragFloat(label, v, v_speed, v_min, v_max, format, flags) if format == nil then format = "%.3f" end if flags == nil then flags = 0 end - return ImGui.DragScalar(label, 6 --[[ImGuiDataType.Float]], v, v_speed, v_min, v_max, format, flags) + return ImGui.DragScalar(label, 8 --[[ImGuiDataType.Float]], v, v_speed, v_min, v_max, format, flags) end -- NB: v_speed is float to allow adjusting the drag speed with more precision @@ -66562,7 +66687,7 @@ end local function DragFloatN(n) return function(label, v, v_speed, v_min, v_max, format, flags) - return ImGui.DragScalarN(label, 6 --[[ImGuiDataType.Float]], v, n, v_speed or 1.0, v_min or 0.0, v_max or 0.0, format or "%.3f", flags or 0) + return ImGui.DragScalarN(label, 8 --[[ImGuiDataType.Float]], v, n, v_speed or 1.0, v_min or 0.0, v_max or 0.0, format or "%.3f", flags or 0) end end local function DragIntN(n) @@ -66588,8 +66713,8 @@ local function DragRange2(data_type, label, v_current_min, v_current_max, v_spee end local g = GImGui - local lo = (data_type == 6 --[[ImGuiDataType.Float]]) and -3.4028234663853e+38 --[[FLT_MAX]] or (-2147483648) --[[INT_MIN]] - local hi = (data_type == 6 --[[ImGuiDataType.Float]]) and 3.4028234663853e+38 --[[FLT_MAX]] or 2147483647 --[[INT_MAX]] + local lo = (data_type == 8 --[[ImGuiDataType.Float]]) and -3.4028234663853e+38 --[[FLT_MAX]] or (-2147483648) --[[INT_MIN]] + local hi = (data_type == 8 --[[ImGuiDataType.Float]]) and 3.4028234663853e+38 --[[FLT_MAX]] or 2147483647 --[[INT_MAX]] ImGui.PushID(label) ImGui.BeginGroup() ImGui.PushMultiItemsWidths(2, ImGui.CalcItemWidth()) @@ -66618,7 +66743,7 @@ local function DragRange2(data_type, label, v_current_min, v_current_max, v_spee end function ImGui.DragFloatRange2(label, v_current_min, v_current_max, v_speed, v_min, v_max, format, format_max, flags) - return DragRange2(6 --[[ImGuiDataType.Float]], label, v_current_min, v_current_max, v_speed or 1.0, v_min or 0.0, v_max or 0.0, format or "%.3f", format_max, flags or 0) + return DragRange2(8 --[[ImGuiDataType.Float]], label, v_current_min, v_current_max, v_speed or 1.0, v_min or 0.0, v_max or 0.0, format or "%.3f", format_max, flags or 0) end function ImGui.DragIntRange2(label, v_current_min, v_current_max, v_speed, v_min, v_max, format, format_max, flags) @@ -66789,7 +66914,7 @@ function ImGui.ScaleValueFromRatioT(TYPE, SIGNEDTYPE, data_type, t, v_min, v_max end else -- Linear slider - local is_floating_point = (data_type == 6 --[[ImGuiDataType.Float]]) or (data_type == 7 --[[ImGuiDataType.Double]]) + local is_floating_point = (data_type == 8 --[[ImGuiDataType.Float]]) or (data_type == 9 --[[ImGuiDataType.Double]]) if is_floating_point then result = ImLerp(v_min, v_max, t) elseif t < 1.0 then -- t is already < 1.0 here @@ -66827,7 +66952,7 @@ function ImGui.SliderBehaviorT(TYPE, SIGNEDTYPE, bb, id, data_type, v, v_min, v_ local axis = (bit32.band(flags, 1048576 --[[ImGuiSliderFlags.Vertical]]) ~= 0) and 2 --[[ImGuiAxis.Y]] or 1 --[[ImGuiAxis.X]] local axis_k = (axis == 1 --[[ImGuiAxis.X]]) and "x" or "y" -- [Luau] named key: ImVec2[axis] goes through IM_VEC2.__index local is_logarithmic = bit32.band(flags, 32 --[[ImGuiSliderFlags.Logarithmic]]) ~= 0 - local is_floating_point = (data_type == 6 --[[ImGuiDataType.Float]]) or (data_type == 7 --[[ImGuiDataType.Double]]) + local is_floating_point = (data_type == 8 --[[ImGuiDataType.Float]]) or (data_type == 9 --[[ImGuiDataType.Double]]) local v_range_f = (v_min < v_max) and (v_max - v_min) or (v_min - v_max) -- We don't need high precision for what we do with it. -- Calculate bounds @@ -67045,10 +67170,16 @@ function ImGui.SliderBehavior(bb, id, data_type, v, min, max, format, flags, out elseif data_type == 5 --[[ImGuiDataType.U32]] then assert(max <= math.floor(IM_U32_MAX / 2)) return ImGui.SliderBehaviorT(ImU32, ImS32, bb, id, data_type, v, min, max, format, flags, out_grab_bb) - elseif data_type == 6 --[[ImGuiDataType.Float]] then + elseif data_type == 6 --[[ImGuiDataType.S64]] then + assert(min >= IM_S64_MIN / 2 and max <= IM_S64_MAX / 2) + return ImGui.SliderBehaviorT(ImS64, ImS64, bb, id, data_type, v, min, max, format, flags, out_grab_bb) + elseif data_type == 7 --[[ImGuiDataType.U64]] then + assert(max <= IM_U64_MAX / 2) + return ImGui.SliderBehaviorT(ImU64, ImS64, bb, id, data_type, v, min, max, format, flags, out_grab_bb) + elseif data_type == 8 --[[ImGuiDataType.Float]] then assert(min >= -3.4028234663853e+38 --[[FLT_MAX]] / 2.0 and max <= 3.4028234663853e+38 --[[FLT_MAX]] / 2.0) return ImGui.SliderBehaviorT(float, float, bb, id, data_type, v, min, max, format, flags, out_grab_bb) - elseif data_type == 7 --[[ImGuiDataType.Double]] then + elseif data_type == 9 --[[ImGuiDataType.Double]] then assert(min >= -1.7976931348623e+308 --[[DBL_MAX]] / 2.0 and max <= 1.7976931348623e+308 --[[DBL_MAX]] / 2.0) return ImGui.SliderBehaviorT(double, double, bb, id, data_type, v, min, max, format, flags, out_grab_bb) end @@ -67157,13 +67288,19 @@ function ImGui.SliderScalar(label, data_type, data, min, max, format, flags) window.DrawList:AddRectFilled(grab_bb.Min, grab_bb.Max, ImGui.GetColorU32((g.ActiveId == id) and 21 --[[ImGuiCol.SliderGrabActive]] or 20 --[[ImGuiCol.SliderGrab]]), style.GrabRounding) end - -- TODO: ImGui.DataTypeFormatString() should be used here instead of ImFormatString() - -- Display value using user-provided display format so user can add prefix/suffix/decorations to the value. - -- if g.LogEnabled then - -- ImGui.LogSetNextTextDecoration("{", "}") - -- end - ImGui.RenderTextClipped(frame_bb.Min, frame_bb.Max, FormatCached(format, data), nil, nil, DRAG_TEXT_ALIGN) + local is_mixed = bit32.band(g.LastItemData.ItemFlags, 4096 --[[ImGuiItemFlags.MixedValue]]) ~= 0 + local value_buf = DataTypeFormatStringCached(data_type, data, (is_mixed and g.MixedValueLabel ~= nil) and g.MixedValueLabel or format) + if g.LogEnabled then + ImGui.LogSetNextTextDecoration("{", "}") + end + if is_mixed then + ImGui.PushStyleColor(0 --[[ImGuiCol.Text]], g.Style.Colors[1 --[[ImGuiCol.TextDisabled]]]) -- ImGuiCol_TextMixedValue + end + ImGui.RenderTextClipped(frame_bb.Min, frame_bb.Max, value_buf, nil, nil, DRAG_TEXT_ALIGN) + if is_mixed then + ImGui.PopStyleColor() + end if label_size.x > 0.0 then ImGui.RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label, 1, label_end, false) @@ -67229,7 +67366,7 @@ end --- @param format? string --- @param flags? ImGuiSliderFlags function ImGui.SliderFloat2(label, v, v_min, v_max, format, flags) - return ImGui.SliderScalarN(label, 6 --[[ImGuiDataType.Float]], v, 2, v_min, v_max, format, flags) + return ImGui.SliderScalarN(label, 8 --[[ImGuiDataType.Float]], v, 2, v_min, v_max, format, flags) end --- @param label string @@ -67239,7 +67376,7 @@ end --- @param format? string --- @param flags? ImGuiSliderFlags function ImGui.SliderFloat3(label, v, v_min, v_max, format, flags) - return ImGui.SliderScalarN(label, 6 --[[ImGuiDataType.Float]], v, 3, v_min, v_max, format, flags) + return ImGui.SliderScalarN(label, 8 --[[ImGuiDataType.Float]], v, 3, v_min, v_max, format, flags) end --- @param label string @@ -67249,7 +67386,7 @@ end --- @param format? string --- @param flags? ImGuiSliderFlags function ImGui.SliderFloat4(label, v, v_min, v_max, format, flags) - return ImGui.SliderScalarN(label, 6 --[[ImGuiDataType.Float]], v, 4, v_min, v_max, format, flags) + return ImGui.SliderScalarN(label, 8 --[[ImGuiDataType.Float]], v, 4, v_min, v_max, format, flags) end --- @param label string @@ -67262,7 +67399,7 @@ function ImGui.SliderFloat(label, v, v_min, v_max, format, flags) if format == nil then format = "%.3f" end if flags == nil then flags = 0 end - return ImGui.SliderScalar(label, 6 --[[ImGuiDataType.Float]], v, v_min, v_max, format, flags) + return ImGui.SliderScalar(label, 8 --[[ImGuiDataType.Float]], v, v_min, v_max, format, flags) end --- @param label string @@ -67379,9 +67516,15 @@ function ImGui.VSliderScalar(label, size, data_type, data, min, max, format, fla -- Display value using user-provided display format so user can add prefix/suffix/decorations to the value. -- For the vertical slider we allow centered text to overlap the frame padding - -- local value_buf, value_buf_size = {}, 64 - -- TODO: ImGui.DataTypeFormatString() - ImGui.RenderTextClipped(ImVec2(frame_bb.Min.x, frame_bb.Min.y + style.FramePadding.y), frame_bb.Max, ImFormatString(format, data), nil, nil, ImVec2(0.5, 0.0)) + local is_mixed = bit32.band(g.LastItemData.ItemFlags, 4096 --[[ImGuiItemFlags.MixedValue]]) ~= 0 + local value_buf = DataTypeFormatStringCached(data_type, data, (is_mixed and g.MixedValueLabel ~= nil) and g.MixedValueLabel or format) + if is_mixed then + ImGui.PushStyleColor(0 --[[ImGuiCol.Text]], g.Style.Colors[1 --[[ImGuiCol.TextDisabled]]]) -- ImGuiCol_TextMixedValue + end + ImGui.RenderTextClipped(ImVec2(frame_bb.Min.x, frame_bb.Min.y + style.FramePadding.y), frame_bb.Max, value_buf, nil, nil, ImVec2(0.5, 0.0)) + if is_mixed then + ImGui.PopStyleColor() + end if label_size.x > 0.0 then ImGui.RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label, 1, label_end, false) end @@ -67400,7 +67543,7 @@ end function ImGui.VSliderFloat(label, size, v, v_min, v_max, format, flags) if format == nil then format = "%.3f" end - return ImGui.VSliderScalar(label, size, 6 --[[ImGuiDataType.Float]], v, v_min, v_max, format, flags) + return ImGui.VSliderScalar(label, size, 8 --[[ImGuiDataType.Float]], v, v_min, v_max, format, flags) end --- @param label string @@ -69268,6 +69411,12 @@ function ImGui.InputTextEx(label, hint, buf, buf_size, size_arg, flags, callback state.TextSrc = nil end + -- Log as text + if g.LogEnabled and (not is_password or is_displaying_hint) then + ImGui.LogSetNextTextDecoration("{", "}") + ImGui.LogRenderedText(draw_pos, ImGui._ByteArrayToString(buf_display, 1, buf_display_end)) + end + if label_size.x > 0.0 then ImGui.RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label, 1, label_end, false) end @@ -70886,9 +71035,9 @@ function ImGui.TreeNodeBehavior(id, flags, label, label_end) if bit32.band(flags, 268435456 --[[ImGuiTreeNodeFlags.ClipLabelForTrailingButton]]) ~= 0 then frame_bb.Max.x = frame_bb.Max.x - (g.FontSize + style.FramePadding.x) end - -- if g.LogEnabled then - -- ImGui.LogSetNextTextDecoration("###", "###") - -- end + if g.LogEnabled then + ImGui.LogSetNextTextDecoration("###", "###") + end else -- Unframed typed for tree nodes if hovered or selected then @@ -70904,9 +71053,9 @@ function ImGui.TreeNodeBehavior(id, flags, label, label_end) elseif not is_leaf then ImGui.RenderArrow(window.DrawList, ImVec2(text_pos.x - text_offset_x + padding_x, text_pos.y + g.FontSize * 0.15), text_col, is_open and ((bit32.band(flags, 536870912 --[[ImGuiTreeNodeFlags.UpsideDownArrow]]) ~= 0) and 2 --[[ImGuiDir.Up]] or 3 --[[ImGuiDir.Down]]) or 1 --[[ImGuiDir.Right]], 0.70) end - -- if g.LogEnabled then - -- ImGui.LogSetNextTextDecoration(">", nil) - -- end + if g.LogEnabled then + ImGui.LogSetNextTextDecoration(">", nil) + end end if draw_tree_lines then @@ -73365,7 +73514,7 @@ function ImGui.BeginMenuEx(label, icon, enabled) ImGui.PushStyleVarX(14 --[[ImGuiStyleVar.ItemSpacing]], style.ItemSpacing.x * 2.0) local text_pos = ImVec2(window.DC.CursorPos.x + offsets.OffsetLabel, pos.y + window.DC.CurrLineTextBaseOffset) pressed = ImGui.Selectable("", menu_is_open, selectable_flags, label_size) - -- TODO: ImGui.LogSetNextTextDecoration("[", "]") + ImGui.LogSetNextTextDecoration("[", "]") ImGui.RenderText(text_pos, label, 1, label_end, false) ImGui.PopStyleVar() window.DC.CursorPos.x = window.DC.CursorPos.x + IM_TRUNC(style.ItemSpacing.x * (-1.0 + 0.5)) -- -1 spacing to compensate the spacing added when Selectable() did a SameLine(). It would also work to call SameLine() ourselves after the PopStyleVar(). @@ -73381,7 +73530,7 @@ function ImGui.BeginMenuEx(label, icon, enabled) local extra_w = ImMax(0.0, ImGui.GetContentRegionAvail().x - min_w) local text_pos = ImVec2(window.DC.CursorPos.x, pos.y + window.DC.CurrLineTextBaseOffset) pressed = ImGui.Selectable("", menu_is_open, bit32.bor(selectable_flags, 16777216 --[[ImGuiSelectableFlags.SpanAvailWidth]]), ImVec2(min_w, label_size.y)) - -- ImGui.LogSetNextTextDecoration("", ">") + ImGui.LogSetNextTextDecoration("", ">") ImGui.RenderText(ImVec2(text_pos.x + offsets.OffsetLabel, text_pos.y), label, 1, label_end, false) if icon_w > 0.0 then --- @cast icon string @@ -73631,7 +73780,7 @@ function ImGui.MenuItemEx(label, icon, shortcut, selected, enabled) end if shortcut_w > 0.0 then ImGui.PushStyleColor(0 --[[ImGuiCol.Text]], style.Colors[1 --[[ImGuiCol.TextDisabled]]]) - -- ImGui.LogSetNextTextDecoration("(", ")") + ImGui.LogSetNextTextDecoration("(", ")") --- @cast shortcut string ImGui.RenderText(text_pos + ImVec2(offsets.OffsetShortcut + stretch_w, 0.0), shortcut, nil, nil, false) ImGui.PopStyleColor() @@ -80057,7 +80206,8 @@ __FILES['imstd_minstdio.lua'] = function() -- Supports: -- - %x, %X, %nx, %nX (where n is a number) --- - %d, %nd (where n is a number) +-- - %d, %nd, %u, %nu (where n is a number) +-- - length modifiers h, hh, l, ll, I64 on integers: ll/I64 = 64-bit range (doubles: exact only within +-2^53) -- - %f, %lf (very limited) -- -- Returns items_matched instead of EOF on error @@ -80071,6 +80221,9 @@ local CHAR_0, CHAR_9 = _byte'0', _byte'9' local CHAR_a, CHAR_A = _byte'a', _byte'A' local CHAR_d = _byte'd' local CHAR_l = _byte'l' +local CHAR_h = _byte'h' +local CHAR_u = _byte'u' +local CHAR_I = _byte'I' local CHAR_f, CHAR_F = _byte'f', _byte'F' local CHAR_x, CHAR_X = _byte'x', _byte'X' @@ -80091,10 +80244,15 @@ local function hex_digit_to_int(c) end -- we force this behavior by default -local function clamp_if_overflow(spec, val) +local function clamp_if_overflow(spec, val, is_64) if spec == CHAR_d or spec == CHAR_x or spec == CHAR_X then - if val > 2147483647 --[[INT_MAX]] then return 2147483647 --[[INT_MAX]] end - if val < (-2147483648) --[[INT_MIN]] then return (-2147483648) --[[INT_MIN]] end + local max = is_64 and 9223372036854775807 or 2147483647 --[[INT_MAX]] + local min = is_64 and -9223372036854775808 or (-2147483648) --[[INT_MIN]] + if val > max then return max end + if val < min then return min end + elseif spec == CHAR_u then + local max = is_64 and 18446744073709551615 or 4294967295 --[[UINT_MAX]] + if val > max then return max end end return val @@ -80158,22 +80316,27 @@ local function sscanf(buffer, buffer_begin, format, result) width = math.huge end + -- length modifiers + local n_l = 0 + while _byte(format, f, f) == CHAR_l or _byte(format, f, f) == CHAR_h do + if _byte(format, f, f) == CHAR_l then n_l = n_l + 1 end + f = f + 1 + end + if _byte(format, f, f) == CHAR_I and string.sub(format, f, f + 2) == "I64" then + n_l = 2 + f = f + 3 + end + local is_64 = n_l >= 2 + local spec = _byte(format, f, f) local base local is_float = false if spec == CHAR_x or spec == CHAR_X then base = 16 - elseif spec == CHAR_d then + elseif spec == CHAR_d or spec == CHAR_u then base = 10 elseif spec == CHAR_f or spec == CHAR_F then - is_float = true - elseif spec == CHAR_l then - f = f + 1 - if _byte(format, f, f) == CHAR_f then - is_float = true -- TODO: distinguish from float? - else - return items_matched - end + is_float = true -- TODO: distinguish %lf from %f? else return items_matched end @@ -80251,11 +80414,14 @@ local function sscanf(buffer, buffer_begin, format, result) val = val * base + sign * hex_digit_to_int(c) local old_val = val - val = clamp_if_overflow(spec, val) + val = clamp_if_overflow(spec, val, is_64) if old_val ~= val then break end end + if spec == CHAR_u and val < 0 then + val = val + (is_64 and 18446744073709551616 or 4294967296) -- unsigned wrap-around like strtoul() + end end result[assigned + 1] = val @@ -80285,6 +80451,7 @@ return { CalcNextScrollFromScrollTargetAndClamp = CalcNextScrollFromScrollTargetAndClamp, CustomConstraints = CustomConstraints, DBL_MAX = DBL_MAX, + DataTypeFormatStringCached = DataTypeFormatStringCached, DebugNodeTableGetSizingPolicyDesc = DebugNodeTableGetSizingPolicyDesc, DemoWindowColumns = DemoWindowColumns, DemoWindowInputs = DemoWindowInputs, @@ -80689,6 +80856,7 @@ return { ImGuiSettingsCleanupArgs = ImGuiSettingsCleanupArgs, ImGuiSettingsHandler = ImGuiSettingsHandler, ImGuiShrinkWidthItem = ImGuiShrinkWidthItem, + ImGuiSizeCallbackData = ImGuiSizeCallbackData, ImGuiSliderFlags = ImGuiSliderFlags, ImGuiSortDirection = ImGuiSortDirection, ImGuiStackLevelInfo = ImGuiStackLevelInfo, @@ -80781,6 +80949,7 @@ return { ImRsqrtPrecise = ImRsqrtPrecise, ImS16 = ImS16, ImS32 = ImS32, + ImS64 = ImS64, ImS8 = ImS8, ImSaturate = ImSaturate, ImSign = ImSign, @@ -80812,6 +80981,7 @@ return { ImTrunc64 = ImTrunc64, ImU16 = ImU16, ImU32 = ImU32, + ImU64 = ImU64, ImU8 = ImU8, ImUpperPowerOfTwo = ImUpperPowerOfTwo, ImVec1_Copy = ImVec1_Copy, diff --git a/build/imgui_love.linemap.json b/build/imgui_love.linemap.json index 8b4ee31..325243e 100644 --- a/build/imgui_love.linemap.json +++ b/build/imgui_love.linemap.json @@ -1 +1 @@ -[[183, "imgui.lua"], [22805, "imgui_demo.lua"], [34656, "imgui_draw.lua"], [42961, "imgui_h.lua"], [45937, "imgui_impl_love.lua"], [46481, "imgui_internal.lua"], [50453, "imgui_tables.lua"], [55545, "imgui_widgets.lua"], [67687, "imstb_rectpack.lua"], [68351, "imstb_textedit.lua"], [69893, "imstb_truetype.lua"], [72681, "imstd_minstdio.lua"]] \ No newline at end of file +[[183, "imgui.lua"], [22812, "imgui_demo.lua"], [34670, "imgui_draw.lua"], [42997, "imgui_h.lua"], [45994, "imgui_impl_love.lua"], [46538, "imgui_internal.lua"], [50510, "imgui_tables.lua"], [55602, "imgui_widgets.lua"], [67836, "imstb_rectpack.lua"], [68500, "imstb_textedit.lua"], [70042, "imstb_truetype.lua"], [72830, "imstd_minstdio.lua"]] \ No newline at end of file diff --git a/build/imgui_love.lua b/build/imgui_love.lua index a0425da..814517d 100644 --- a/build/imgui_love.lua +++ b/build/imgui_love.lua @@ -138,7 +138,7 @@ if not utf8 then end -local ImGui, ImVec2, ImVec4, ImRect, HelpMarker, ImVec2_Copy, IMGUI_DEMO_MARKER, ImGuiTableFlags, ImStd, ImVector, ImGuiKey, ImDrawFlags, ImGuiInputFlags, ImRect_Copy, ImStb, ImGuiDataType, IM_TRUNC, ImGuiStyleVarInfo, ImVec2_CopyV, IM_ASSERT_USER_ERROR, ImGuiHoveredFlags, ImFormatString, ImHashStr, IM_ASSERT_USER_ERROR_RET, ImIsPowerOfTwo, ImS32, ImGuiColorEditFlags, ImVec4_Copy, ImAbs, ExampleAppConsoleMT, IM_ROUND, ImGuiTableColumnFlags, ImGuiTreeNodeFlags, PopStyleCompact, PushStyleCompact, IM_ASSERT_PARANOID, ImU16, ExampleNames, ImGuiWindowFlags, ImGuiItemFlags, stbte, ImColor, ImCos, ImGuiButtonFlags, ImGuiDebugLogFlags, ImGuiListClipper, ImGuiLocKey, ImU32, ExampleTreeFuncs, ImS16, _PathArcToFastExXY, ImGuiMultiSelectFlags, ImSin, ImGuiTabBarFlags, ImLengthSqr, ImUpperPowerOfTwo, IM_F32_TO_INT8_SAT, ImFontAtlasPackGetRect, ImGuiMouseCursor, DockSettingsRenameNodeReferences, ExampleDualListBoxMT, IM_DRAWLIST_TEX_LINES_WIDTH_MAX, ImCeil, ImFabs, ImGuiCol, ImGuiSelectionBasicStorage, ImS8, ImU8, ExampleAppPropertyEditorMT, ImGuiChildFlags, ImGuiScrollFlags, ImGui_ImplLOVE_GetBackendData, ImLog, ExampleSelectionWithDeletionMT, CustomConstraints, ExampleAppLogMT, ImFontAtlasBuildInit, ImFontAtlasFontDestroyOutput, ImGuiComboFlags, ImGuiPopupFlags, ImGuiSliderFlags, ImTextClassifierSetCharClass, MyDocument, ShowExampleMenuFile, CalcCornerArcStepAndCount, ImFontAtlasBakedAddFontGlyph, ImFontAtlasPackAddRect, ImFontBaked_BuildLoadGlyph, ImFontConfig, ImGuiInputTextFlags, ImGuiStyle_Copy, ExampleAsset_s_current_sort_specs, IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_CALC, ImFontAtlasBuildNotifySetFont, ImFontAtlasBuildRenderBitmapFromString, ImFontAtlasFontDestroySourceData, ImFontAtlasFontSourceAddToFont, ImFontAtlasFontSourceInit, ImGuiTableColumn, stb_textedit_key, stbtt_GetGlyphBitmapBoxSubpixel, IM_FREE, ImDrawListSplitter, ImGuiDragDropFlags, stb_text_locate_coord, stb_text_makeundo_insert, stb_text_makeundo_replace, stb_textedit_find_charpos, stbtt_GetGlyphShape, ImGuiTableColumnSortSpecs, ImGuiTableInstanceData, ImGuiTableSettings, stb_text_makeundo_delete, stb_text_redo, stb_text_undo, stb_textedit_click, stb_textedit_drag, stbtt_FindGlyphIndex, stbtt_GetFontOffsetForIndex, stbtt_GetFontVMetrics, stbtt_GetGlyphBitmapBox, stbtt_GetGlyphHMetrics, stbtt_InitFont, stbtt_MakeGlyphBitmapSubpixelPrefilter, stbtt_ScaleForPixelHeight, stbtt__GetGlyphInfoT2, stbtt__GetGlyphShapeT2, stbtt_fontinfo, ImGuiOldColumnData, ImGuiOldColumns, ImGuiTable, ImGuiTableColumnSettings, ImGuiTableSortSpecs, ImGuiTableTempData, ImGui_ImplLOVE_CreateTexture, ImGui_ImplLOVE_DestroyTexture, ImGui_ImplLOVE_Init, ImGui_ImplLOVE_NewFrame, ImGui_ImplLOVE_RenderDrawData, ImGui_ImplLOVE_Shutdown, ImGui_ImplLOVE_UpdateTexture, stbrp_init_target, IMGUI_TABLE_MAX_COLUMNS, IMSTB_TEXTEDIT_UNDOSTATECOUNT, IM_COL32_DISABLE, ImGui_ImplLove, STB_TEXTEDIT_K_BACKSPACE, STB_TEXTEDIT_K_DELETE, STB_TEXTEDIT_K_DOWN, STB_TEXTEDIT_K_LEFT, STB_TEXTEDIT_K_LINEEND, STB_TEXTEDIT_K_LINESTART, STB_TEXTEDIT_K_PGDOWN, STB_TEXTEDIT_K_PGUP, STB_TEXTEDIT_K_REDO, STB_TEXTEDIT_K_RIGHT, STB_TEXTEDIT_K_SHIFT, STB_TEXTEDIT_K_TEXTEND, STB_TEXTEDIT_K_TEXTSTART, STB_TEXTEDIT_K_UNDO +local ImGui, ImVec2, ImVec4, ImRect, ImVec2_Copy, HelpMarker, IMGUI_DEMO_MARKER, ImGuiTableFlags, ImStd, ImVector, ImGuiKey, ImDrawFlags, ImGuiInputFlags, ImRect_Copy, ImStb, ImGuiDataType, IM_TRUNC, ImGuiStyleVarInfo, ImVec2_CopyV, IM_ASSERT_USER_ERROR, ImGuiHoveredFlags, ImHashStr, IM_ASSERT_USER_ERROR_RET, ImIsPowerOfTwo, ImS32, ImGuiColorEditFlags, ImVec4_Copy, ImAbs, ExampleAppConsoleMT, IM_ROUND, ImFormatString, ImGuiTableColumnFlags, ImGuiTreeNodeFlags, PopStyleCompact, PushStyleCompact, IM_ASSERT_PARANOID, ImU16, ExampleNames, ImGuiWindowFlags, ImGuiItemFlags, stbte, ImColor, ImCos, ImGuiButtonFlags, ImGuiDebugLogFlags, ImGuiListClipper, ImGuiLocKey, ImU32, ExampleTreeFuncs, ImS16, _PathArcToFastExXY, ImGuiMultiSelectFlags, ImSin, ImGuiTabBarFlags, ImLengthSqr, ImUpperPowerOfTwo, IM_F32_TO_INT8_SAT, ImFontAtlasPackGetRect, ImGuiMouseCursor, ImS64, DockSettingsRenameNodeReferences, ExampleDualListBoxMT, IM_DRAWLIST_TEX_LINES_WIDTH_MAX, ImCeil, ImFabs, ImGuiCol, ImGuiSelectionBasicStorage, ImS8, ImU8, ExampleAppPropertyEditorMT, ImGuiChildFlags, ImGuiScrollFlags, ImGui_ImplLOVE_GetBackendData, ExampleSelectionWithDeletionMT, CustomConstraints, ExampleAppLogMT, IMGUI_DEBUG_LOG_FONT, ImFontAtlasBuildInit, ImFontAtlasFontDestroyOutput, ImGuiComboFlags, ImGuiPopupFlags, ImGuiSliderFlags, ImTextClassifierSetCharClass, MyDocument, ShowExampleMenuFile, CalcCornerArcStepAndCount, ImFontAtlasBakedAddFontGlyph, ImFontAtlasPackAddRect, ImFontBaked_BuildLoadGlyph, ImFontConfig, ImGuiInputTextFlags, ImGuiStyle_Copy, ExampleAsset_s_current_sort_specs, IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_CALC, ImFontAtlasBuildNotifySetFont, ImFontAtlasBuildRenderBitmapFromString, ImFontAtlasFontDestroySourceData, ImFontAtlasFontSourceAddToFont, ImGuiTableColumn, stb_textedit_key, stbtt_GetGlyphBitmapBoxSubpixel, IM_FREE, ImDrawListSplitter, stb_text_locate_coord, stb_text_makeundo_insert, stb_text_makeundo_replace, stb_textedit_find_charpos, stbtt_GetGlyphShape, ImGuiTableColumnSortSpecs, ImGuiTableInstanceData, ImGuiTableSettings, stb_text_makeundo_delete, stb_text_redo, stb_text_undo, stb_textedit_click, stb_textedit_drag, stbtt_FindGlyphIndex, stbtt_GetFontOffsetForIndex, stbtt_GetFontVMetrics, stbtt_GetGlyphBitmapBox, stbtt_GetGlyphHMetrics, stbtt_InitFont, stbtt_MakeGlyphBitmapSubpixelPrefilter, stbtt_ScaleForPixelHeight, stbtt__GetGlyphInfoT2, stbtt__GetGlyphShapeT2, stbtt_fontinfo, ImGuiOldColumnData, ImGuiOldColumns, ImGuiTable, ImGuiTableColumnSettings, ImGuiTableSortSpecs, ImGuiTableTempData, ImGui_ImplLOVE_CreateTexture, ImGui_ImplLOVE_DestroyTexture, ImGui_ImplLOVE_Init, ImGui_ImplLOVE_NewFrame, ImGui_ImplLOVE_RenderDrawData, ImGui_ImplLOVE_Shutdown, ImGui_ImplLOVE_UpdateTexture, stbrp_init_target, IMGUI_TABLE_MAX_COLUMNS, IMSTB_TEXTEDIT_UNDOSTATECOUNT, IM_COL32_DISABLE, ImGui_ImplLove, STB_TEXTEDIT_K_BACKSPACE, STB_TEXTEDIT_K_DELETE, STB_TEXTEDIT_K_DOWN, STB_TEXTEDIT_K_LEFT, STB_TEXTEDIT_K_LINEEND, STB_TEXTEDIT_K_LINESTART, STB_TEXTEDIT_K_PGDOWN, STB_TEXTEDIT_K_PGUP, STB_TEXTEDIT_K_REDO, STB_TEXTEDIT_K_RIGHT, STB_TEXTEDIT_K_SHIFT, STB_TEXTEDIT_K_TEXTEND, STB_TEXTEDIT_K_TEXTSTART, STB_TEXTEDIT_K_UNDO, STB_TEXTEDIT_K_UP local type, mathMin, mathMax, mathFloor, mathCeil, bitOr, bitLShift = type, math.min, math.max, math.floor, math.ceil, bit32.bor, bit32.lshift local function IM_COL32(R, G, B, A) return (bitOr(bitLShift(A, 24 --[[IM_COL32_A_SHIFT]]), bitLShift(B, 16 --[[IM_COL32_B_SHIFT]]), bitLShift(G, 8 --[[IM_COL32_G_SHIFT]]), bitLShift(R, 0 --[[IM_COL32_R_SHIFT]]))) end @@ -6671,7 +6671,7 @@ function ImGui.IsMouseDragPastThreshold(button, lock_threshold) if lock_threshold == nil then lock_threshold = -1.0 end local g = GImGui - assert(button >= 0 and button < 3) -- IM_COUNTOF(g.IO.MouseDown) + assert(button >= 0 and button < 5 --[[ImGuiMouseButton.COUNT]]) -- IM_COUNTOF(g.IO.MouseDown) if lock_threshold < 0.0 then lock_threshold = g.IO.MouseDragThreshold end @@ -6684,7 +6684,7 @@ function ImGui.IsMouseDragging(button, lock_threshold) if lock_threshold == nil then lock_threshold = -1.0 end local g = GImGui - assert(button >= 0 and button < 3) -- IM_COUNTOF(g.IO.MouseDown) + assert(button >= 0 and button < 5 --[[ImGuiMouseButton.COUNT]]) -- IM_COUNTOF(g.IO.MouseDown) if not g.IO.MouseDown[button] then return false end @@ -7230,7 +7230,7 @@ function ImGui.EndGroup() assert(group_data.WindowID == window.ID) -- EndGroup() in wrong window? if (window.DC.IsSetPos) then - -- TODO: ImGui.ErrorCheckUsingSetCursorPosToExtendParentBoundaries() + ImGui.ErrorCheckUsingSetCursorPosToExtendParentBoundaries() end -- Include LastItemData.Rect.Max as a workaround for e.g. EndTable() undershooting with CursorMaxPos report. (#7543) @@ -7697,7 +7697,16 @@ function ImGui.BringWindowToDisplayBehind(window, behind_window) local g = GImGui window = window.RootWindow behind_window = behind_window.RootWindow - -- TODO: + local pos_wnd = ImGui.FindWindowDisplayIndex(window) + 1 -- 1-based + local pos_beh = ImGui.FindWindowDisplayIndex(behind_window) + 1 + local data = g.Windows.Data + if pos_wnd < pos_beh then + for i = pos_wnd, pos_beh - 2 do data[i] = data[i + 1] end -- memmove + data[pos_beh - 1] = window + else + for i = pos_wnd, pos_beh + 1, -1 do data[i] = data[i - 1] end -- memmove + data[pos_beh] = window + end end --- @param under_this_window? ImGuiWindow @@ -7903,7 +7912,7 @@ function ImGui.PushOverrideID(id) local g = GImGui local window = g.CurrentWindow if g.DebugHookIdInfoId == id and id ~= 0 then - ImGui.DebugHookIdInfo(id, 12 --[[ImGuiDataType.ID]], nil) + ImGui.DebugHookIdInfo(id, 13 --[[ImGuiDataType.ID]], nil) end -- [Luau] inline window.IDStack:push_back(id) local stack = window.IDStack @@ -7936,7 +7945,7 @@ function MT.ImGuiWindow:GetID(id) end local g = GImGui if g.DebugHookIdInfoId == h and h ~= 0 then - ImGui.DebugHookIdInfo(h, (type(id) == "string") and 9 --[[ImGuiDataType.String]] or 4 --[[ImGuiDataType.S32]], id) + ImGui.DebugHookIdInfo(h, (type(id) == "string") and 11 --[[ImGuiDataType.String]] or 4 --[[ImGuiDataType.S32]], id) end return h end @@ -7984,7 +7993,7 @@ function ImGui.GetIDWithSeed(a, b, c) id = ImHashStr(a, b and (b - 1) or nil, c) end if GImGui.DebugHookIdInfoId == id and id ~= 0 then - ImGui.DebugHookIdInfo(id, (type(a) == "number") and 4 --[[ImGuiDataType.S32]] or 9 --[[ImGuiDataType.String]], (b and type(a) == "string") and string.sub(a, 1, b - 1) or a) + ImGui.DebugHookIdInfo(id, (type(a) == "number") and 4 --[[ImGuiDataType.S32]] or 11 --[[ImGuiDataType.String]], (b and type(a) == "string") and string.sub(a, 1, b - 1) or a) end return id end @@ -8480,7 +8489,7 @@ function MT.ImGuiIO:ClearInputMouse() self.MousePos = ImVec2(-3.4028234663853e+38 --[[FLT_MAX]], -3.4028234663853e+38 --[[FLT_MAX]]) - for n = 0, 2 do -- IM_COUNTOF(MouseDown) + for n = 0, 5 --[[ImGuiMouseButton.COUNT]] - 1 do self.MouseDown[n] = false self.MouseDownDuration[n] = -1.0 self.MouseDownDurationPrev[n] = -1.0 @@ -9023,7 +9032,6 @@ function ImGui.IsKeyPressedEx(key, flags, owner_id) return true end --- TODO: -- Return untranslated names: on macOS, Cmd key will show as Ctrl, Ctrl key will show as super. function ImGui.GetKeyChordName(key_chord) local key = bit32.band(key_chord, bit32.bnot(61440 --[[ImGuiMod_Mask_]])) @@ -9472,7 +9480,7 @@ end --- @return bool function ImGui.IsAnyMouseDown() local g = GImGui - for n = 0, 2 do -- IM_COUNTOF(g.IO.MouseDown) - 1 + for n = 0, 5 --[[ImGuiMouseButton.COUNT]] - 1 do if g.IO.MouseDown[n] then return true end @@ -9486,7 +9494,7 @@ function ImGui.IsMouseDown(button, owner_id) if owner_id == nil then owner_id = 0 --[[ImGuiKeyOwner_Any]] end local g = GImGui - assert(button >= 0 and button < 3) -- IM_COUNTOF(g.IO.MouseDown) + assert(button >= 0 and button < 5 --[[ImGuiMouseButton.COUNT]]) -- IM_COUNTOF(g.IO.MouseDown) return g.IO.MouseDown[button] and ImGui.TestKeyOwner(ImGui.MouseButtonToKey(button), owner_id) -- Should be same as IsKeyDown(MouseButtonToKey(button), owner_id), but this allows legacy code hijacking the io.Mousedown[] array. end @@ -9506,7 +9514,7 @@ function ImGui.IsMouseClickedEx(button, flags, owner_id) if owner_id == nil then owner_id = 0 --[[ImGuiKeyOwner_Any]] end local g = GImGui - assert(button >= 0 and button < 3) -- IM_COUNTOF(g.IO.MouseDown) + assert(button >= 0 and button < 5 --[[ImGuiMouseButton.COUNT]]) -- IM_COUNTOF(g.IO.MouseDown) if not g.IO.MouseDown[button] then -- In theory this should already be encoded as (DownDuration < 0.0f), but testing this facilitates eating mechanism (until we finish work on key ownership) return false @@ -9537,7 +9545,7 @@ function ImGui.IsMouseReleased(button, owner_id) if owner_id == nil then owner_id = 0 --[[ImGuiKeyOwner_Any]] end local g = GImGui - assert(button >= 0 and button < 3) -- IM_COUNTOF(g.IO.MouseDown) + assert(button >= 0 and button < 5 --[[ImGuiMouseButton.COUNT]]) -- IM_COUNTOF(g.IO.MouseDown) return g.IO.MouseReleased[button] and ImGui.TestKeyOwner(ImGui.MouseButtonToKey(button), owner_id) -- Should be same as IsKeyReleased(MouseButtonToKey(button), owner_id) end @@ -9550,7 +9558,7 @@ end function ImGui.IsMouseReleasedWithDelay(button, delay) if delay == nil then delay = -1.0 end local g = GImGui - assert(button >= 0 and button < 3) + assert(button >= 0 and button < 5 --[[ImGuiMouseButton.COUNT]]) -- IM_COUNTOF(g.IO.MouseDown) if ImGui.IsMouseDown(button) then return false end @@ -9566,14 +9574,14 @@ end function ImGui.IsMouseDoubleClicked(button, owner_id) if owner_id == nil then owner_id = 0 --[[ImGuiKeyOwner_Any]] end local g = GImGui - assert(button >= 0 and button < 3) + assert(button >= 0 and button < 5 --[[ImGuiMouseButton.COUNT]]) -- IM_COUNTOF(g.IO.MouseDown) return g.IO.MouseClickedCount[button] == 2 and ImGui.TestKeyOwner(ImGui.MouseButtonToKey(button), owner_id) end --- @param button ImGuiMouseButton function ImGui.GetMouseClickedCount(button) local g = GImGui - assert(button >= 0 and button < 3) + assert(button >= 0 and button < 5 --[[ImGuiMouseButton.COUNT]]) -- IM_COUNTOF(g.IO.MouseDown) return g.IO.MouseClickedCount[button] end @@ -9664,7 +9672,7 @@ function ImGui.GetMouseDragDelta(button, lock_threshold) if button == nil then button = 0 end if lock_threshold == nil then lock_threshold = -1.0 end local g = GImGui - assert(button >= 0 and button < 3) + assert(button >= 0 and button < 5 --[[ImGuiMouseButton.COUNT]]) -- IM_COUNTOF(g.IO.MouseDown) if lock_threshold < 0.0 then lock_threshold = g.IO.MouseDragThreshold end @@ -9682,7 +9690,7 @@ end function ImGui.ResetMouseDragDelta(button) if button == nil then button = 0 end local g = GImGui - assert(button >= 0 and button < 3) + assert(button >= 0 and button < 5 --[[ImGuiMouseButton.COUNT]]) -- IM_COUNTOF(g.IO.MouseDown) -- NB: We don't need to reset g.IO.MouseDragMaxDistanceSqr ImVec2_Copy(g.IO.MouseClickedPos[button], g.IO.MousePos) end @@ -10127,14 +10135,13 @@ local function CalcWindowSizeAfterConstraint(window, size_desired) new_size.x = (cr.Min.x >= 0 and cr.Max.x >= 0) and ImClamp(new_size.x, cr.Min.x, cr.Max.x) or window.SizeFull.x new_size.y = (cr.Min.y >= 0 and cr.Max.y >= 0) and ImClamp(new_size.y, cr.Min.y, cr.Max.y) or window.SizeFull.y if g.NextWindowData.SizeCallback then - local data = {} -- TODO: ImGuiSizeCallbackData + local data = ImGuiSizeCallbackData() data.UserData = g.NextWindowData.SizeCallbackUserData - data.Pos = ImVec2(window.Pos.x, window.Pos.y) - data.CurrentSize = ImVec2(window.SizeFull.x, window.SizeFull.y) - data.DesiredSize = ImVec2(new_size.x, new_size.y) + ImVec2_Copy(data.Pos, window.Pos) + ImVec2_Copy(data.CurrentSize, window.SizeFull) + ImVec2_Copy(data.DesiredSize, new_size) g.NextWindowData.SizeCallback(data) - new_size.x = data.DesiredSize.x - new_size.y = data.DesiredSize.y + ImVec2_Copy(new_size, data.DesiredSize) end new_size.x = IM_TRUNC(new_size.x) new_size.y = IM_TRUNC(new_size.y) @@ -11343,6 +11350,7 @@ local function SetCurrentWindow(window) local g = GImGui --- @diagnostic disable-next-line g.CurrentWindow = window + g.StackSizesInBeginForCurrentWindow = window and g.CurrentWindowStack:back().StackSizesInBegin or nil g.CurrentTable = (window and window.DC.CurrentTableIdx ~= -1) and g.Tables:GetByIndex(window.DC.CurrentTableIdx) or nil if window then @@ -11359,7 +11367,6 @@ local function SetCurrentWindow(window) end end --- TODO: function ImGui.GcCompactTransientMiscBuffers() local g = GImGui g.ItemFlagsStack:clear() @@ -13581,7 +13588,6 @@ local function FindHoveredWindowEx(pos, find_first_and_in_any_viewport) return hovered_window, hovered_window_under_moving_window end --- TODO: -- The reason this is exposed in imgui_internal.h is: on touch-based system that don't have hovering, we want to dispatch inputs to the right target (imgui vs imgui+app) function ImGui.UpdateHoveredWindowAndCaptureFlags(mouse_pos) local g = GImGui @@ -13618,7 +13624,7 @@ function ImGui.UpdateHoveredWindowAndCaptureFlags(mouse_pos) local mouse_earliest_down = -1 local mouse_any_down = false - for i = 0, 2 do -- IM_COUNTOF(io.MouseDown) + for i = 0, 5 --[[ImGuiMouseButton.COUNT]] - 1 do if io.MouseClicked[i] then io.MouseDownOwned[i] = (g.HoveredWindow ~= nil) or has_open_popup io.MouseDownOwnedUnlessPopupClose[i] = (g.HoveredWindow ~= nil) or has_open_modal @@ -13707,7 +13713,7 @@ function ImGui.UpdateKeyboardInputs() end -- Update aliases - for n = 0, 2 do -- TODO: ImGuiMouseButton.COUNT - 1 + for n = 0, 5 --[[ImGuiMouseButton.COUNT]] - 1 do ImGui.UpdateAliasKey(ImGui.MouseButtonToKey(n), io.MouseDown[n], io.MouseDown[n] and 1.0 or 0.0) end ImGui.UpdateAliasKey(661 --[[ImGuiKey.MouseWheelX]], io.MouseWheelH ~= 0.0, io.MouseWheelH) @@ -13815,7 +13821,7 @@ function ImGui.UpdateMouseInputs() g.NavHighlightItemUnderNav = false end - for i = 0, 2 do -- IM_COUNTOF(io.MouseDown) + for i = 0, 5 --[[ImGuiMouseButton.COUNT]] - 1 do io.MouseClicked[i] = io.MouseDown[i] and (io.MouseDownDuration[i] < 0.0) io.MouseClickedCount[i] = 0 -- Will be filled below io.MouseReleased[i] = not io.MouseDown[i] and (io.MouseDownDuration[i] >= 0.0) @@ -14767,7 +14773,6 @@ function ImGui.EndFrame() ImGui.CallContextHooks(g, 3 --[[ImGuiContextHookType.EndFramePost]]) end --- TODO: -- Prepare the data for rendering so you can call GetDrawData() -- (As with anything within the ImGui:: namespace this doesn't touch your GPU or graphics API at all: -- it is the role of the ImGui_ImplXXXX_RenderDrawData() function provided by the renderer backend) @@ -15345,9 +15350,9 @@ function ImGui.PushStyleVar(idx, val) local g = GImGui local var_info = ImGui.GetStyleVarInfo(idx) if type(val) == "number" then - IM_ASSERT_USER_ERROR_RET(var_info.DataType == 6 --[[ImGuiDataType.Float]] and var_info.Count == 1, "Calling PushStyleVar() with wrong type!") + IM_ASSERT_USER_ERROR_RET(var_info.DataType == 8 --[[ImGuiDataType.Float]] and var_info.Count == 1, "Calling PushStyleVar() with wrong type!") else -- ImVec2 - IM_ASSERT_USER_ERROR_RET(var_info.DataType == 6 --[[ImGuiDataType.Float]] and var_info.Count == 2, "Calling PushStyleVar() with wrong type!") + IM_ASSERT_USER_ERROR_RET(var_info.DataType == 8 --[[ImGuiDataType.Float]] and var_info.Count == 2, "Calling PushStyleVar() with wrong type!") end local var = g.Style[var_info.Key] g.StyleVarStack:push_back(ImGuiStyleMod(idx, var)) @@ -15363,7 +15368,7 @@ end function ImGui.PushStyleVarX(idx, val_x) local g = GImGui local var_info = ImGui.GetStyleVarInfo(idx) - IM_ASSERT_USER_ERROR_RET(var_info.DataType == 6 --[[ImGuiDataType.Float]] and var_info.Count == 2, "Calling PushStyleVarX() with wrong type!") + IM_ASSERT_USER_ERROR_RET(var_info.DataType == 8 --[[ImGuiDataType.Float]] and var_info.Count == 2, "Calling PushStyleVarX() with wrong type!") local pvar = g.Style[var_info.Key] g.StyleVarStack:push_back(ImGuiStyleMod(idx, pvar)) pvar.x = val_x @@ -15374,7 +15379,7 @@ end function ImGui.PushStyleVarY(idx, val_y) local g = GImGui local var_info = ImGui.GetStyleVarInfo(idx) - IM_ASSERT_USER_ERROR_RET(var_info.DataType == 6 --[[ImGuiDataType.Float]] and var_info.Count == 2, "Calling PushStyleVarY() with wrong type!") + IM_ASSERT_USER_ERROR_RET(var_info.DataType == 8 --[[ImGuiDataType.Float]] and var_info.Count == 2, "Calling PushStyleVarY() with wrong type!") local pvar = g.Style[var_info.Key] g.StyleVarStack:push_back(ImGuiStyleMod(idx, pvar)) pvar.y = val_y @@ -15394,9 +15399,9 @@ function ImGui.PopStyleVar(count) local backup = stack.Data[stack.Size] -- [Luau] inline back()/pop_back() local var_info = ImGui.GetStyleVarInfo(backup.VarIdx) local data = g.Style[var_info.Key] - if (var_info.DataType == 6 --[[ImGuiDataType.Float]] and var_info.Count == 1) then + if (var_info.DataType == 8 --[[ImGuiDataType.Float]] and var_info.Count == 1) then g.Style[var_info.Key] = backup.BackupVal[1] - elseif (var_info.DataType == 6 --[[ImGuiDataType.Float]] and var_info.Count == 2) then + elseif (var_info.DataType == 8 --[[ImGuiDataType.Float]] and var_info.Count == 2) then data.x = backup.BackupVal[1]; data.y = backup.BackupVal[2] end stack.Size = stack.Size - 1 @@ -16634,7 +16639,7 @@ end function ImGui.PopFocusScope() local g = GImGui - -- TODO: IM_ASSERT_USER_ERROR_RET(g.FocusScopeStack.Size > g.StackSizesInBeginForCurrentWindow.SizeOfFocusScopeStack, "Calling PopFocusScope() too many times!") + IM_ASSERT_USER_ERROR_RET(g.FocusScopeStack.Size > g.StackSizesInBeginForCurrentWindow.SizeOfFocusScopeStack, "Calling PopFocusScope() too many times!") g.FocusScopeStack:pop_back() if g.FocusScopeStack.Size > 0 then g.CurrentFocusScopeId = g.FocusScopeStack:back().ID @@ -19649,9 +19654,10 @@ function ImGui.ErrorCheckUsingSetCursorPosToExtendParentBoundaries() window.DC.IsSetPos = false if window.DC.CursorPos.x <= window.DC.CursorMaxPos.x and window.DC.CursorPos.y <= window.DC.CursorMaxPos.y then return end if window.SkipItems then return end - -- Upstream asserts (user error): "Code uses SetCursorPos()/SetCursorScreenPos() to extend window/parent boundaries. - -- Please submit an item e.g. Dummy() afterwards". We keep the old, tolerant behavior instead of erroring. - window.DC.CursorMaxPos = ImMax(window.DC.CursorMaxPos, window.DC.CursorPos) + IM_ASSERT_USER_ERROR(false, "Code uses SetCursorPos()/SetCursorScreenPos() to extend window/parent boundaries.\nPlease submit an item e.g. Dummy() afterwards in order to grow window/parent boundaries.") + + -- For reference, the old behavior was essentially: + --window.DC.CursorMaxPos = ImMax(window.DC.CursorMaxPos, window.DC.CursorPos) end ------------------------------------------------------------------------------- @@ -21650,7 +21656,7 @@ function ImGui.DebugHookIdInfo(id, data_type, data_id) if info == nil or info.ID ~= id then return end if info.Desc == nil then if data_type == 4 --[[ImGuiDataType.S32]] then info.Desc = string.format("%d", data_id) - elseif data_type == 9 --[[ImGuiDataType.String]] then info.Desc = tostring(data_id) + elseif data_type == 11 --[[ImGuiDataType.String]] then info.Desc = tostring(data_id) else info.Desc = string.format("0x%08X [override]", id) end -- PushOverrideID() is often used to avoid hashing twice, which would lead to 2 calls to DebugHookIdInfo(). We prioritize the first one. end info.QuerySuccess = true @@ -21667,7 +21673,7 @@ local function DebugItemPathQuery_FormatLevelInfo(query, n, format_for_ui) local info = query.Results[n + 1] local window = (info.Desc == nil and n == 0) and ImGui.FindWindowByID(info.ID) or nil if window then return string.format(format_for_ui and "\"%s\" [window]" or "%s", SkipUncontributingPrefix(window.Name)) end -- Source: window name (because the root ID don't call GetID() and so doesn't get hooked) - if info.QuerySuccess then return string.format((format_for_ui and info.DataType == 9 --[[ImGuiDataType.String]]) and "\"%s\"" or "%s", SkipUncontributingPrefix(info.Desc)) end -- Source: GetID() hooks (prioritize over ItemInfo() because we frequently use patterns like: PushID(str), Button("") where they both have same id) + if info.QuerySuccess then return string.format((format_for_ui and info.DataType == 11 --[[ImGuiDataType.String]]) and "\"%s\"" or "%s", SkipUncontributingPrefix(info.Desc)) end -- Source: GetID() hooks (prioritize over ItemInfo() because we frequently use patterns like: PushID(str), Button("") where they both have same id) if query.Step < #query.Results then return "" end -- Only start using fallback below when all queries are done, so during queries we don't flickering ??? markers. return "???" end @@ -22638,11 +22644,12 @@ function ImGui.ShowMetricsWindow(p_open) if ImGui.IsMousePosValid() then ImGui.Text("Mouse pos: (%g, %g)", io.MousePos.x, io.MousePos.y) else ImGui.Text("Mouse pos: ") end ImGui.Text("Mouse delta: (%g, %g)", io.MouseDelta.x, io.MouseDelta.y) ImGui.Text("Mouse down:") - for i = 0, 2 do if ImGui.IsMouseDown(i) then ImGui.SameLine(); ImGui.Text("b%d (%.02f secs)", i, io.MouseDownDuration[i]) end end + local count = 5 --[[ImGuiMouseButton.COUNT]] -- IM_COUNTOF(io.MouseDown) + for i = 0, count - 1 do if ImGui.IsMouseDown(i) then ImGui.SameLine(); ImGui.Text("b%d (%.02f secs)", i, io.MouseDownDuration[i]) end end ImGui.Text("Mouse clicked:") - for i = 0, 2 do if ImGui.IsMouseClicked(i) then ImGui.SameLine(); ImGui.Text("b%d (%d)", i, io.MouseClickedCount[i]) end end + for i = 0, count - 1 do if ImGui.IsMouseClicked(i) then ImGui.SameLine(); ImGui.Text("b%d (%d)", i, io.MouseClickedCount[i]) end end ImGui.Text("Mouse released:") - for i = 0, 2 do if ImGui.IsMouseReleased(i) then ImGui.SameLine(); ImGui.Text("b%d", i) end end + for i = 0, count - 1 do if ImGui.IsMouseReleased(i) then ImGui.SameLine(); ImGui.Text("b%d", i) end end ImGui.Text("Mouse wheel: %.1f", io.MouseWheel) ImGui.Text("MouseStationaryTimer: %.2f", g.MouseStationaryTimer) ImGui.Text("Mouse source: %s", GetMouseSourceName(io.MouseSource)) @@ -24324,7 +24331,8 @@ S.DemoWindowWidgetsDataTypes = { u16_v = 65535, s32_v = -1, u32_v = 4294967295, -- (ImU32)-1 - -- [Port] s64_v / u64_v: 64-bit integer types are not supported (Lua numbers are doubles) + s64_v = -1, + u64_v = 18446744073709551615, -- (ImU64)-1 [Port] Lua numbers are doubles: 64-bit values are exact only within +-2^53 f32_v = 0.123, f64_v = 90000.01234567890123456789, drag_clamp = false, @@ -24355,14 +24363,15 @@ function DemoWindowWidgetsDataTypes() -- Setup limits (as helper variables so we can take their address, as explained above) -- Note: SliderScalar() functions have a maximum usable range of half the natural type maximum, hence the /2. - -- [Port] LLONG_MIN/LLONG_MAX/ULLONG_MAX fallback block dropped: no 64-bit integer types + local LLONG_MIN, LLONG_MAX, ULLONG_MAX = -9223372036854775808, 9223372036854775807, 18446744073709551615 -- [Port] doubles (LLONG_MAX/ULLONG_MAX round up) local s8_zero, s8_one, s8_fifty, s8_min, s8_max = 0, 1, 50, -128, 127 local u8_zero, u8_one, u8_fifty, u8_min, u8_max = 0, 1, 50, 0, 255 local s16_zero, s16_one, s16_fifty, s16_min, s16_max = 0, 1, 50, -32768, 32767 local u16_zero, u16_one, u16_fifty, u16_min, u16_max = 0, 1, 50, 0, 65535 local s32_zero, s32_one, s32_fifty, s32_min, s32_max, s32_hi_a, s32_hi_b = 0, 1, 50, -1073741824, 1073741823, 1073741823 - 100, 1073741823 -- INT_MIN/2, INT_MAX/2 local u32_zero, u32_one, u32_fifty, u32_min, u32_max, u32_hi_a, u32_hi_b = 0, 1, 50, 0, 2147483647, 2147483647 - 100, 2147483647 -- UINT_MAX/2 - -- [Port] s64_* / u64_* limits: ImGuiDataType.S64/U64 are not supported + local s64_zero, s64_one, s64_fifty, s64_min, s64_max, s64_hi_a, s64_hi_b = 0, 1, 50, LLONG_MIN / 2, LLONG_MAX / 2, LLONG_MAX / 2 - 100, LLONG_MAX / 2 + local u64_zero, u64_one, u64_fifty, u64_min, u64_max, u64_hi_a, u64_hi_b = 0, 1, 50, 0, ULLONG_MAX / 2, ULLONG_MAX / 2 - 100, ULLONG_MAX / 2 local f32_zero, f32_one, f32_lo_a, f32_hi_a = 0.0, 1.0, -10000000000.0, 10000000000.0 local f64_zero, f64_one, f64_lo_a, f64_hi_a = 0.0, 1.0, -1000000000000000.0, 1000000000000000.0 @@ -24384,12 +24393,12 @@ function DemoWindowWidgetsDataTypes() s.s32_v = ImGui.DragScalar("drag s32", 4 --[[ImGuiDataType.S32]], s.s32_v, drag_speed, drag_clamp and s32_zero or nil, drag_clamp and s32_fifty or nil) s.s32_v = ImGui.DragScalar("drag s32 hex", 4 --[[ImGuiDataType.S32]], s.s32_v, drag_speed, drag_clamp and s32_zero or nil, drag_clamp and s32_fifty or nil, "0x%08X") s.u32_v = ImGui.DragScalar("drag u32", 5 --[[ImGuiDataType.U32]], s.u32_v, drag_speed, drag_clamp and u32_zero or nil, drag_clamp and u32_fifty or nil, "%u ms") - -- [Port] ImGui.DragScalar("drag s64", ImGuiDataType.S64, s64_v, ...) -- 64-bit types not supported - -- [Port] ImGui.DragScalar("drag u64", ImGuiDataType.U64, u64_v, ...) -- 64-bit types not supported - s.f32_v = ImGui.DragScalar("drag float", 6 --[[ImGuiDataType.Float]], s.f32_v, 0.005, f32_zero, f32_one, "%f") - s.f32_v = ImGui.DragScalar("drag float log", 6 --[[ImGuiDataType.Float]], s.f32_v, 0.005, f32_zero, f32_one, "%f", 32 --[[ImGuiSliderFlags.Logarithmic]]) - s.f64_v = ImGui.DragScalar("drag double", 7 --[[ImGuiDataType.Double]], s.f64_v, 0.0005, f64_zero, nil, "%.10f grams") - s.f64_v = ImGui.DragScalar("drag double log",7 --[[ImGuiDataType.Double]], s.f64_v, 0.0005, f64_zero, f64_one, "0 < %.10f < 1", 32 --[[ImGuiSliderFlags.Logarithmic]]) + s.s64_v = ImGui.DragScalar("drag s64", 6 --[[ImGuiDataType.S64]], s.s64_v, drag_speed, drag_clamp and s64_zero or nil, drag_clamp and s64_fifty or nil) + s.u64_v = ImGui.DragScalar("drag u64", 7 --[[ImGuiDataType.U64]], s.u64_v, drag_speed, drag_clamp and u64_zero or nil, drag_clamp and u64_fifty or nil) + s.f32_v = ImGui.DragScalar("drag float", 8 --[[ImGuiDataType.Float]], s.f32_v, 0.005, f32_zero, f32_one, "%f") + s.f32_v = ImGui.DragScalar("drag float log", 8 --[[ImGuiDataType.Float]], s.f32_v, 0.005, f32_zero, f32_one, "%f", 32 --[[ImGuiSliderFlags.Logarithmic]]) + s.f64_v = ImGui.DragScalar("drag double", 9 --[[ImGuiDataType.Double]], s.f64_v, 0.0005, f64_zero, nil, "%.10f grams") + s.f64_v = ImGui.DragScalar("drag double log",9 --[[ImGuiDataType.Double]], s.f64_v, 0.0005, f64_zero, f64_one, "0 < %.10f < 1", 32 --[[ImGuiSliderFlags.Logarithmic]]) IMGUI_DEMO_MARKER("Widgets/Data Types/Sliders") ImGui.SeparatorText("Sliders") @@ -24404,21 +24413,26 @@ function DemoWindowWidgetsDataTypes() s.u32_v = ImGui.SliderScalar("slider u32 low", 5 --[[ImGuiDataType.U32]], s.u32_v, u32_zero, u32_fifty,"%u") s.u32_v = ImGui.SliderScalar("slider u32 high", 5 --[[ImGuiDataType.U32]], s.u32_v, u32_hi_a, u32_hi_b, "%u") s.u32_v = ImGui.SliderScalar("slider u32 full", 5 --[[ImGuiDataType.U32]], s.u32_v, u32_min, u32_max, "%u") - -- [Port] "slider s64 low" / "slider s64 high" / "slider s64 full" (ImGuiDataType.S64): 64-bit types not supported - -- [Port] "slider u64 low" / "slider u64 high" / "slider u64 full" (ImGuiDataType.U64): 64-bit types not supported - s.f32_v = ImGui.SliderScalar("slider float low", 6 --[[ImGuiDataType.Float]], s.f32_v, f32_zero, f32_one) - s.f32_v = ImGui.SliderScalar("slider float low log", 6 --[[ImGuiDataType.Float]], s.f32_v, f32_zero, f32_one, "%.10f", 32 --[[ImGuiSliderFlags.Logarithmic]]) - s.f32_v = ImGui.SliderScalar("slider float high", 6 --[[ImGuiDataType.Float]], s.f32_v, f32_lo_a, f32_hi_a, "%e") - s.f64_v = ImGui.SliderScalar("slider double low", 7 --[[ImGuiDataType.Double]], s.f64_v, f64_zero, f64_one, "%.10f grams") - s.f64_v = ImGui.SliderScalar("slider double low log",7 --[[ImGuiDataType.Double]], s.f64_v, f64_zero, f64_one, "%.10f", 32 --[[ImGuiSliderFlags.Logarithmic]]) - s.f64_v = ImGui.SliderScalar("slider double high", 7 --[[ImGuiDataType.Double]], s.f64_v, f64_lo_a, f64_hi_a, "%e grams") + s.s64_v = ImGui.SliderScalar("slider s64 low", 6 --[[ImGuiDataType.S64]], s.s64_v, s64_zero, s64_fifty,"%lld") -- "%" PRId64 + s.s64_v = ImGui.SliderScalar("slider s64 high", 6 --[[ImGuiDataType.S64]], s.s64_v, s64_hi_a, s64_hi_b, "%lld") + s.s64_v = ImGui.SliderScalar("slider s64 full", 6 --[[ImGuiDataType.S64]], s.s64_v, s64_min, s64_max, "%lld") + s.u64_v = ImGui.SliderScalar("slider u64 low", 7 --[[ImGuiDataType.U64]], s.u64_v, u64_zero, u64_fifty,"%llu ms") -- "%" PRIu64 " ms" + s.u64_v = ImGui.SliderScalar("slider u64 high", 7 --[[ImGuiDataType.U64]], s.u64_v, u64_hi_a, u64_hi_b, "%llu ms") + s.u64_v = ImGui.SliderScalar("slider u64 full", 7 --[[ImGuiDataType.U64]], s.u64_v, u64_min, u64_max, "%llu ms") + s.f32_v = ImGui.SliderScalar("slider float low", 8 --[[ImGuiDataType.Float]], s.f32_v, f32_zero, f32_one) + s.f32_v = ImGui.SliderScalar("slider float low log", 8 --[[ImGuiDataType.Float]], s.f32_v, f32_zero, f32_one, "%.10f", 32 --[[ImGuiSliderFlags.Logarithmic]]) + s.f32_v = ImGui.SliderScalar("slider float high", 8 --[[ImGuiDataType.Float]], s.f32_v, f32_lo_a, f32_hi_a, "%e") + s.f64_v = ImGui.SliderScalar("slider double low", 9 --[[ImGuiDataType.Double]], s.f64_v, f64_zero, f64_one, "%.10f grams") + s.f64_v = ImGui.SliderScalar("slider double low log",9 --[[ImGuiDataType.Double]], s.f64_v, f64_zero, f64_one, "%.10f", 32 --[[ImGuiSliderFlags.Logarithmic]]) + s.f64_v = ImGui.SliderScalar("slider double high", 9 --[[ImGuiDataType.Double]], s.f64_v, f64_lo_a, f64_hi_a, "%e grams") ImGui.SeparatorText("Sliders (reverse)") s.s8_v = ImGui.SliderScalar("slider s8 reverse", 0 --[[ImGuiDataType.S8]], s.s8_v, s8_max, s8_min, "%d") s.u8_v = ImGui.SliderScalar("slider u8 reverse", 1 --[[ImGuiDataType.U8]], s.u8_v, u8_max, u8_min, "%u") s.s32_v = ImGui.SliderScalar("slider s32 reverse", 4 --[[ImGuiDataType.S32]], s.s32_v, s32_fifty, s32_zero, "%d") s.u32_v = ImGui.SliderScalar("slider u32 reverse", 5 --[[ImGuiDataType.U32]], s.u32_v, u32_fifty, u32_zero, "%u") - -- [Port] "slider s64 reverse" / "slider u64 reverse": 64-bit types not supported + s.s64_v = ImGui.SliderScalar("slider s64 reverse", 6 --[[ImGuiDataType.S64]], s.s64_v, s64_fifty, s64_zero, "%lld") + s.u64_v = ImGui.SliderScalar("slider u64 reverse", 7 --[[ImGuiDataType.U64]], s.u64_v, u64_fifty, u64_zero, "%llu ms") IMGUI_DEMO_MARKER("Widgets/Data Types/Inputs") ImGui.SeparatorText("Inputs") @@ -24435,10 +24449,10 @@ function DemoWindowWidgetsDataTypes() s.s32_v = ImGui.InputScalar("input s32 hex", 4 --[[ImGuiDataType.S32]], s.s32_v, inputs_step and s32_one or nil, nil, "%04X", flags) s.u32_v = ImGui.InputScalar("input u32", 5 --[[ImGuiDataType.U32]], s.u32_v, inputs_step and u32_one or nil, nil, "%u", flags) s.u32_v = ImGui.InputScalar("input u32 hex", 5 --[[ImGuiDataType.U32]], s.u32_v, inputs_step and u32_one or nil, nil, "%08X", flags) - -- [Port] ImGui.InputScalar("input s64", ImGuiDataType.S64, ...) -- 64-bit types not supported - -- [Port] ImGui.InputScalar("input u64", ImGuiDataType.U64, ...) -- 64-bit types not supported - s.f32_v = ImGui.InputScalar("input float", 6 --[[ImGuiDataType.Float]], s.f32_v, inputs_step and f32_one or nil, nil, nil, flags) - s.f64_v = ImGui.InputScalar("input double", 7 --[[ImGuiDataType.Double]], s.f64_v, inputs_step and f64_one or nil, nil, nil, flags) + s.s64_v = ImGui.InputScalar("input s64", 6 --[[ImGuiDataType.S64]], s.s64_v, inputs_step and s64_one or nil, nil, nil, flags) + s.u64_v = ImGui.InputScalar("input u64", 7 --[[ImGuiDataType.U64]], s.u64_v, inputs_step and u64_one or nil, nil, nil, flags) + s.f32_v = ImGui.InputScalar("input float", 8 --[[ImGuiDataType.Float]], s.f32_v, inputs_step and f32_one or nil, nil, nil, flags) + s.f64_v = ImGui.InputScalar("input double", 9 --[[ImGuiDataType.Double]], s.f64_v, inputs_step and f64_one or nil, nil, nil, flags) ImGui.TreePop() end @@ -30992,10 +31006,10 @@ function DemoWindowInputs() end ImGui.Text("Mouse delta: (%g, %g)", io.MouseDelta.x, io.MouseDelta.y) ImGui.Text("Mouse down:") - for i = 0, 2 do if ImGui.IsMouseDown(i) then ImGui.SameLine(); ImGui.Text("b%d (%.02f secs)", i, io.MouseDownDuration[i]) end end -- IM_COUNTOF(io.MouseDown) == 3, 0-based + for i = 0, 5 --[[ImGuiMouseButton.COUNT]] - 1 do if ImGui.IsMouseDown(i) then ImGui.SameLine(); ImGui.Text("b%d (%.02f secs)", i, io.MouseDownDuration[i]) end end -- IM_COUNTOF(io.MouseDown), 0-based ImGui.Text("Mouse wheel: %.1f", io.MouseWheel) ImGui.Text("Mouse clicked count:") - for i = 0, 2 do if io.MouseClickedCount[i] > 0 then ImGui.SameLine(); ImGui.Text("b%d: %d", i, io.MouseClickedCount[i]) end end + for i = 0, 5 --[[ImGuiMouseButton.COUNT]] - 1 do if io.MouseClickedCount[i] > 0 then ImGui.SameLine(); ImGui.Text("b%d: %d", i, io.MouseClickedCount[i]) end end -- We iterate both legacy native range and named ImGuiKey ranges. This is a little unusual/odd but this allows -- displaying the data for old/new backends. @@ -32681,7 +32695,7 @@ function ExampleAppPropertyEditorMT:Draw(root_node) ImGui.TextUnformatted(field_desc.Name) ImGui.TableNextColumn() local field_ptr = field_desc.Offset -- [Port] Offset is the field name inside ExampleTreeNode - if field_desc.DataType == 8 --[[ImGuiDataType.Bool]] then + if field_desc.DataType == 10 --[[ImGuiDataType.Bool]] then assert(field_desc.DataCount == 1) _, node[field_ptr] = ImGui.Checkbox("##Editor", node[field_ptr]) elseif field_desc.DataType == 4 --[[ImGuiDataType.S32]] then @@ -32692,11 +32706,11 @@ function ExampleAppPropertyEditorMT:Draw(root_node) else ImGui.DragScalarN("##Editor", field_desc.DataType, node[field_ptr], field_desc.DataCount, 1.0, v_min, v_max) end - elseif field_desc.DataType == 6 --[[ImGuiDataType.Float]] then + elseif field_desc.DataType == 8 --[[ImGuiDataType.Float]] then local v_min, v_max = 0.0, 1.0 ImGui.SetNextItemWidth(-1.1754943508223e-38 --[[FLT_MIN]]) ImGui.SliderScalarN("##Editor", field_desc.DataType, node[field_ptr], field_desc.DataCount, v_min, v_max) - elseif field_desc.DataType == 9 --[[ImGuiDataType.String]] then + elseif field_desc.DataType == 11 --[[ImGuiDataType.String]] then local buf = self.StringBufs[node] -- [Port] edit the Lua string through a 28-byte buffer if buf == nil then buf = ImGui.NewTextBuffer(node[field_ptr], 28); self.StringBufs[node] = buf end if ImGui.InputText("##Editor", buf, 28) then node[field_ptr] = ImGui.TextBufferToString(buf) end @@ -38799,6 +38813,16 @@ function ImGui.AddDrawListToDrawDataEx(draw_data, out_list, draw_list) assert(draw_list._VtxCurrentIdx == draw_list.VtxBuffer.Size + 1) end + -- Resolve callback data pointers + local cb_buf = draw_list._CallbacksDataBuf + if cb_buf.Size > 0 then + for _, cmd in draw_list.CmdBuffer:iter() do + if cmd.UserCallback ~= nil and cmd.UserCallbackDataOffset ~= -1 and cmd.UserCallbackDataSize > 0 then + cmd.UserCallbackData = cb_buf.Data[cmd.UserCallbackDataOffset + 1] + end + end + end + -- Add to output list + records state in ImDrawData out_list:push_back(draw_list) draw_data.TotalVtxCount = draw_data.TotalVtxCount + draw_list.VtxBuffer.Size @@ -38905,7 +38929,6 @@ end -- Initialize before use in a new frame. We always have a command ready in the buffer. -- In the majority of cases, you would want to call PushClipRect() and PushTexture() after this. --- TODO: function MT.ImDrawList:_ResetForNewFrame() self._ContentClipX0 = nil -- set again by Begin() (Roblox backend scroll reuse) if self._Splitter._Count > 1 then @@ -38927,6 +38950,7 @@ function MT.ImDrawList:_ResetForNewFrame() self._IdxWritePtr = 1 self._ClipRectStack:resize(0) self._TextureStack:resize(0) + self._CallbacksDataBuf:resize(0) self._DrawFlagsStack.Size = 0 -- _DrawFlagsStack.clear() (ImSmallStack_) self._Path:resize(0) @@ -38947,7 +38971,7 @@ function MT.ImDrawList:_ClearFreeMemory() self._ClipRectStack:clear() self._TextureStack:clear() - -- self._CallbacksDataBuf:clear() + self._CallbacksDataBuf:clear() self._DrawFlagsStack.Size = 0 -- _DrawFlagsStack.clear() (ImSmallStack_) self._Path:clear() self._Splitter:ClearFreeMemory() @@ -39020,15 +39044,27 @@ function MT.ImDrawList:AddCallback(callback, userdata, userdata_size) curr_cmd = self.CmdBuffer.Data[self.CmdBuffer.Size] end curr_cmd.UserCallback = callback - -- TODO: _CallbacksDataBuf? if userdata_size == 0 then -- Store user data directly in command (no indirection) curr_cmd.UserCallbackData = userdata - + curr_cmd.UserCallbackDataSize = 0 + curr_cmd.UserCallbackDataOffset = -1 else + -- Copy and store user data in a buffer + -- [Lua] No raw bytes: the "copy" is a shallow copy of a table userdata (other values are immutable and stored as is), + -- so later changes to the caller's table don't affect this command. userdata_size is only recorded. assert(userdata ~= nil) - assert(userdata_size < bit32.lshift(1, 31)) - + assert(userdata_size < 2147483648) -- (1u << 31) + curr_cmd.UserCallbackData = nil -- Will be resolved during Render() + curr_cmd.UserCallbackDataSize = userdata_size + curr_cmd.UserCallbackDataOffset = self._CallbacksDataBuf.Size -- 0-based + local copy = userdata + if type(userdata) == "table" then + copy = {} + for k, v in pairs(userdata) do copy[k] = v end + setmetatable(copy, getmetatable(userdata)) + end + self._CallbacksDataBuf:push_back(copy) -- memcpy() end self:AddDrawCmd() -- Force a new command after us (see comment below) @@ -43035,6 +43071,14 @@ function ImU32(val) return bitAnd(val, 0xFFFFFFFF) end --- @return ImS32 function ImS32(val) return bitAnd(val, 0xFFFFFFFF) end +-- [Luau] 64-bit integers are stored in doubles (exact only within +-2^53): the cast just truncates toward zero like a C double->int64 cast. +--- @param val number +--- @return ImS64 +function ImS64(val) if val >= 0 then return math.floor(val) end return -math.floor(-val) end +--- @param val number +--- @return ImU64 +function ImU64(val) if val >= 0 then return math.floor(val) end return -math.floor(-val) end + --- @alias float number --- @class double : number @@ -43115,15 +43159,17 @@ ImGuiDataType = U16 = 3, -- unsigned short S32 = 4, -- int U32 = 5, -- unsigned int - Float = 6, -- float - Double = 7, -- double - Bool = 8, -- bool (provided for user convenience, not supported by scalar widgets) - String = 9, -- string (provided for user convenience, not supported by scalar widgets) - COUNT = 10 + S64 = 6, -- long long / __int64 -- [Luau] stored in a double: exact only within +-2^53 + U64 = 7, -- unsigned long long / unsigned __int64 -- [Luau] stored in a double: exact only within 0..2^53 + Float = 8, -- float + Double = 9, -- double + Bool = 10, -- bool (provided for user convenience, not supported by scalar widgets) + String = 11, -- string (provided for user convenience, not supported by scalar widgets) + COUNT = 12 } -- Extend ImGuiDataType_ -ImGuiDataType.Pointer = 11 -- [internal] -ImGuiDataType.ID = 12 -- [internal] +ImGuiDataType.Pointer = ImGuiDataType.COUNT -- [internal] +ImGuiDataType.ID = ImGuiDataType.COUNT + 1 -- [internal] ImTextureID_Invalid = -1 @@ -43633,7 +43679,7 @@ function ImDrawList(data) _Splitter = ImDrawListSplitter(), -- [Internal] for channels api (note: prefer using your own persistent instance of ImDrawListSplitter!) _ClipRectStack = ImVector(), -- [Internal] _TextureStack = ImVector(), -- [Internal] - _CallbacksDataBuf = nil, -- [Internal] + _CallbacksDataBuf = ImVector(), -- [Internal] [Lua] copies of AddCallback() userdata (userdata_size > 0) _DrawFlagsStack = ImVector(), -- [Internal] ImSmallStack_: capacity checked by PushDrawFlag() _FringeScale = 1.0, -- [Internal] anti-alias fringe is scaled by this value, this helps to keep things sharp while zooming at vertex buffer content -- [Luau] 1.0 instead of memset 0 so a list used before _SetPixelDensity() still works _InvFringeScale = 1.0, -- [internal] 1.0 / _FringeScale // FIXME: Consider renaming to _PixelDensity. @@ -44218,7 +44264,7 @@ function ImGuiIO() MouseDelta = ImVec2(), -- Mouse delta. Note that this is zero if either current or previous position are invalid (-FLT_MAX,-FLT_MAX), so a disappearing/reappearing mouse won't have a huge delta. - MouseDown = {[0] = false, [1] = false, [2] = false}, -- Mouse buttons: 0=left, 1=right, 2=middle + extras (ImGuiMouseButton.COUNT == 5). Dear ImGui mostly uses left and right buttons. Other buttons allow us to track if the mouse is being used by your application + available to user as a convenience via IsMouse** API. + MouseDown = {[0] = false, [1] = false, [2] = false, [3] = false, [4] = false}, -- Mouse buttons: 0=left, 1=right, 2=middle + extras (ImGuiMouseButton.COUNT == 5). Dear ImGui mostly uses left and right buttons. Other buttons allow us to track if the mouse is being used by your application + available to user as a convenience via IsMouse** API. MouseWheel = 0, -- Mouse wheel Vertical: 1 unit scrolls about 5 lines text. >0 scrolls Up, <0 scrolls Down. Hold Shift to turn vertical scroll into horizontal scroll. MouseWheelH = 0, -- Mouse wheel Horizontal. >0 scrolls Left, <0 scrolls Right. Most users don't have a mouse with a horizontal wheel, may not be filled by all backends. @@ -44320,23 +44366,23 @@ function ImGuiIO() -- (you can visualize and interact with all options in 'Demo->Configuration') MouseDrawCursor = false, -- = false -- Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor). Cannot be easily renamed to 'io.ConfigXXX' because this is frequently used by backend implementations. - MouseClicked = {[0] = false, [1] = false, [2] = false}, -- Mouse button went from !Down to Down (same as MouseClickedCount[x] != 0) - MouseReleased = {[0] = false, [1] = false, [2] = false}, -- Mouse button went from Down to !Down - MouseClickedCount = {[0] = 0, [1] = 0, [2] = 0}, -- == 0 (not clicked), == 1 (same as MouseClicked[]), == 2 (double-clicked), == 3 (triple-clicked) etc. when going from !Down to Down - MouseClickedLastCount = {[0] = 0, [1] = 0, [2] = 0}, -- Count successive number of clicks. Stays valid after mouse release. Reset after another click is done. - MouseDownDuration = {[0] = -1, [1] = -1, [2] = -1}, -- Duration the mouse button has been down (0.0f == just clicked) - MouseDownDurationPrev = {[0] = -1, [1] = -1, [2] = -1}, -- Previous time the mouse button has been down + MouseClicked = {[0] = false, [1] = false, [2] = false, [3] = false, [4] = false}, -- Mouse button went from !Down to Down (same as MouseClickedCount[x] != 0) + MouseReleased = {[0] = false, [1] = false, [2] = false, [3] = false, [4] = false}, -- Mouse button went from Down to !Down + MouseClickedCount = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0}, -- == 0 (not clicked), == 1 (same as MouseClicked[]), == 2 (double-clicked), == 3 (triple-clicked) etc. when going from !Down to Down + MouseClickedLastCount = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0}, -- Count successive number of clicks. Stays valid after mouse release. Reset after another click is done. + MouseDownDuration = {[0] = -1, [1] = -1, [2] = -1, [3] = -1, [4] = -1}, -- Duration the mouse button has been down (0.0f == just clicked) + MouseDownDurationPrev = {[0] = -1, [1] = -1, [2] = -1, [3] = -1, [4] = -1}, -- Previous time the mouse button has been down - MouseDragMaxDistanceAbs = {[0] = ImVec2(), [1] = ImVec2(), [2] = ImVec2()}, -- Maximum distance, absolute, on each axis, of how much mouse has traveled from the clicking point - MouseDragMaxDistanceSqr = {[0] = 0, [1] = 0, [2] = 0}, -- Squared maximum distance of how much mouse has traveled from the clicking point (used for moving thresholds) + MouseDragMaxDistanceAbs = {[0] = ImVec2(), [1] = ImVec2(), [2] = ImVec2(), [3] = ImVec2(), [4] = ImVec2()}, -- Maximum distance, absolute, on each axis, of how much mouse has traveled from the clicking point + MouseDragMaxDistanceSqr = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0}, -- Squared maximum distance of how much mouse has traveled from the clicking point (used for moving thresholds) - MouseDownOwned = {[0] = nil, [1] = nil, [2] = nil}, -- Track if button was clicked inside a dear imgui window or over void blocked by a popup. We don't request mouse capture from the application if click started outside ImGui bounds. - MouseDownOwnedUnlessPopupClose = {[0] = nil, [1] = nil, [2] = nil}, -- Track if button was clicked inside a dear imgui window. - MouseClickedTime = {[0] = 0, [1] = 0, [2] = 0}, -- Time of last click (used to figure out double-click) - MouseReleasedTime = {[0] = 0, [1] = 0, [2] = 0}, -- Time of last released (rarely used! but useful to handle delayed single-click when trying to disambiguate them from double-click). - MouseClickedPos = {[0] = ImVec2(), [1] = ImVec2(), [2] = ImVec2()}, -- Position at time of clicking + MouseDownOwned = {[0] = nil, [1] = nil, [2] = nil, [3] = nil, [4] = nil}, -- Track if button was clicked inside a dear imgui window or over void blocked by a popup. We don't request mouse capture from the application if click started outside ImGui bounds. + MouseDownOwnedUnlessPopupClose = {[0] = nil, [1] = nil, [2] = nil, [3] = nil, [4] = nil}, -- Track if button was clicked inside a dear imgui window. + MouseClickedTime = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0}, -- Time of last click (used to figure out double-click) + MouseReleasedTime = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0}, -- Time of last released (rarely used! but useful to handle delayed single-click when trying to disambiguate them from double-click). + MouseClickedPos = {[0] = ImVec2(), [1] = ImVec2(), [2] = ImVec2(), [3] = ImVec2(), [4] = ImVec2()}, -- Position at time of clicking - MouseDoubleClicked = {[0] = false, [1] = false, [2] = false}, -- Has mouse button been double-clicked? (same as MouseClickedCount[x] == 2) + MouseDoubleClicked = {[0] = false, [1] = false, [2] = false, [3] = false, [4] = false}, -- Has mouse button been double-clicked? (same as MouseClickedCount[x] == 2) -- Inputs Behaviors -- (other variables, ones which are expected to be tweaked within UI code, are exposed in ImGuiStyle) @@ -45737,6 +45783,17 @@ ImGuiTableBgTarget = { None = 0, RowBg0 = 1, RowBg1 = 2, CellBg = 3 } --- @enum ImGuiSortDirection ImGuiSortDirection = { None = 0, Ascending = 1, Descending = 2 } +-- Resizing callback data to apply custom constraint. As enabled by SetNextWindowSizeConstraints(). Callback is called during the next Begin(). +-- NB: For basic min/max size constraint on each axis you don't need to use the callback! The SetNextWindowSizeConstraints() parameters are enough. +--- @class ImGuiSizeCallbackData +--- @field UserData any Read-only. What user passed to SetNextWindowSizeConstraints(). Generally store an integer or float in here. +--- @field Pos ImVec2 Read-only. Window position, for reference. +--- @field CurrentSize ImVec2 Read-only. Current window size. +--- @field DesiredSize ImVec2 Read-write. Desired size, based on user's mouse position. Write to this field to restrain resizing. +--- @return ImGuiSizeCallbackData +function ImGuiSizeCallbackData() + return { UserData = nil, Pos = ImVec2(), CurrentSize = ImVec2(), DesiredSize = ImVec2() } +end -- Data payload for Drag and Drop operations: AcceptDragDropPayload(), GetDragDropPayload() @@ -55598,6 +55655,11 @@ local IM_S32_MIN = INT_MIN -- (-2147483647 - 1), (0x80000000); local IM_S32_MAX = INT_MAX -- (2147483647), (0x7FFFFFFF) local IM_U32_MIN = 0 local IM_U32_MAX = UINT_MAX -- (0xFFFFFFFF) +-- [Luau] 64-bit limits as doubles: IM_S64_MAX/IM_U64_MAX round up to 2^63/2^64 (values are exact only within +-2^53) +local IM_S64_MIN = -9223372036854775808 -- (-9223372036854775807ll - 1ll) +local IM_S64_MAX = 9223372036854775807 -- (9223372036854775807ll) +local IM_U64_MIN = 0 +local IM_U64_MAX = 18446744073709551615 -- (0xFFFFFFFFFFFFFFFFull) ------------------------------------------------------------------------------- -- [SECTION] Widgets: Text, etc. @@ -56330,8 +56392,9 @@ function ImGui.ButtonEx(label, size_arg, flags) ImGui.RenderNavCursor(bb, id) ImGui.RenderFrame(bb.Min, bb.Max, col, true, style.FrameRounding) - -- if (g.LogEnabled) - -- LogSetNextTextDecoration("[", "]"); + if g.LogEnabled then + ImGui.LogSetNextTextDecoration("[", "]") + end local text_min, text_max = ButtonEx_text_min, ButtonEx_text_max -- [Luau] scratch: RenderTextClipped() only reads them text_min.x = bb.Min.x + frame_padding.x; text_min.y = bb.Min.y + frame_padding.y text_max.x = bb.Max.x - frame_padding.x; text_max.y = bb.Max.y - frame_padding.y @@ -56913,7 +56976,7 @@ function ImGui.Checkbox(label, v) end if g.LogEnabled then - -- ImGui.LogRenderedText(label_pos, mixed_value and "[~]" or (v and "[x]" or "[ ]")) + ImGui.LogRenderedText(ImVec2(check_bb.Max.x + style.ItemInnerSpacing.x, check_bb.Min.y + style.FramePadding.y), mixed_value and "[~]" or (v and "[x]" or "[ ]")) -- label_pos end if is_visible and label_size.x > 0.0 then @@ -57010,7 +57073,7 @@ function ImGui.RadioButtonEx(label, active) end local label_pos = ImVec2(check_bb.Max.x + style.ItemInnerSpacing.x, check_bb.Min.y + style.FramePadding.y) if g.LogEnabled then - -- ImGui.LogRenderedText(label_pos, active and "(x)" or "( )") + ImGui.LogRenderedText(label_pos, active and "(x)" or "( )") end if label_size.x > 0.0 then ImGui.RenderText(label_pos, label, 1, label_end, false) @@ -57332,7 +57395,7 @@ function ImGui.SeparatorEx(flags, thickness) -- Draw window.DrawList:AddRectFilled(bb.Min, bb.Max, ImGui.GetColorU32(28 --[[ImGuiCol.Separator]])) if g.LogEnabled then - ImGui.LogRenderedText(bb.Min, "--------------------------------") + ImGui.LogRenderedText(bb.Min, "--------------------------------\n") end end @@ -57891,6 +57954,8 @@ local GDataTypeInfo = { ImGuiDataTypeInfo(2, "U16", "%u", "%u"), ImGuiDataTypeInfo(4, "S32", "%d", "%d"), -- ImGuiDataType.S32 ImGuiDataTypeInfo(4, "U32", "%u", "%u"), + ImGuiDataTypeInfo(8, "S64", "%lld", "%lld"), -- ImGuiDataType.S64 + ImGuiDataTypeInfo(8, "U64", "%llu", "%llu"), ImGuiDataTypeInfo(4, "float", "%.3f", "%f"), -- ImGuiDataType.Float ImGuiDataTypeInfo(8, "double", "%f", "%lf"), -- ImGuiDataType.Double ImGuiDataTypeInfo(1, "bool", "%d", "%d"), -- ImGuiDataType.Bool @@ -57899,37 +57964,68 @@ local GDataTypeInfo = { --- @param data_type ImGuiDataType function ImGui.DataTypeGetInfo(data_type) - assert(data_type >= 0 and data_type < 10 --[[ImGuiDataType.COUNT]]) + assert(data_type >= 0 and data_type < 12 --[[ImGuiDataType.COUNT]]) return GDataTypeInfo[data_type + 1] end +-- [Luau] string.format() has no length modifiers (%lld, %I64d...) and formats negative numbers as 64-bit for %u/%x/%X/%o: +-- strip modifiers and re-apply C's integer promotion/two's complement for signed types. +local DataTypeFormatStringCached do +local fmt_info_memo = {} -- format -> { stripped format, is unsigned conversion } +local function GetFormatInfo(format) + local info = fmt_info_memo[format] + if info == nil then + local stripped = string.gsub(string.gsub(format, "(%%[-+ #0']*%d*%.?%d*)[hlLqjzt]+", "%1"), "(%%[-+ #0']*%d*%.?%d*)I64", "%1") + local conv = string.match(stripped, "%%[-+ #0']*%d*%.?%d*([diouxXc])") + info = { stripped, conv == "u" or conv == "x" or conv == "X" or conv == "o" } + fmt_info_memo[format] = info + end + return info +end + +--- Lua-string version of DataTypeFormatString() (memoized), used for display. +--- @param data_type ImGuiDataType +--- @param data number +--- @param format string +--- @return string +function DataTypeFormatStringCached(data_type, data, format) + if data_type == 8 --[[ImGuiDataType.Float]] or data_type == 9 --[[ImGuiDataType.Double]] then + return FormatCached(format, data) + end + local info = GetFormatInfo(format) + if data_type == 0 --[[ImGuiDataType.S8]] then data = (ImS8)(data) + elseif data_type == 1 --[[ImGuiDataType.U8]] then data = (ImU8)(data) + elseif data_type == 2 --[[ImGuiDataType.S16]] then data = (ImS16)(data) + elseif data_type == 3 --[[ImGuiDataType.U16]] then data = (ImU16)(data) + elseif data_type == 4 --[[ImGuiDataType.S32]] then -- (signed values are already stored signed) + elseif data_type == 5 --[[ImGuiDataType.U32]] then data = (ImU32)(data) + elseif data_type == 6 --[[ImGuiDataType.S64]] or data_type == 7 --[[ImGuiDataType.U64]] then + -- (string.format() already prints negative numbers as 64-bit two's complement for %u/%x/%X/%o) + if info[2] then + if data >= 18446744073709551616 then data = -1 end -- (ImU64)-1 rounds to 2^64 in a double: print ULLONG_MAX + elseif data >= 9223372036854775808 then + data = 9223372036854774784 -- largest double below 2^63 (LLONG_MAX isn't representable) + end + return FormatCached(info[1], data) + else + assert(false) + end + if data < 0 and info[2] then data = data + 4294967296 end -- Signedness doesn't matter when pushing integer arguments + return FormatCached(info[1], data) +end +end + --- @param buf char[] --- @param buf_size int --- @param data_type ImGuiDataType --- @param data number --- @param format string +--- @return int function ImGui.DataTypeFormatString(buf, buf_size, data_type, data, format) - local str - if data_type == 4 --[[ImGuiDataType.S32]] then - str = ImFormatString(format, (ImS32)(data)) - elseif data_type == 5 --[[ImGuiDataType.U32]] then - str = ImFormatString(format, (ImU32)(data)) - elseif data_type == 6 --[[ImGuiDataType.Float]] then - str = ImFormatString(format, data) - elseif data_type == 7 --[[ImGuiDataType.Double]] then - str = ImFormatString(format, data) - elseif data_type == 0 --[[ImGuiDataType.S8]] then - str = ImFormatString(format, (ImS8)(data)) - elseif data_type == 1 --[[ImGuiDataType.U8]] then - str = ImFormatString(format, (ImU8)(data)) - elseif data_type == 2 --[[ImGuiDataType.S16]] then - str = ImFormatString(format, (ImS16)(data)) - elseif data_type == 3 --[[ImGuiDataType.U16]] then - str = ImFormatString(format, (ImU16)(data)) - else - assert(false) - end - ImStd.ImStrncpy(buf, 1, { string.byte(str, 1, #str) }, 1, ImMin(#str + 1, buf_size)) -- TODO: update this when new ImFormatString is implemented + local str = DataTypeFormatStringCached(data_type, data, format) + local len = ImMin(#str, buf_size - 1) -- ImFormatString(): truncate and return the written length + ImStd.ImStrncpy(buf, 1, { string.byte(str, 1, len) }, 1, len + 1) + return len end --- @param data_type ImGuiDataType @@ -57975,13 +58071,25 @@ function ImGui.DataTypeApplyOp(data_type, op, arg1, arg2) elseif op == 45 then return ImSubClampOverflow(arg1, arg2, IM_U32_MIN, IM_U32_MAX) end - elseif data_type == 6 --[[ImGuiDataType.Float]] then + elseif data_type == 6 --[[ImGuiDataType.S64]] then + if op == 43 then + return ImAddClampOverflow(arg1, arg2, IM_S64_MIN, IM_S64_MAX) + elseif op == 45 then + return ImSubClampOverflow(arg1, arg2, IM_S64_MIN, IM_S64_MAX) + end + elseif data_type == 7 --[[ImGuiDataType.U64]] then + if op == 43 then + return ImAddClampOverflow(arg1, arg2, IM_U64_MIN, IM_U64_MAX) + elseif op == 45 then + return ImSubClampOverflow(arg1, arg2, IM_U64_MIN, IM_U64_MAX) + end + elseif data_type == 8 --[[ImGuiDataType.Float]] then if op == 43 then return arg1 + arg2 elseif op == 45 then return arg1 - arg2 end - elseif data_type == 7 --[[ImGuiDataType.Double]] then + elseif data_type == 9 --[[ImGuiDataType.Double]] then if op == 43 then return arg1 + arg2 elseif op == 45 then @@ -58021,7 +58129,7 @@ function ImGui.DataTypeApplyFromText(buf, data_type, data, format, data_when_emp -- Sanitize format -- - For float/double we have to ignore format with precision (e.g. "%.2f") because sscanf doesn't take them in, so force them into %f and %lf local format_sanitized, format_sanitized_size = {}, 32 - if (data_type == 6 --[[ImGuiDataType.Float]] or data_type == 7 --[[ImGuiDataType.Double]]) then + if (data_type == 8 --[[ImGuiDataType.Float]] or data_type == 9 --[[ImGuiDataType.Double]]) then format = type_info.ScanFmt else format = ImParseFormatSanitizeForScanning(format, format_sanitized, format_sanitized_size) @@ -58078,8 +58186,10 @@ function ImGui.DataTypeCompare(data_type, arg1, arg2) elseif data_type == 3 --[[ImGuiDataType.U16]] then return DataTypeCompareT((ImU16)(arg1), (ImU16)(arg2)) elseif data_type == 4 --[[ImGuiDataType.S32]] then return DataTypeCompareT((ImS32)(arg1), (ImS32)(arg2)) elseif data_type == 5 --[[ImGuiDataType.U32]] then return DataTypeCompareT((ImU32)(arg1), (ImU32)(arg2)) - elseif data_type == 6 --[[ImGuiDataType.Float]] then return DataTypeCompareT(arg1, arg2) - elseif data_type == 7 --[[ImGuiDataType.Double]] then return DataTypeCompareT(arg1, arg2) + elseif data_type == 6 --[[ImGuiDataType.S64]] then return DataTypeCompareT((ImS64)(arg1), (ImS64)(arg2)) + elseif data_type == 7 --[[ImGuiDataType.U64]] then return DataTypeCompareT((ImU64)(arg1), (ImU64)(arg2)) + elseif data_type == 8 --[[ImGuiDataType.Float]] then return DataTypeCompareT(arg1, arg2) + elseif data_type == 9 --[[ImGuiDataType.Double]] then return DataTypeCompareT(arg1, arg2) end assert(false) return 0 @@ -58108,8 +58218,10 @@ function ImGui.DataTypeClamp(data_type, data, min, max) elseif data_type == 3 --[[ImGuiDataType.U16]] then return DataTypeClampT((ImU16)(data), min and (ImU16)(min), max and (ImU16)(max)) elseif data_type == 4 --[[ImGuiDataType.S32]] then return DataTypeClampT((ImS32)(data), min and (ImS32)(min), max and (ImS32)(max)) elseif data_type == 5 --[[ImGuiDataType.U32]] then return DataTypeClampT((ImU32)(data), min and (ImU32)(min), max and (ImU32)(max)) - elseif data_type == 6 --[[ImGuiDataType.Float]] then return DataTypeClampT(data, min, max) - elseif data_type == 7 --[[ImGuiDataType.Double]] then return DataTypeClampT(data, min, max) + elseif data_type == 6 --[[ImGuiDataType.S64]] then return DataTypeClampT((ImS64)(data), min and (ImS64)(min), max and (ImS64)(max)) + elseif data_type == 7 --[[ImGuiDataType.U64]] then return DataTypeClampT((ImU64)(data), min and (ImU64)(min), max and (ImU64)(max)) + elseif data_type == 8 --[[ImGuiDataType.Float]] then return DataTypeClampT(data, min, max) + elseif data_type == 9 --[[ImGuiDataType.Double]] then return DataTypeClampT(data, min, max) end assert(false) return data, false @@ -58148,7 +58260,7 @@ local ImParseFormatFindStart --- @param v number function ImGui.RoundScalarWithFormatT(format, data_type, v) -- IM_UNUSED(data_type) - assert(data_type == 6 --[[ImGuiDataType.Float]] or data_type == 7 --[[ImGuiDataType.Double]]) + assert(data_type == 8 --[[ImGuiDataType.Float]] or data_type == 9 --[[ImGuiDataType.Double]]) local fmt_start = ImParseFormatFindStart(format) if string.byte(format, fmt_start) ~= 37 or string.byte(format, fmt_start + 1) == 37 then return v -- Don't apply if the value is not visible in the format string @@ -58491,7 +58603,7 @@ function ImGui.InputScalar(label, data_type, data, step, step_fast, format, flag local data_default = (bit32.band(g.NextItemData.HasFlags, 8 --[[ImGuiNextItemDataFlags.HasRefVal]]) ~= 0) and g.NextItemData.RefVal or g.DataTypeZeroValue - local buf, buf_size = {}, 64 -- TODO: IM_COUNTOF() + local buf, buf_size = {}, 64 -- char buf[64]; IM_COUNTOF(buf) if bit32.band(flags, 16384 --[[ImGuiInputTextFlags.DisplayEmptyRefVal]]) ~= 0 and ImGui.DataTypeCompare(data_type, data, data_default) == 0 then buf[1] = 0 else @@ -58640,15 +58752,15 @@ end function ImGui.InputFloat3(label, v, format, flags) if format == nil then format = "%.3f" end - return ImGui.InputScalarN(label, 6 --[[ImGuiDataType.Float]], v, 3, nil, nil, format, flags) + return ImGui.InputScalarN(label, 8 --[[ImGuiDataType.Float]], v, 3, nil, nil, format, flags) end function ImGui.InputFloat2(label, v, format, flags) - return ImGui.InputScalarN(label, 6 --[[ImGuiDataType.Float]], v, 2, nil, nil, format or "%.3f", flags) + return ImGui.InputScalarN(label, 8 --[[ImGuiDataType.Float]], v, 2, nil, nil, format or "%.3f", flags) end function ImGui.InputFloat4(label, v, format, flags) - return ImGui.InputScalarN(label, 6 --[[ImGuiDataType.Float]], v, 4, nil, nil, format or "%.3f", flags) + return ImGui.InputScalarN(label, 8 --[[ImGuiDataType.Float]], v, 4, nil, nil, format or "%.3f", flags) end function ImGui.InputInt2(label, v, flags) @@ -58689,7 +58801,7 @@ function ImGui.InputFloat(label, v, step, step_fast, format, flags) if step_fast == nil then step_fast = .0 end if format == nil then format = "%.3f" end - return ImGui.InputScalar(label, 6 --[[ImGuiDataType.Float]], v, (step > 0.0 and step or nil), (step_fast > 0.0 and step_fast or nil), format, flags) + return ImGui.InputScalar(label, 8 --[[ImGuiDataType.Float]], v, (step > 0.0 and step or nil), (step_fast > 0.0 and step_fast or nil), format, flags) end --- @param label string @@ -58703,7 +58815,7 @@ function ImGui.InputDouble(label, v, step, step_fast, format, flags) if step_fast == nil then step_fast = .0 end if format == nil then format = "%.6f" end - return ImGui.InputScalar(label, 7 --[[ImGuiDataType.Double]], v, (step > 0.0 and step or nil), (step_fast > 0.0 and step_fast or nil), format, flags) + return ImGui.InputScalar(label, 9 --[[ImGuiDataType.Double]], v, (step > 0.0 and step or nil), (step_fast > 0.0 and step_fast or nil), format, flags) end ------------------------------------------------------------------------------- @@ -58744,7 +58856,7 @@ function ImGui.DragBehaviorT(TYPE, SIGNEDTYPE, data_type, v, v_speed, v_min, v_m local is_bounded = (v_min < v_max) or ((v_min == v_max) and (v_min ~= 0.0 or (bit32.band(flags, 1024 --[[ImGuiSliderFlags.ClampZeroRange]]) ~= 0))) local is_wrapped = is_bounded and (bit32.band(flags, 256 --[[ImGuiSliderFlags.WrapAround]]) ~= 0) local is_logarithmic = bit32.band(flags, 32 --[[ImGuiSliderFlags.Logarithmic]]) ~= 0 - local is_floating_point = (data_type == 6 --[[ImGuiDataType.Float]]) or (data_type == 7 --[[ImGuiDataType.Double]]) + local is_floating_point = (data_type == 8 --[[ImGuiDataType.Float]]) or (data_type == 9 --[[ImGuiDataType.Double]]) -- Default tweak speed if v_speed == 0.0 and is_bounded and (v_max - v_min < math.huge) then @@ -58945,9 +59057,13 @@ function ImGui.DragBehavior(id, data_type, v, v_speed, min, max, format, flags) return ImGui.DragBehaviorT(ImS32, ImS32, data_type, v, v_speed, min and min or IM_S32_MIN, max and max or IM_S32_MAX, format, flags) elseif data_type == 5 --[[ImGuiDataType.U32]] then return ImGui.DragBehaviorT(ImU32, ImS32, data_type, v, v_speed, min and min or IM_U32_MIN, max and max or IM_U32_MAX, format, flags) - elseif data_type == 6 --[[ImGuiDataType.Float]] then + elseif data_type == 6 --[[ImGuiDataType.S64]] then + return ImGui.DragBehaviorT(ImS64, ImS64, data_type, v, v_speed, min and min or IM_S64_MIN, max and max or IM_S64_MAX, format, flags) + elseif data_type == 7 --[[ImGuiDataType.U64]] then + return ImGui.DragBehaviorT(ImU64, ImS64, data_type, v, v_speed, min and min or IM_U64_MIN, max and max or IM_U64_MAX, format, flags) + elseif data_type == 8 --[[ImGuiDataType.Float]] then return ImGui.DragBehaviorT(float, float, data_type, v, v_speed, min and min or -3.4028234663853e+38 --[[FLT_MAX]], max and max or 3.4028234663853e+38 --[[FLT_MAX]], format, flags) - elseif data_type == 7 --[[ImGuiDataType.Double]] then + elseif data_type == 9 --[[ImGuiDataType.Double]] then return ImGui.DragBehaviorT(double, double, data_type, v, v_speed, min and min or -1.7976931348623e+308 --[[DBL_MAX]], max and max or 1.7976931348623e+308 --[[DBL_MAX]], format, flags) end @@ -59097,10 +59213,19 @@ function ImGui.DragScalar(label, data_type, data, v_speed, min, max, format, fla ImGui.MarkItemEdited(id) end - -- TODO: ImGui.DataTypeFormatString() should be used here instead of ImFormatString() - -- Display value using user-provided display format so user can add prefix/suffix/decorations to the value. - ImGui.RenderTextClipped(frame_bb.Min, frame_bb.Max, FormatCached(format, data), nil, nil, DRAG_TEXT_ALIGN) + local is_mixed = bit32.band(g.LastItemData.ItemFlags, 4096 --[[ImGuiItemFlags.MixedValue]]) ~= 0 + local value_buf = DataTypeFormatStringCached(data_type, data, (is_mixed and g.MixedValueLabel ~= nil) and g.MixedValueLabel or format) + if g.LogEnabled then + ImGui.LogSetNextTextDecoration("{", "}") + end + if is_mixed then + ImGui.PushStyleColor(0 --[[ImGuiCol.Text]], g.Style.Colors[1 --[[ImGuiCol.TextDisabled]]]) -- ImGuiCol_TextMixedValue + end + ImGui.RenderTextClipped(frame_bb.Min, frame_bb.Max, value_buf, nil, nil, DRAG_TEXT_ALIGN) + if is_mixed then + ImGui.PopStyleColor() + end if label_size.x > 0.0 then ImGui.RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label, 1, label_end, false) @@ -59123,7 +59248,7 @@ function ImGui.DragFloat(label, v, v_speed, v_min, v_max, format, flags) if format == nil then format = "%.3f" end if flags == nil then flags = 0 end - return ImGui.DragScalar(label, 6 --[[ImGuiDataType.Float]], v, v_speed, v_min, v_max, format, flags) + return ImGui.DragScalar(label, 8 --[[ImGuiDataType.Float]], v, v_speed, v_min, v_max, format, flags) end -- NB: v_speed is float to allow adjusting the drag speed with more precision @@ -59188,7 +59313,7 @@ end local function DragFloatN(n) return function(label, v, v_speed, v_min, v_max, format, flags) - return ImGui.DragScalarN(label, 6 --[[ImGuiDataType.Float]], v, n, v_speed or 1.0, v_min or 0.0, v_max or 0.0, format or "%.3f", flags or 0) + return ImGui.DragScalarN(label, 8 --[[ImGuiDataType.Float]], v, n, v_speed or 1.0, v_min or 0.0, v_max or 0.0, format or "%.3f", flags or 0) end end local function DragIntN(n) @@ -59214,8 +59339,8 @@ local function DragRange2(data_type, label, v_current_min, v_current_max, v_spee end local g = GImGui - local lo = (data_type == 6 --[[ImGuiDataType.Float]]) and -3.4028234663853e+38 --[[FLT_MAX]] or (-2147483648) --[[INT_MIN]] - local hi = (data_type == 6 --[[ImGuiDataType.Float]]) and 3.4028234663853e+38 --[[FLT_MAX]] or 2147483647 --[[INT_MAX]] + local lo = (data_type == 8 --[[ImGuiDataType.Float]]) and -3.4028234663853e+38 --[[FLT_MAX]] or (-2147483648) --[[INT_MIN]] + local hi = (data_type == 8 --[[ImGuiDataType.Float]]) and 3.4028234663853e+38 --[[FLT_MAX]] or 2147483647 --[[INT_MAX]] ImGui.PushID(label) ImGui.BeginGroup() ImGui.PushMultiItemsWidths(2, ImGui.CalcItemWidth()) @@ -59244,7 +59369,7 @@ local function DragRange2(data_type, label, v_current_min, v_current_max, v_spee end function ImGui.DragFloatRange2(label, v_current_min, v_current_max, v_speed, v_min, v_max, format, format_max, flags) - return DragRange2(6 --[[ImGuiDataType.Float]], label, v_current_min, v_current_max, v_speed or 1.0, v_min or 0.0, v_max or 0.0, format or "%.3f", format_max, flags or 0) + return DragRange2(8 --[[ImGuiDataType.Float]], label, v_current_min, v_current_max, v_speed or 1.0, v_min or 0.0, v_max or 0.0, format or "%.3f", format_max, flags or 0) end function ImGui.DragIntRange2(label, v_current_min, v_current_max, v_speed, v_min, v_max, format, format_max, flags) @@ -59415,7 +59540,7 @@ function ImGui.ScaleValueFromRatioT(TYPE, SIGNEDTYPE, data_type, t, v_min, v_max end else -- Linear slider - local is_floating_point = (data_type == 6 --[[ImGuiDataType.Float]]) or (data_type == 7 --[[ImGuiDataType.Double]]) + local is_floating_point = (data_type == 8 --[[ImGuiDataType.Float]]) or (data_type == 9 --[[ImGuiDataType.Double]]) if is_floating_point then result = ImLerp(v_min, v_max, t) elseif t < 1.0 then -- t is already < 1.0 here @@ -59453,7 +59578,7 @@ function ImGui.SliderBehaviorT(TYPE, SIGNEDTYPE, bb, id, data_type, v, v_min, v_ local axis = (bit32.band(flags, 1048576 --[[ImGuiSliderFlags.Vertical]]) ~= 0) and 2 --[[ImGuiAxis.Y]] or 1 --[[ImGuiAxis.X]] local axis_k = (axis == 1 --[[ImGuiAxis.X]]) and "x" or "y" -- [Luau] named key: ImVec2[axis] goes through IM_VEC2.__index local is_logarithmic = bit32.band(flags, 32 --[[ImGuiSliderFlags.Logarithmic]]) ~= 0 - local is_floating_point = (data_type == 6 --[[ImGuiDataType.Float]]) or (data_type == 7 --[[ImGuiDataType.Double]]) + local is_floating_point = (data_type == 8 --[[ImGuiDataType.Float]]) or (data_type == 9 --[[ImGuiDataType.Double]]) local v_range_f = (v_min < v_max) and (v_max - v_min) or (v_min - v_max) -- We don't need high precision for what we do with it. -- Calculate bounds @@ -59671,10 +59796,16 @@ function ImGui.SliderBehavior(bb, id, data_type, v, min, max, format, flags, out elseif data_type == 5 --[[ImGuiDataType.U32]] then assert(max <= math.floor(IM_U32_MAX / 2)) return ImGui.SliderBehaviorT(ImU32, ImS32, bb, id, data_type, v, min, max, format, flags, out_grab_bb) - elseif data_type == 6 --[[ImGuiDataType.Float]] then + elseif data_type == 6 --[[ImGuiDataType.S64]] then + assert(min >= IM_S64_MIN / 2 and max <= IM_S64_MAX / 2) + return ImGui.SliderBehaviorT(ImS64, ImS64, bb, id, data_type, v, min, max, format, flags, out_grab_bb) + elseif data_type == 7 --[[ImGuiDataType.U64]] then + assert(max <= IM_U64_MAX / 2) + return ImGui.SliderBehaviorT(ImU64, ImS64, bb, id, data_type, v, min, max, format, flags, out_grab_bb) + elseif data_type == 8 --[[ImGuiDataType.Float]] then assert(min >= -3.4028234663853e+38 --[[FLT_MAX]] / 2.0 and max <= 3.4028234663853e+38 --[[FLT_MAX]] / 2.0) return ImGui.SliderBehaviorT(float, float, bb, id, data_type, v, min, max, format, flags, out_grab_bb) - elseif data_type == 7 --[[ImGuiDataType.Double]] then + elseif data_type == 9 --[[ImGuiDataType.Double]] then assert(min >= -1.7976931348623e+308 --[[DBL_MAX]] / 2.0 and max <= 1.7976931348623e+308 --[[DBL_MAX]] / 2.0) return ImGui.SliderBehaviorT(double, double, bb, id, data_type, v, min, max, format, flags, out_grab_bb) end @@ -59783,13 +59914,19 @@ function ImGui.SliderScalar(label, data_type, data, min, max, format, flags) window.DrawList:AddRectFilled(grab_bb.Min, grab_bb.Max, ImGui.GetColorU32((g.ActiveId == id) and 21 --[[ImGuiCol.SliderGrabActive]] or 20 --[[ImGuiCol.SliderGrab]]), style.GrabRounding) end - -- TODO: ImGui.DataTypeFormatString() should be used here instead of ImFormatString() - -- Display value using user-provided display format so user can add prefix/suffix/decorations to the value. - -- if g.LogEnabled then - -- ImGui.LogSetNextTextDecoration("{", "}") - -- end - ImGui.RenderTextClipped(frame_bb.Min, frame_bb.Max, FormatCached(format, data), nil, nil, DRAG_TEXT_ALIGN) + local is_mixed = bit32.band(g.LastItemData.ItemFlags, 4096 --[[ImGuiItemFlags.MixedValue]]) ~= 0 + local value_buf = DataTypeFormatStringCached(data_type, data, (is_mixed and g.MixedValueLabel ~= nil) and g.MixedValueLabel or format) + if g.LogEnabled then + ImGui.LogSetNextTextDecoration("{", "}") + end + if is_mixed then + ImGui.PushStyleColor(0 --[[ImGuiCol.Text]], g.Style.Colors[1 --[[ImGuiCol.TextDisabled]]]) -- ImGuiCol_TextMixedValue + end + ImGui.RenderTextClipped(frame_bb.Min, frame_bb.Max, value_buf, nil, nil, DRAG_TEXT_ALIGN) + if is_mixed then + ImGui.PopStyleColor() + end if label_size.x > 0.0 then ImGui.RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label, 1, label_end, false) @@ -59855,7 +59992,7 @@ end --- @param format? string --- @param flags? ImGuiSliderFlags function ImGui.SliderFloat2(label, v, v_min, v_max, format, flags) - return ImGui.SliderScalarN(label, 6 --[[ImGuiDataType.Float]], v, 2, v_min, v_max, format, flags) + return ImGui.SliderScalarN(label, 8 --[[ImGuiDataType.Float]], v, 2, v_min, v_max, format, flags) end --- @param label string @@ -59865,7 +60002,7 @@ end --- @param format? string --- @param flags? ImGuiSliderFlags function ImGui.SliderFloat3(label, v, v_min, v_max, format, flags) - return ImGui.SliderScalarN(label, 6 --[[ImGuiDataType.Float]], v, 3, v_min, v_max, format, flags) + return ImGui.SliderScalarN(label, 8 --[[ImGuiDataType.Float]], v, 3, v_min, v_max, format, flags) end --- @param label string @@ -59875,7 +60012,7 @@ end --- @param format? string --- @param flags? ImGuiSliderFlags function ImGui.SliderFloat4(label, v, v_min, v_max, format, flags) - return ImGui.SliderScalarN(label, 6 --[[ImGuiDataType.Float]], v, 4, v_min, v_max, format, flags) + return ImGui.SliderScalarN(label, 8 --[[ImGuiDataType.Float]], v, 4, v_min, v_max, format, flags) end --- @param label string @@ -59888,7 +60025,7 @@ function ImGui.SliderFloat(label, v, v_min, v_max, format, flags) if format == nil then format = "%.3f" end if flags == nil then flags = 0 end - return ImGui.SliderScalar(label, 6 --[[ImGuiDataType.Float]], v, v_min, v_max, format, flags) + return ImGui.SliderScalar(label, 8 --[[ImGuiDataType.Float]], v, v_min, v_max, format, flags) end --- @param label string @@ -60005,9 +60142,15 @@ function ImGui.VSliderScalar(label, size, data_type, data, min, max, format, fla -- Display value using user-provided display format so user can add prefix/suffix/decorations to the value. -- For the vertical slider we allow centered text to overlap the frame padding - -- local value_buf, value_buf_size = {}, 64 - -- TODO: ImGui.DataTypeFormatString() - ImGui.RenderTextClipped(ImVec2(frame_bb.Min.x, frame_bb.Min.y + style.FramePadding.y), frame_bb.Max, ImFormatString(format, data), nil, nil, ImVec2(0.5, 0.0)) + local is_mixed = bit32.band(g.LastItemData.ItemFlags, 4096 --[[ImGuiItemFlags.MixedValue]]) ~= 0 + local value_buf = DataTypeFormatStringCached(data_type, data, (is_mixed and g.MixedValueLabel ~= nil) and g.MixedValueLabel or format) + if is_mixed then + ImGui.PushStyleColor(0 --[[ImGuiCol.Text]], g.Style.Colors[1 --[[ImGuiCol.TextDisabled]]]) -- ImGuiCol_TextMixedValue + end + ImGui.RenderTextClipped(ImVec2(frame_bb.Min.x, frame_bb.Min.y + style.FramePadding.y), frame_bb.Max, value_buf, nil, nil, ImVec2(0.5, 0.0)) + if is_mixed then + ImGui.PopStyleColor() + end if label_size.x > 0.0 then ImGui.RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label, 1, label_end, false) end @@ -60026,7 +60169,7 @@ end function ImGui.VSliderFloat(label, size, v, v_min, v_max, format, flags) if format == nil then format = "%.3f" end - return ImGui.VSliderScalar(label, size, 6 --[[ImGuiDataType.Float]], v, v_min, v_max, format, flags) + return ImGui.VSliderScalar(label, size, 8 --[[ImGuiDataType.Float]], v, v_min, v_max, format, flags) end --- @param label string @@ -61894,6 +62037,12 @@ function ImGui.InputTextEx(label, hint, buf, buf_size, size_arg, flags, callback state.TextSrc = nil end + -- Log as text + if g.LogEnabled and (not is_password or is_displaying_hint) then + ImGui.LogSetNextTextDecoration("{", "}") + ImGui.LogRenderedText(draw_pos, ImGui._ByteArrayToString(buf_display, 1, buf_display_end)) + end + if label_size.x > 0.0 then ImGui.RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label, 1, label_end, false) end @@ -63512,9 +63661,9 @@ function ImGui.TreeNodeBehavior(id, flags, label, label_end) if bit32.band(flags, 268435456 --[[ImGuiTreeNodeFlags.ClipLabelForTrailingButton]]) ~= 0 then frame_bb.Max.x = frame_bb.Max.x - (g.FontSize + style.FramePadding.x) end - -- if g.LogEnabled then - -- ImGui.LogSetNextTextDecoration("###", "###") - -- end + if g.LogEnabled then + ImGui.LogSetNextTextDecoration("###", "###") + end else -- Unframed typed for tree nodes if hovered or selected then @@ -63530,9 +63679,9 @@ function ImGui.TreeNodeBehavior(id, flags, label, label_end) elseif not is_leaf then ImGui.RenderArrow(window.DrawList, ImVec2(text_pos.x - text_offset_x + padding_x, text_pos.y + g.FontSize * 0.15), text_col, is_open and ((bit32.band(flags, 536870912 --[[ImGuiTreeNodeFlags.UpsideDownArrow]]) ~= 0) and 2 --[[ImGuiDir.Up]] or 3 --[[ImGuiDir.Down]]) or 1 --[[ImGuiDir.Right]], 0.70) end - -- if g.LogEnabled then - -- ImGui.LogSetNextTextDecoration(">", nil) - -- end + if g.LogEnabled then + ImGui.LogSetNextTextDecoration(">", nil) + end end if draw_tree_lines then @@ -65991,7 +66140,7 @@ function ImGui.BeginMenuEx(label, icon, enabled) ImGui.PushStyleVarX(14 --[[ImGuiStyleVar.ItemSpacing]], style.ItemSpacing.x * 2.0) local text_pos = ImVec2(window.DC.CursorPos.x + offsets.OffsetLabel, pos.y + window.DC.CurrLineTextBaseOffset) pressed = ImGui.Selectable("", menu_is_open, selectable_flags, label_size) - -- TODO: ImGui.LogSetNextTextDecoration("[", "]") + ImGui.LogSetNextTextDecoration("[", "]") ImGui.RenderText(text_pos, label, 1, label_end, false) ImGui.PopStyleVar() window.DC.CursorPos.x = window.DC.CursorPos.x + IM_TRUNC(style.ItemSpacing.x * (-1.0 + 0.5)) -- -1 spacing to compensate the spacing added when Selectable() did a SameLine(). It would also work to call SameLine() ourselves after the PopStyleVar(). @@ -66007,7 +66156,7 @@ function ImGui.BeginMenuEx(label, icon, enabled) local extra_w = ImMax(0.0, ImGui.GetContentRegionAvail().x - min_w) local text_pos = ImVec2(window.DC.CursorPos.x, pos.y + window.DC.CurrLineTextBaseOffset) pressed = ImGui.Selectable("", menu_is_open, bit32.bor(selectable_flags, 16777216 --[[ImGuiSelectableFlags.SpanAvailWidth]]), ImVec2(min_w, label_size.y)) - -- ImGui.LogSetNextTextDecoration("", ">") + ImGui.LogSetNextTextDecoration("", ">") ImGui.RenderText(ImVec2(text_pos.x + offsets.OffsetLabel, text_pos.y), label, 1, label_end, false) if icon_w > 0.0 then --- @cast icon string @@ -66257,7 +66406,7 @@ function ImGui.MenuItemEx(label, icon, shortcut, selected, enabled) end if shortcut_w > 0.0 then ImGui.PushStyleColor(0 --[[ImGuiCol.Text]], style.Colors[1 --[[ImGuiCol.TextDisabled]]]) - -- ImGui.LogSetNextTextDecoration("(", ")") + ImGui.LogSetNextTextDecoration("(", ")") --- @cast shortcut string ImGui.RenderText(text_pos + ImVec2(offsets.OffsetShortcut + stretch_w, 0.0), shortcut, nil, nil, false) ImGui.PopStyleColor() @@ -72683,7 +72832,8 @@ __FILES['imstd_minstdio.lua'] = function() -- Supports: -- - %x, %X, %nx, %nX (where n is a number) --- - %d, %nd (where n is a number) +-- - %d, %nd, %u, %nu (where n is a number) +-- - length modifiers h, hh, l, ll, I64 on integers: ll/I64 = 64-bit range (doubles: exact only within +-2^53) -- - %f, %lf (very limited) -- -- Returns items_matched instead of EOF on error @@ -72697,6 +72847,9 @@ local CHAR_0, CHAR_9 = _byte'0', _byte'9' local CHAR_a, CHAR_A = _byte'a', _byte'A' local CHAR_d = _byte'd' local CHAR_l = _byte'l' +local CHAR_h = _byte'h' +local CHAR_u = _byte'u' +local CHAR_I = _byte'I' local CHAR_f, CHAR_F = _byte'f', _byte'F' local CHAR_x, CHAR_X = _byte'x', _byte'X' @@ -72717,10 +72870,15 @@ local function hex_digit_to_int(c) end -- we force this behavior by default -local function clamp_if_overflow(spec, val) +local function clamp_if_overflow(spec, val, is_64) if spec == CHAR_d or spec == CHAR_x or spec == CHAR_X then - if val > 2147483647 --[[INT_MAX]] then return 2147483647 --[[INT_MAX]] end - if val < (-2147483648) --[[INT_MIN]] then return (-2147483648) --[[INT_MIN]] end + local max = is_64 and 9223372036854775807 or 2147483647 --[[INT_MAX]] + local min = is_64 and -9223372036854775808 or (-2147483648) --[[INT_MIN]] + if val > max then return max end + if val < min then return min end + elseif spec == CHAR_u then + local max = is_64 and 18446744073709551615 or 4294967295 --[[UINT_MAX]] + if val > max then return max end end return val @@ -72784,22 +72942,27 @@ local function sscanf(buffer, buffer_begin, format, result) width = math.huge end + -- length modifiers + local n_l = 0 + while _byte(format, f, f) == CHAR_l or _byte(format, f, f) == CHAR_h do + if _byte(format, f, f) == CHAR_l then n_l = n_l + 1 end + f = f + 1 + end + if _byte(format, f, f) == CHAR_I and string.sub(format, f, f + 2) == "I64" then + n_l = 2 + f = f + 3 + end + local is_64 = n_l >= 2 + local spec = _byte(format, f, f) local base local is_float = false if spec == CHAR_x or spec == CHAR_X then base = 16 - elseif spec == CHAR_d then + elseif spec == CHAR_d or spec == CHAR_u then base = 10 elseif spec == CHAR_f or spec == CHAR_F then - is_float = true - elseif spec == CHAR_l then - f = f + 1 - if _byte(format, f, f) == CHAR_f then - is_float = true -- TODO: distinguish from float? - else - return items_matched - end + is_float = true -- TODO: distinguish %lf from %f? else return items_matched end @@ -72877,11 +73040,14 @@ local function sscanf(buffer, buffer_begin, format, result) val = val * base + sign * hex_digit_to_int(c) local old_val = val - val = clamp_if_overflow(spec, val) + val = clamp_if_overflow(spec, val, is_64) if old_val ~= val then break end end + if spec == CHAR_u and val < 0 then + val = val + (is_64 and 18446744073709551616 or 4294967296) -- unsigned wrap-around like strtoul() + end end result[assigned + 1] = val @@ -72911,6 +73077,7 @@ return { CalcNextScrollFromScrollTargetAndClamp = CalcNextScrollFromScrollTargetAndClamp, CustomConstraints = CustomConstraints, DBL_MAX = DBL_MAX, + DataTypeFormatStringCached = DataTypeFormatStringCached, DebugNodeTableGetSizingPolicyDesc = DebugNodeTableGetSizingPolicyDesc, DemoWindowColumns = DemoWindowColumns, DemoWindowInputs = DemoWindowInputs, @@ -73315,6 +73482,7 @@ return { ImGuiSettingsCleanupArgs = ImGuiSettingsCleanupArgs, ImGuiSettingsHandler = ImGuiSettingsHandler, ImGuiShrinkWidthItem = ImGuiShrinkWidthItem, + ImGuiSizeCallbackData = ImGuiSizeCallbackData, ImGuiSliderFlags = ImGuiSliderFlags, ImGuiSortDirection = ImGuiSortDirection, ImGuiStackLevelInfo = ImGuiStackLevelInfo, @@ -73400,6 +73568,7 @@ return { ImRsqrtPrecise = ImRsqrtPrecise, ImS16 = ImS16, ImS32 = ImS32, + ImS64 = ImS64, ImS8 = ImS8, ImSaturate = ImSaturate, ImSign = ImSign, @@ -73431,6 +73600,7 @@ return { ImTrunc64 = ImTrunc64, ImU16 = ImU16, ImU32 = ImU32, + ImU64 = ImU64, ImU8 = ImU8, ImUpperPowerOfTwo = ImUpperPowerOfTwo, ImVec1_Copy = ImVec1_Copy, diff --git a/docs/PORT_STATUS.txt b/docs/PORT_STATUS.txt index 9f9b2d2..a996fec 100644 --- a/docs/PORT_STATUS.txt +++ b/docs/PORT_STATUS.txt @@ -13,11 +13,11 @@ Known low scores that are not missing code: data-driven port code (e.g. DemoWind polyline stroker (AddPolyline), Lua-native replacements (ImGuiStorage, ImStr*, ImFormatString -> string.format). upstream file funcs ported by size similarity stubs replaced -imgui.cpp 747 99.9% 100.0% 76.5% 4 39 -imgui_widgets.cpp 308 100.0% 100.0% 78.9% 1 0 -imgui_draw.cpp 258 98.1% 99.2% 60.9% 1 0 +imgui.cpp 747 99.9% 100.0% 76.6% 4 39 +imgui_widgets.cpp 308 100.0% 100.0% 78.6% 1 0 +imgui_draw.cpp 258 98.1% 99.2% 61.0% 1 0 imgui_tables.cpp 112 100.0% 100.0% 74.1% 0 1 -imgui_demo.cpp 56 100.0% 100.0% 54.9% 0 0 +imgui_demo.cpp 56 100.0% 100.0% 55.2% 0 0 imgui.h 95 100.0% 100.0% 55.0% 0 15 imgui_internal.h 235 100.0% 100.0% 65.6% 1 36 TOTAL 1811 99.7% 99.9% 70.8% 7 91 @@ -25,7 +25,7 @@ TOTAL 1811 99.7% 99.9% 70.8% 7 upstream code reproduced (similarity x ported size / all upstream size): 70.7% Public API (imgui.h, namespace ImGui) 374 / 374 100.0% Internal API (imgui_internal.h, namespace ImGui) 443 / 443 100.0% -Enum values (imgui.h + imgui_internal.h) 1076 / 1078 99.8% +Enum values (imgui.h + imgui_internal.h) 1078 / 1078 100.0% Struct fields (imgui.h + imgui_internal.h) 1894 / 1908 99.3% 113 intentionally replaced by Lua equivalents [=] (91 functions, 2 API declarations, 20 struct fields), not counted above @@ -45,25 +45,25 @@ imgui.cpp -- USER FACING STRUCTURES (ImGuiStyle, ImGuiIO, ImGuiPlatformIO) [x] 33% ImGuiStyle::ImGuiStyle imgui_internal.lua:1620 [x] 83% ImGuiStyle::ScaleAllSizes imgui.lua:4813 - [x] 11% ImGuiIO::ImGuiIO imgui_h.lua:1226 - [x] 83% ImGuiIO::AddInputCharacter imgui.lua:8201 - [x] 83% ImGuiIO::AddInputCharacterUTF16 imgui.lua:8222 - [x] 53% ImGuiIO::AddInputCharactersUTF8 imgui.lua:8251 - [x] 83% ImGuiIO::ClearEventsQueue imgui.lua:8264 - [x] 80% ImGuiIO::ClearInputKeys imgui.lua:8271 - [x] 75% ImGuiIO::ClearInputMouse imgui.lua:8289 - [x] 82% FindLatestInputEvent imgui.lua:8315 - [x] 89% ImGuiIO::AddKeyAnalogEvent imgui.lua:8342 - [x] 89% ImGuiIO::AddKeyEvent imgui.lua:8388 - [x] 67% ImGuiIO::SetKeyEventNativeData imgui.lua:8402 - [x] 100% ImGuiIO::SetAppAcceptingEvents imgui.lua:8414 - [x] 75% ImGuiIO::AddMousePosEvent imgui.lua:8480 - [x] 87% ImGuiIO::AddMouseButtonEvent imgui.lua:8519 - [x] 87% ImGuiIO::AddMouseWheelEvent imgui.lua:8571 - [x] 96% ImGuiIO::AddMouseSourceEvent imgui.lua:8421 - [x] 87% ImGuiIO::AddMouseViewportEvent imgui.lua:8428 - [x] 84% ImGuiIO::AddFocusEvent imgui.lua:8457 - [x] 8% ImGuiPlatformIO::ImGuiPlatformIO imgui_h.lua:1569 + [x] 10% ImGuiIO::ImGuiIO imgui_h.lua:1236 + [x] 83% ImGuiIO::AddInputCharacter imgui.lua:8210 + [x] 83% ImGuiIO::AddInputCharacterUTF16 imgui.lua:8231 + [x] 53% ImGuiIO::AddInputCharactersUTF8 imgui.lua:8260 + [x] 83% ImGuiIO::ClearEventsQueue imgui.lua:8273 + [x] 80% ImGuiIO::ClearInputKeys imgui.lua:8280 + [x] 73% ImGuiIO::ClearInputMouse imgui.lua:8298 + [x] 82% FindLatestInputEvent imgui.lua:8324 + [x] 89% ImGuiIO::AddKeyAnalogEvent imgui.lua:8351 + [x] 89% ImGuiIO::AddKeyEvent imgui.lua:8397 + [x] 67% ImGuiIO::SetKeyEventNativeData imgui.lua:8411 + [x] 100% ImGuiIO::SetAppAcceptingEvents imgui.lua:8423 + [x] 75% ImGuiIO::AddMousePosEvent imgui.lua:8489 + [x] 87% ImGuiIO::AddMouseButtonEvent imgui.lua:8528 + [x] 87% ImGuiIO::AddMouseWheelEvent imgui.lua:8580 + [x] 96% ImGuiIO::AddMouseSourceEvent imgui.lua:8430 + [x] 87% ImGuiIO::AddMouseViewportEvent imgui.lua:8437 + [x] 84% ImGuiIO::AddFocusEvent imgui.lua:8466 + [x] 8% ImGuiPlatformIO::ImGuiPlatformIO imgui_h.lua:1579 -- MISC HELPERS/UTILITIES (Geometry functions) [x] 87% ImBezierCubicClosestPoint imgui.lua:5171 @@ -118,14 +118,14 @@ imgui.cpp [x] 41% ImTextCountLines imgui_tables.lua:3776 -- MISC HELPERS/UTILITIES (Color functions) - [x] 73% ImAlphaBlendColors imgui.lua:14908 - [x] 41% ImGui::ColorConvertU32ToFloat4 imgui.lua:14919 - [x] 16% ImGui::ColorConvertFloat4ToU32 imgui.lua:14938 - [x] 87% ImGui::ColorConvertRGBtoHSV imgui.lua:14949 - [x] 61% ImGui::ColorConvertHSVtoRGB imgui.lua:14974 + [x] 73% ImAlphaBlendColors imgui.lua:14913 + [x] 41% ImGui::ColorConvertU32ToFloat4 imgui.lua:14924 + [x] 16% ImGui::ColorConvertFloat4ToU32 imgui.lua:14943 + [x] 87% ImGui::ColorConvertRGBtoHSV imgui.lua:14954 + [x] 61% ImGui::ColorConvertHSVtoRGB imgui.lua:14979 -- ImGuiStorage - [x] 69% ImLowerBound imgui_widgets.lua:5256 + [x] 69% ImLowerBound imgui_widgets.lua:5342 [=] PairComparerByID table.sort over Lua table keys [=] ImGuiStorage::BuildSortByKey Lua table keyed by ID (e.g. window.StateStorage = {}) [=] ImGuiStorage::GetInt Lua table keyed by ID (e.g. window.StateStorage = {}) @@ -143,57 +143,57 @@ imgui.cpp [=] ImGuiStorage::SetAllInt Lua table keyed by ID (e.g. window.StateStorage = {}) -- ImGuiTextFilter - [x] 32% ImGuiTextFilter::ImGuiTextFilter imgui.lua:19896 - [x] 36% ImGuiTextFilter::Draw imgui.lua:19906 - [x] 62% ImGuiTextFilter::DrawWithHint imgui.lua:19913 - [x] 49% ImGuiTextFilter::Build imgui.lua:19928 - [x] 56% ImGuiTextFilter::PassFilter imgui.lua:19989 + [x] 32% ImGuiTextFilter::ImGuiTextFilter imgui.lua:19902 + [x] 36% ImGuiTextFilter::Draw imgui.lua:19912 + [x] 62% ImGuiTextFilter::DrawWithHint imgui.lua:19919 + [x] 49% ImGuiTextFilter::Build imgui.lua:19934 + [x] 56% ImGuiTextFilter::PassFilter imgui.lua:19995 -- ImGuiTextBuffer, ImGuiTextIndex - [x] 5% ImGuiTextBuffer::append imgui_h.lua:2818 - [x] 17% ImGuiTextBuffer::appendf imgui_h.lua:2819 + [x] 5% ImGuiTextBuffer::append imgui_h.lua:2839 + [x] 17% ImGuiTextBuffer::appendf imgui_h.lua:2840 [=] ImGuiTextBuffer::appendfv appendf(fmt, ...) (Lua varargs) [=] ImGuiTextIndex::append debug log keeps a Lua line list (g.DebugLogLines) -- ImGuiListClipper - [x] 86% GetSkipItemForListClipping imgui.lua:20025 - [x] 71% ImGuiListClipper_SortAndFuseRanges imgui.lua:20033 - [x] 89% ImGuiListClipper_SeekCursorAndSetupPrevLine imgui.lua:20057 - [x] 8% ImGuiListClipper::ImGuiListClipper imgui.lua:20090 + [x] 86% GetSkipItemForListClipping imgui.lua:20031 + [x] 71% ImGuiListClipper_SortAndFuseRanges imgui.lua:20039 + [x] 89% ImGuiListClipper_SeekCursorAndSetupPrevLine imgui.lua:20063 + [x] 8% ImGuiListClipper::ImGuiListClipper imgui.lua:20096 [-] ImGuiListClipper::~ImGuiListClipper c++-only - [x] 73% ImGuiListClipper::Begin imgui.lua:20097 - [x] 79% ImGuiListClipper::End imgui.lua:20126 - [x] 89% ImGuiListClipper::IncludeItemsByIndex imgui.lua:20152 - [x] 80% ImGuiListClipper::SeekCursorForItem imgui.lua:20163 - [x] 88% ImGuiListClipper_StepInternal imgui.lua:20170 - [x] 40% ImGuiListClipper::Step imgui.lua:20319 - [x] 92% ImGui::CalcClipRectVisibleItemsY imgui.lua:15006 + [x] 73% ImGuiListClipper::Begin imgui.lua:20103 + [x] 79% ImGuiListClipper::End imgui.lua:20132 + [x] 89% ImGuiListClipper::IncludeItemsByIndex imgui.lua:20158 + [x] 80% ImGuiListClipper::SeekCursorForItem imgui.lua:20169 + [x] 88% ImGuiListClipper_StepInternal imgui.lua:20176 + [x] 40% ImGuiListClipper::Step imgui.lua:20325 + [x] 92% ImGui::CalcClipRectVisibleItemsY imgui.lua:15011 -- STYLING - [x] 90% ImGui::GetStyle imgui.lua:15017 - [x] 71% ImGui::GetStyleColorVec4 imgui.lua:19446 - [x] 26% ImGui::GetColorU32 imgui.lua:15031 - [x] 50% ImGui::PushStyleColor imgui.lua:15069 - [x] 68% ImGui::PopStyleColor imgui.lua:15086 - [x] 74% ImGui::GetStyleVarInfo imgui.lua:15155 - [x] 56% ImGui::PushStyleVar imgui.lua:15162 - [x] 91% ImGui::PushStyleVarX imgui.lua:15181 - [x] 91% ImGui::PushStyleVarY imgui.lua:15192 - [x] 70% ImGui::PopStyleVar imgui.lua:15202 - [x] 1% ImGui::GetStyleColorName imgui.lua:19756 + [x] 90% ImGui::GetStyle imgui.lua:15022 + [x] 71% ImGui::GetStyleColorVec4 imgui.lua:19451 + [x] 26% ImGui::GetColorU32 imgui.lua:15036 + [x] 50% ImGui::PushStyleColor imgui.lua:15074 + [x] 68% ImGui::PopStyleColor imgui.lua:15091 + [x] 74% ImGui::GetStyleVarInfo imgui.lua:15160 + [x] 56% ImGui::PushStyleVar imgui.lua:15167 + [x] 91% ImGui::PushStyleVarX imgui.lua:15186 + [x] 91% ImGui::PushStyleVarY imgui.lua:15197 + [x] 70% ImGui::PopStyleVar imgui.lua:15207 + [x] 1% ImGui::GetStyleColorName imgui.lua:19762 -- RENDER HELPERS - [x] 46% ImGui::FindRenderedTextEnd imgui.lua:10405 - [x] 79% ImGui::RenderText imgui.lua:10426 - [x] 89% ImGui::RenderTextWrapped imgui.lua:10456 - [x] 85% ImGui::RenderTextClippedEx imgui.lua:10492 - [x] 89% ImGui::RenderTextClipped imgui.lua:10529 - [x] 90% ImGui::RenderTextEllipsis imgui.lua:10665 - [x] 86% ImGui::RenderFrame imgui.lua:10724 - [x] 94% ImGui::RenderFrameBorder imgui.lua:10744 - [x] 99% ImGui::RenderColorComponentMarker imgui.lua:10757 - [x] 85% ImGui::RenderNavCursor imgui.lua:10553 - [x] 85% ImGui::RenderMouseCursor imgui.lua:10613 + [x] 46% ImGui::FindRenderedTextEnd imgui.lua:10412 + [x] 79% ImGui::RenderText imgui.lua:10433 + [x] 89% ImGui::RenderTextWrapped imgui.lua:10463 + [x] 85% ImGui::RenderTextClippedEx imgui.lua:10499 + [x] 89% ImGui::RenderTextClipped imgui.lua:10536 + [x] 90% ImGui::RenderTextEllipsis imgui.lua:10672 + [x] 86% ImGui::RenderFrame imgui.lua:10731 + [x] 94% ImGui::RenderFrameBorder imgui.lua:10751 + [x] 99% ImGui::RenderColorComponentMarker imgui.lua:10764 + [x] 85% ImGui::RenderNavCursor imgui.lua:10560 + [x] 85% ImGui::RenderMouseCursor imgui.lua:10620 -- INITIALIZATION, SHUTDOWN [x] 100% ImGui::GetCurrentContext imgui.lua:5623 @@ -205,77 +205,77 @@ imgui.cpp [x] 5% ImGuiContext::ImGuiContext imgui_internal.lua:2369 [-] ImGuiContext::~ImGuiContext c++-only [x] 80% ImGui::Initialize imgui.lua:5684 - [x] 85% ImGui::Shutdown imgui.lua:14719 - [x] 48% ImGui::SetContextName imgui.lua:14811 - [x] 59% ImGui::AddContextHook imgui.lua:14819 - [x] 83% ImGui::RemoveContextHook imgui.lua:14833 - [x] 58% ImGui::CallContextHooks imgui.lua:14847 + [x] 85% ImGui::Shutdown imgui.lua:14724 + [x] 48% ImGui::SetContextName imgui.lua:14816 + [x] 59% ImGui::AddContextHook imgui.lua:14824 + [x] 83% ImGui::RemoveContextHook imgui.lua:14838 + [x] 58% ImGui::CallContextHooks imgui.lua:14852 -- MAIN CODE (most of the code! lots of stuff, needs tidying up!) [x] 11% ImGuiWindow::ImGuiWindow imgui_internal.lua:3009 [-] ImGuiWindow::~ImGuiWindow c++-only - [x] 74% SetCurrentWindow imgui.lua:11160 - [x] 85% ImGui::GcCompactTransientMiscBuffers imgui.lua:11181 - [x] 94% ImGui::GcCompactTransientWindowBuffers imgui.lua:11200 - [x] 96% ImGui::GcAwakeTransientWindowBuffers imgui.lua:11212 - [x] 86% ImGui::SetActiveID imgui.lua:7632 - [x] 100% ImGui::ClearActiveID imgui.lua:7698 - [x] 98% ImGui::SetHoveredID imgui.lua:7812 + [x] 80% SetCurrentWindow imgui.lua:11167 + [x] 85% ImGui::GcCompactTransientMiscBuffers imgui.lua:11188 + [x] 94% ImGui::GcCompactTransientWindowBuffers imgui.lua:11207 + [x] 96% ImGui::GcAwakeTransientWindowBuffers imgui.lua:11219 + [x] 86% ImGui::SetActiveID imgui.lua:7641 + [x] 100% ImGui::ClearActiveID imgui.lua:7707 + [x] 98% ImGui::SetHoveredID imgui.lua:7821 [x] 84% ImGui::GetHoveredID imgui.lua:7303 - [x] 85% ImGui::MarkItemEdited imgui.lua:7846 - [x] 93% ImGui::IsWindowContentHoverable imgui.lua:7879 - [x] 87% CalcDelayFromHoveredFlags imgui.lua:7824 - [x] 50% ApplyHoverFlagsForTooltip imgui.lua:7837 - [x] 87% ImGui::IsItemHovered imgui.lua:7919 - [x] 89% ImGui::ItemHoverable imgui.lua:8051 - [x] 64% ImGui::IsClippedEx imgui.lua:8155 - [x] 91% ImGui::SetLastItemData imgui.lua:8176 - [x] 98% ImGui::SetLastItemDataForWindow imgui.lua:8187 - [x] 93% ImGui::SetLastItemDataForChildWindowItem imgui.lua:11645 - [x] 95% ImGui::CalcWrapWidthForPos imgui.lua:10373 + [x] 85% ImGui::MarkItemEdited imgui.lua:7855 + [x] 93% ImGui::IsWindowContentHoverable imgui.lua:7888 + [x] 87% CalcDelayFromHoveredFlags imgui.lua:7833 + [x] 50% ApplyHoverFlagsForTooltip imgui.lua:7846 + [x] 87% ImGui::IsItemHovered imgui.lua:7928 + [x] 89% ImGui::ItemHoverable imgui.lua:8060 + [x] 64% ImGui::IsClippedEx imgui.lua:8164 + [x] 91% ImGui::SetLastItemData imgui.lua:8185 + [x] 98% ImGui::SetLastItemDataForWindow imgui.lua:8196 + [x] 93% ImGui::SetLastItemDataForChildWindowItem imgui.lua:11652 + [x] 95% ImGui::CalcWrapWidthForPos imgui.lua:10380 [x] 77% ImGui::MemAlloc imgui.lua:467 [x] 79% ImGui::MemFree imgui.lua:480 [x] 100% ImGui::DemoMarker imgui.lua:494 [x] 79% ImGui::DebugAllocHook imgui.lua:506 - [x] 91% ImGui::GetClipboardText imgui.lua:14861 - [x] 100% ImGui::SetClipboardText imgui.lua:14867 - [x] 100% ImGui::GetVersion imgui.lua:19753 - [x] 57% ImGui::GetIO imgui.lua:14874 - [x] 90% ImGui::GetPlatformIO imgui.lua:14877 - [x] 86% ImGui::GetDrawData imgui.lua:14708 - [x] 100% ImGui::GetTime imgui.lua:14714 - [x] 100% ImGui::GetFrameCount imgui.lua:19745 - [x] 93% GetViewportBgFgDrawList imgui.lua:14006 - [x] 80% ImGui::GetBackgroundDrawList imgui.lua:14031 - [x] 80% ImGui::GetForegroundDrawList imgui.lua:14043 - [x] 100% ImGui::GetDrawListSharedData imgui.lua:11893 - [x] 90% ImGui::StartMouseMovingWindow imgui.lua:11822 + [x] 91% ImGui::GetClipboardText imgui.lua:14866 + [x] 100% ImGui::SetClipboardText imgui.lua:14872 + [x] 100% ImGui::GetVersion imgui.lua:19759 + [x] 57% ImGui::GetIO imgui.lua:14879 + [x] 90% ImGui::GetPlatformIO imgui.lua:14882 + [x] 86% ImGui::GetDrawData imgui.lua:14713 + [x] 100% ImGui::GetTime imgui.lua:14719 + [x] 100% ImGui::GetFrameCount imgui.lua:19751 + [x] 93% GetViewportBgFgDrawList imgui.lua:14012 + [x] 80% ImGui::GetBackgroundDrawList imgui.lua:14037 + [x] 80% ImGui::GetForegroundDrawList imgui.lua:14049 + [x] 100% ImGui::GetDrawListSharedData imgui.lua:11900 + [x] 90% ImGui::StartMouseMovingWindow imgui.lua:11829 [x] 94% ImGui::StartMouseMovingWindowOrNode imgui.lua:4561 - [x] 85% ImGui::StopMouseMovingWindow imgui.lua:7603 - [x] 95% ImGui::UpdateMouseMovingWindowNewFrame imgui.lua:11854 - [x] 88% ImGui::UpdateMouseMovingWindowEndFrame imgui.lua:11951 - [x] 65% TranslateWindow imgui.lua:12022 - [x] 88% ScaleWindow imgui.lua:15430 - [x] 100% IsWindowActiveAndVisible imgui.lua:9877 - [x] 93% ImGui::UpdateHoveredWindowAndCaptureFlags imgui.lua:13404 - [x] 80% SetupDrawListSharedData imgui.lua:13881 - [x] 91% ImGui::NewFrame imgui.lua:14137 - [x] 63% ChildWindowComparer imgui.lua:14057 - [x] 89% AddWindowToSortBuffer imgui.lua:14072 - [x] 86% AddWindowToDrawData imgui.lua:14086 - [x] 64% GetWindowDisplayLayer imgui.lua:14102 - [x] 100% AddRootWindowToDrawData imgui.lua:14108 - [x] 63% FlattenDrawDataIntoSingleLayer imgui.lua:14113 - [x] 83% InitViewportDrawData imgui.lua:13915 - [x] 52% ImGui::PushClipRect imgui.lua:13984 - [x] 42% ImGui::PopClipRect imgui.lua:13993 - [x] 60% ImGui::RenderDimmedBackgroundBehindWindow imgui.lua:19527 - [x] 83% ImGui::FindBottomMostVisibleWindowWithinBeginStack imgui.lua:19500 - [x] 81% ImGui::RenderDimmedBackgrounds imgui.lua:19548 - [x] 86% ImGui::EndFrame imgui.lua:14476 - [x] 78% ImGui::Render imgui.lua:14592 - [x] 17% ImGui::CalcTextSize imgui.lua:14668 - [x] 79% ImGui::FindHoveredWindowEx imgui.lua:13318 + [x] 85% ImGui::StopMouseMovingWindow imgui.lua:7612 + [x] 95% ImGui::UpdateMouseMovingWindowNewFrame imgui.lua:11861 + [x] 88% ImGui::UpdateMouseMovingWindowEndFrame imgui.lua:11958 + [x] 65% TranslateWindow imgui.lua:12029 + [x] 88% ScaleWindow imgui.lua:15435 + [x] 100% IsWindowActiveAndVisible imgui.lua:9885 + [x] 93% ImGui::UpdateHoveredWindowAndCaptureFlags imgui.lua:13410 + [x] 80% SetupDrawListSharedData imgui.lua:13887 + [x] 91% ImGui::NewFrame imgui.lua:14143 + [x] 63% ChildWindowComparer imgui.lua:14063 + [x] 89% AddWindowToSortBuffer imgui.lua:14078 + [x] 86% AddWindowToDrawData imgui.lua:14092 + [x] 64% GetWindowDisplayLayer imgui.lua:14108 + [x] 100% AddRootWindowToDrawData imgui.lua:14114 + [x] 63% FlattenDrawDataIntoSingleLayer imgui.lua:14119 + [x] 83% InitViewportDrawData imgui.lua:13921 + [x] 52% ImGui::PushClipRect imgui.lua:13990 + [x] 42% ImGui::PopClipRect imgui.lua:13999 + [x] 60% ImGui::RenderDimmedBackgroundBehindWindow imgui.lua:19533 + [x] 83% ImGui::FindBottomMostVisibleWindowWithinBeginStack imgui.lua:19506 + [x] 81% ImGui::RenderDimmedBackgrounds imgui.lua:19554 + [x] 86% ImGui::EndFrame imgui.lua:14482 + [x] 78% ImGui::Render imgui.lua:14597 + [x] 17% ImGui::CalcTextSize imgui.lua:14673 + [x] 79% ImGui::FindHoveredWindowEx imgui.lua:13325 [x] 95% ImGui::IsItemActive imgui.lua:7182 [x] 97% ImGui::IsItemActivated imgui.lua:7223 [x] 95% ImGui::IsItemDeactivated imgui.lua:7209 @@ -290,103 +290,103 @@ imgui.cpp [x] 74% ImGui::IsItemVisible imgui.lua:7274 [x] 74% ImGui::IsItemEdited imgui.lua:7278 [x] 71% ImGui::SetNextItemAllowOverlap imgui.lua:7285 - [x] 93% ImGui::SetActiveIdUsingAllKeyboardKeys imgui.lua:11475 + [x] 93% ImGui::SetActiveIdUsingAllKeyboardKeys imgui.lua:11482 [x] 67% ImGui::GetItemID imgui.lua:7290 - [x] 100% ImGui::GetItemRectMin imgui.lua:11484 - [x] 100% ImGui::GetItemRectMax imgui.lua:11490 + [x] 100% ImGui::GetItemRectMin imgui.lua:11491 + [x] 100% ImGui::GetItemRectMax imgui.lua:11497 [x] 67% ImGui::GetItemRectSize imgui.lua:7299 [x] 67% ImGui::GetItemFlags imgui.lua:7294 - [x] 43% ImGui::BeginChild imgui.lua:11634 - [x] 81% ImGui::BeginChildEx imgui.lua:11500 - [x] 90% ImGui::EndChild imgui.lua:11650 + [x] 43% ImGui::BeginChild imgui.lua:11641 + [x] 81% ImGui::BeginChildEx imgui.lua:11507 + [x] 90% ImGui::EndChild imgui.lua:11657 [x] 83% ImGui::FindFrontMostVisibleChildWindow imgui.lua:5787 [x] 42% SetWindowConditionAllowFlags imgui.lua:5799 - [x] 73% ImGui::FindWindowByID imgui.lua:12035 - [x] 100% ImGui::FindWindowByName imgui.lua:12045 + [x] 73% ImGui::FindWindowByID imgui.lua:12042 + [x] 100% ImGui::FindWindowByName imgui.lua:12052 [x] 86% ApplyWindowSettings imgui.lua:5813 [x] 65% InitOrLoadWindowSettings imgui.lua:5852 [x] 73% CreateNewWindow imgui.lua:5873 [x] 75% GetWindowForTitleDisplay imgui.lua:6425 - [x] 91% GetWindowForTitleAndMenuHeight imgui.lua:9885 - [x] 73% CalcWindowMinSize imgui.lua:9889 - [x] 86% CalcWindowSizeAfterConstraint imgui.lua:9934 - [x] 79% CalcWindowContentSizes imgui.lua:9969 - [x] 86% CalcWindowAutoFitSize imgui.lua:9994 - [x] 85% ImGui::CalcWindowNextAutoFitSize imgui.lua:10043 - [x] 84% GetWindowBgColorIdx imgui.lua:10054 - [x] 89% CalcResizePosSizeFromAnyCorner imgui.lua:10069 + [x] 91% GetWindowForTitleAndMenuHeight imgui.lua:9893 + [x] 73% CalcWindowMinSize imgui.lua:9897 + [x] 91% CalcWindowSizeAfterConstraint imgui.lua:9942 + [x] 79% CalcWindowContentSizes imgui.lua:9976 + [x] 86% CalcWindowAutoFitSize imgui.lua:10001 + [x] 85% ImGui::CalcWindowNextAutoFitSize imgui.lua:10050 + [x] 84% GetWindowBgColorIdx imgui.lua:10061 + [x] 89% CalcResizePosSizeFromAnyCorner imgui.lua:10076 [x] 94% GetResizeBorderRect imgui.lua:4890 - [x] 91% ImGui::GetWindowResizeCornerID imgui.lua:10115 - [x] 92% ImGui::GetWindowResizeBorderID imgui.lua:10126 - [x] 71% ImGui::UpdateWindowManualResize imgui.lua:10135 - [x] 69% ClampWindowPos imgui.lua:10772 - [x] 95% RenderWindowOuterSingleBorder imgui.lua:10785 - [x] 94% ImGui::RenderWindowOuterBorders imgui.lua:10960 = RenderWindowOuterBorders - [x] 84% ImGui::RenderWindowDecorations imgui.lua:10829 - [x] 93% ImGui::RenderWindowTitleBarContents imgui.lua:10970 - [x] 85% ImGui::UpdateWindowParentAndRootLinks imgui.lua:11066 - [x] 33% ImGui::UpdateWindowSkipRefresh imgui.lua:11096 - [x] 92% SetWindowActiveForSkipRefresh imgui.lua:11148 - [x] 82% ImGui::Begin imgui.lua:12062 - [x] 86% ImGui::End imgui.lua:13138 - [x] 84% ImGui::PushItemFlag imgui.lua:13227 - [x] 96% ImGui::PopItemFlag imgui.lua:13242 - [x] 79% ImGui::BeginDisabled imgui.lua:13257 - [x] 87% ImGui::EndDisabled imgui.lua:13273 - [x] 78% ImGui::BeginDisabledOverrideReenable imgui.lua:13289 - [x] 88% ImGui::EndDisabledOverrideReenable imgui.lua:13300 - [x] 54% ImGui::PushTextWrapPos imgui.lua:15227 - [x] 69% ImGui::PopTextWrapPos imgui.lua:15238 - [x] 100% GetCombinedRootWindow imgui.lua:15250 - [x] 100% ImGui::IsWindowChildOf imgui.lua:15269 - [x] 84% ImGui::IsWindowInBeginStack imgui.lua:15289 - [x] 100% ImGui::IsWindowWithinBeginStackOf imgui.lua:15301 - [x] 91% ImGui::IsWindowAbove imgui.lua:15319 - [x] 90% ImGui::IsWindowHovered imgui.lua:15345 + [x] 91% ImGui::GetWindowResizeCornerID imgui.lua:10122 + [x] 92% ImGui::GetWindowResizeBorderID imgui.lua:10133 + [x] 71% ImGui::UpdateWindowManualResize imgui.lua:10142 + [x] 69% ClampWindowPos imgui.lua:10779 + [x] 95% RenderWindowOuterSingleBorder imgui.lua:10792 + [x] 94% ImGui::RenderWindowOuterBorders imgui.lua:10967 = RenderWindowOuterBorders + [x] 84% ImGui::RenderWindowDecorations imgui.lua:10836 + [x] 93% ImGui::RenderWindowTitleBarContents imgui.lua:10977 + [x] 85% ImGui::UpdateWindowParentAndRootLinks imgui.lua:11073 + [x] 33% ImGui::UpdateWindowSkipRefresh imgui.lua:11103 + [x] 92% SetWindowActiveForSkipRefresh imgui.lua:11155 + [x] 82% ImGui::Begin imgui.lua:12069 + [x] 86% ImGui::End imgui.lua:13145 + [x] 84% ImGui::PushItemFlag imgui.lua:13234 + [x] 96% ImGui::PopItemFlag imgui.lua:13249 + [x] 79% ImGui::BeginDisabled imgui.lua:13264 + [x] 87% ImGui::EndDisabled imgui.lua:13280 + [x] 78% ImGui::BeginDisabledOverrideReenable imgui.lua:13296 + [x] 88% ImGui::EndDisabledOverrideReenable imgui.lua:13307 + [x] 54% ImGui::PushTextWrapPos imgui.lua:15232 + [x] 69% ImGui::PopTextWrapPos imgui.lua:15243 + [x] 100% GetCombinedRootWindow imgui.lua:15255 + [x] 100% ImGui::IsWindowChildOf imgui.lua:15274 + [x] 84% ImGui::IsWindowInBeginStack imgui.lua:15294 + [x] 100% ImGui::IsWindowWithinBeginStackOf imgui.lua:15306 + [x] 91% ImGui::IsWindowAbove imgui.lua:15324 + [x] 90% ImGui::IsWindowHovered imgui.lua:15350 [x] 67% ImGui::GetWindowDockID imgui.lua:4545 [x] 67% ImGui::IsWindowDocked imgui.lua:4549 - [x] 100% ImGui::GetWindowWidth imgui.lua:11222 - [x] 74% ImGui::GetWindowHeight imgui.lua:11355 - [x] 56% ImGui::GetWindowPos imgui.lua:11360 - [x] 61% ImGui::SetWindowPos imgui.lua:11230 - [x] 55% ImGui::GetWindowSize imgui.lua:11365 - [x] 76% ImGui::SetWindowSize imgui.lua:11272 - [x] 55% ImGui::SetWindowCollapsed imgui.lua:11317 - [x] 59% ImGui::SetWindowHitTestHole imgui.lua:11341 - [x] 97% ImGui::SetWindowHiddenAndSkipItemsForCurrentFrame imgui.lua:11388 - [x] 55% ImGui::IsWindowCollapsed imgui.lua:11347 - [x] 55% ImGui::IsWindowAppearing imgui.lua:11351 - [x] 72% ImGui::SetNextWindowPos imgui.lua:11397 - [x] 74% ImGui::SetNextWindowSize imgui.lua:11413 - [x] 87% ImGui::SetNextWindowSizeConstraints imgui.lua:11432 - [x] 65% ImGui::SetNextWindowContentSize imgui.lua:11736 - [x] 74% ImGui::SetNextWindowScroll imgui.lua:11743 - [x] 77% ImGui::SetNextWindowCollapsed imgui.lua:11751 - [x] 80% ImGui::SetNextWindowBgAlpha imgui.lua:11441 - [x] 80% ImGui::SetNextWindowViewport imgui.lua:11766 + [x] 100% ImGui::GetWindowWidth imgui.lua:11229 + [x] 74% ImGui::GetWindowHeight imgui.lua:11362 + [x] 56% ImGui::GetWindowPos imgui.lua:11367 + [x] 61% ImGui::SetWindowPos imgui.lua:11237 + [x] 55% ImGui::GetWindowSize imgui.lua:11372 + [x] 76% ImGui::SetWindowSize imgui.lua:11279 + [x] 55% ImGui::SetWindowCollapsed imgui.lua:11324 + [x] 59% ImGui::SetWindowHitTestHole imgui.lua:11348 + [x] 97% ImGui::SetWindowHiddenAndSkipItemsForCurrentFrame imgui.lua:11395 + [x] 55% ImGui::IsWindowCollapsed imgui.lua:11354 + [x] 55% ImGui::IsWindowAppearing imgui.lua:11358 + [x] 72% ImGui::SetNextWindowPos imgui.lua:11404 + [x] 74% ImGui::SetNextWindowSize imgui.lua:11420 + [x] 87% ImGui::SetNextWindowSizeConstraints imgui.lua:11439 + [x] 65% ImGui::SetNextWindowContentSize imgui.lua:11743 + [x] 74% ImGui::SetNextWindowScroll imgui.lua:11750 + [x] 77% ImGui::SetNextWindowCollapsed imgui.lua:11758 + [x] 80% ImGui::SetNextWindowBgAlpha imgui.lua:11448 + [x] 80% ImGui::SetNextWindowViewport imgui.lua:11773 [x] 76% ImGui::SetNextWindowDockID imgui.lua:4553 - [x] 50% ImGui::SetNextWindowClass imgui.lua:11773 - [x] 69% ImGui::SetNextWindowRefreshPolicy imgui.lua:11783 - [x] 47% ImGui::SetNextWindowFlags imgui.lua:11717 - [x] 47% ImGui::SetNextWindowChildFlags imgui.lua:11699 - [x] 100% ImGui::GetWindowDrawList imgui.lua:11447 - [x] 22% ImGui::GetWindowDpiScale imgui.lua:11803 - [x] 42% ImGui::GetWindowViewport imgui.lua:11807 - [x] 100% ImGui::GetFont imgui.lua:11457 - [x] 100% ImGui::GetFontBaked imgui.lua:11453 - [x] 100% ImGui::GetFontSize imgui.lua:11464 - [x] 100% ImGui::GetFontTexUvWhitePixel imgui.lua:11469 + [x] 50% ImGui::SetNextWindowClass imgui.lua:11780 + [x] 69% ImGui::SetNextWindowRefreshPolicy imgui.lua:11790 + [x] 47% ImGui::SetNextWindowFlags imgui.lua:11724 + [x] 47% ImGui::SetNextWindowChildFlags imgui.lua:11706 + [x] 100% ImGui::GetWindowDrawList imgui.lua:11454 + [x] 22% ImGui::GetWindowDpiScale imgui.lua:11810 + [x] 42% ImGui::GetWindowViewport imgui.lua:11814 + [x] 100% ImGui::GetFont imgui.lua:11464 + [x] 100% ImGui::GetFontBaked imgui.lua:11460 + [x] 100% ImGui::GetFontSize imgui.lua:11471 + [x] 100% ImGui::GetFontTexUvWhitePixel imgui.lua:11476 [-] ImGui::SetWindowFontScale obsolete - [x] 93% ImGui::PushFocusScope imgui.lua:16444 - [x] 56% ImGui::PopFocusScope imgui.lua:16453 - [x] 91% ImGui::IsInNavFocusRoute imgui.lua:16465 - [x] 71% ImGui::SetNavFocusScope imgui.lua:16479 - [x] 76% ImGui::FocusItem imgui.lua:19716 - [x] 100% ImGui::ActivateItemByID imgui.lua:19729 - [x] 81% ImGui::SetKeyboardFocusHere imgui.lua:19688 - [x] 98% ImGui::SetItemDefaultFocus imgui.lua:16519 - [x] 91% ImGui::SetStateStorage imgui.lua:19747 - [x] 74% ImGui::GetStateStorage imgui.lua:19746 + [x] 93% ImGui::PushFocusScope imgui.lua:16449 + [x] 75% ImGui::PopFocusScope imgui.lua:16458 + [x] 91% ImGui::IsInNavFocusRoute imgui.lua:16470 + [x] 71% ImGui::SetNavFocusScope imgui.lua:16484 + [x] 76% ImGui::FocusItem imgui.lua:19722 + [x] 100% ImGui::ActivateItemByID imgui.lua:19735 + [x] 81% ImGui::SetKeyboardFocusHere imgui.lua:19694 + [x] 98% ImGui::SetItemDefaultFocus imgui.lua:16524 + [x] 91% ImGui::SetStateStorage imgui.lua:19753 + [x] 74% ImGui::GetStateStorage imgui.lua:19752 [x] 72% ImGui::IsRectVisible imgui.lua:6998 -- FONTS, TEXTURES @@ -406,90 +406,90 @@ imgui.cpp [x] 86% ImGui::PopFont imgui.lua:5479 -- ID STACK - [x] 46% ImGuiWindow::GetID imgui.lua:7745 - [x] 76% ImGuiWindow::GetIDFromPos imgui.lua:7766 - [x] 47% ImGuiWindow::GetIDFromRectangle imgui.lua:7775 - [x] 53% ImGui::PushID imgui.lua:7708 - [x] 62% ImGui::PushOverrideID imgui.lua:7720 - [x] 39% ImGui::GetIDWithSeed imgui.lua:7797 - [x] 68% ImGui::PopID imgui.lua:7733 - [x] 38% ImGui::GetID imgui.lua:7785 + [x] 46% ImGuiWindow::GetID imgui.lua:7754 + [x] 76% ImGuiWindow::GetIDFromPos imgui.lua:7775 + [x] 47% ImGuiWindow::GetIDFromRectangle imgui.lua:7784 + [x] 53% ImGui::PushID imgui.lua:7717 + [x] 62% ImGui::PushOverrideID imgui.lua:7729 + [x] 39% ImGui::GetIDWithSeed imgui.lua:7806 + [x] 68% ImGui::PopID imgui.lua:7742 + [x] 38% ImGui::GetID imgui.lua:7794 -- INPUTS - [x] 84% GetModForLRModKey imgui.lua:8659 - [x] 74% ImGui::FixupKeyChord imgui.lua:8676 - [x] 52% ImGui::GetKeyData imgui.lua:8688 - [x] 85% ImGui::GetKeyName imgui.lua:8889 - [x] 43% ImGui::GetKeyChordName imgui.lua:8846 - [x] 76% ImGui::CalcTypematicRepeatAmount imgui.lua:8931 - [x] 81% ImGui::GetTypematicRepeatRate imgui.lua:8962 - [x] 96% ImGui::GetKeyPressedAmount imgui.lua:8975 - [x] 77% ImGui::GetKeyMagnitude2d imgui.lua:8706 - [x] 83% ImGui::UpdateKeyRoutingTable imgui.lua:8990 - [x] 70% GetRoutingIdFromOwnerId imgui.lua:9036 - [x] 84% ImGui::GetShortcutRoutingData imgui.lua:9043 - [x] 86% CalcRoutingScore imgui.lua:9095 - [x] 69% IsKeyChordPotentiallyCharInput imgui.lua:9149 - [x] 71% ImGui::SetShortcutRouting imgui.lua:9176 - [x] 97% ImGui::TestShortcutRouting imgui.lua:9273 - [x] 81% ImGui::IsKeyDown imgui.lua:8755 - [x] 9% ImGui::IsKeyPressed imgui.lua:8770 - [x] 84% ImGui::IsKeyReleased imgui.lua:8779 - [x] 69% ImGui::IsMouseDown imgui.lua:9303 - [x] 13% ImGui::IsMouseClicked imgui.lua:9313 - [x] 69% ImGui::IsMouseReleased imgui.lua:9354 - [x] 86% ImGui::IsMouseReleasedWithDelay imgui.lua:9368 - [x] 71% ImGui::IsMouseDoubleClicked imgui.lua:9384 - [x] 83% ImGui::GetMouseClickedCount imgui.lua:9392 - [x] 99% LastItemOverlayButtonForNullId imgui.lua:9400 - [x] 91% ImGui::GetItemClickedCountWithSingleClickDelay imgui.lua:9436 + [x] 84% GetModForLRModKey imgui.lua:8668 + [x] 74% ImGui::FixupKeyChord imgui.lua:8685 + [x] 52% ImGui::GetKeyData imgui.lua:8697 + [x] 85% ImGui::GetKeyName imgui.lua:8897 + [x] 43% ImGui::GetKeyChordName imgui.lua:8854 + [x] 76% ImGui::CalcTypematicRepeatAmount imgui.lua:8939 + [x] 81% ImGui::GetTypematicRepeatRate imgui.lua:8970 + [x] 96% ImGui::GetKeyPressedAmount imgui.lua:8983 + [x] 77% ImGui::GetKeyMagnitude2d imgui.lua:8715 + [x] 83% ImGui::UpdateKeyRoutingTable imgui.lua:8998 + [x] 70% GetRoutingIdFromOwnerId imgui.lua:9044 + [x] 84% ImGui::GetShortcutRoutingData imgui.lua:9051 + [x] 86% CalcRoutingScore imgui.lua:9103 + [x] 69% IsKeyChordPotentiallyCharInput imgui.lua:9157 + [x] 71% ImGui::SetShortcutRouting imgui.lua:9184 + [x] 97% ImGui::TestShortcutRouting imgui.lua:9281 + [x] 81% ImGui::IsKeyDown imgui.lua:8764 + [x] 9% ImGui::IsKeyPressed imgui.lua:8779 + [x] 84% ImGui::IsKeyReleased imgui.lua:8788 + [x] 70% ImGui::IsMouseDown imgui.lua:9311 + [x] 13% ImGui::IsMouseClicked imgui.lua:9321 + [x] 70% ImGui::IsMouseReleased imgui.lua:9362 + [x] 86% ImGui::IsMouseReleasedWithDelay imgui.lua:9376 + [x] 71% ImGui::IsMouseDoubleClicked imgui.lua:9392 + [x] 84% ImGui::GetMouseClickedCount imgui.lua:9400 + [x] 99% LastItemOverlayButtonForNullId imgui.lua:9408 + [x] 91% ImGui::GetItemClickedCountWithSingleClickDelay imgui.lua:9444 [x] 29% ImGui::IsMouseHoveringRect imgui.lua:6455 [x] 81% ImGui::IsMouseDragPastThreshold imgui.lua:6488 - [x] 77% ImGui::IsMouseDragging imgui.lua:6501 - [x] 67% ImGui::GetMousePos imgui.lua:9462 + [x] 78% ImGui::IsMouseDragging imgui.lua:6501 + [x] 67% ImGui::GetMousePos imgui.lua:9470 [x] 85% ImGui::TeleportMousePos imgui.lua:6515 - [x] 93% ImGui::GetMousePosOnOpeningCurrentPopup imgui.lua:9467 - [x] 80% ImGui::IsMousePosValid imgui.lua:9282 - [x] 75% ImGui::IsAnyMouseDown imgui.lua:9291 - [x] 87% ImGui::GetMouseDragDelta imgui.lua:9481 - [x] 71% ImGui::ResetMouseDragDelta imgui.lua:9500 - [x] 100% ImGui::GetMouseCursor imgui.lua:14886 - [x] 100% ImGui::SetMouseCursor imgui.lua:14895 - [x] 92% UpdateAliasKey imgui.lua:13498 - [x] 42% GetMergedModsFromKeys imgui.lua:13506 - [x] 85% ImGui::UpdateKeyboardInputs imgui.lua:13519 - [x] 88% ImGui::UpdateMouseInputs imgui.lua:13597 - [x] 91% LockWheelingWindow imgui.lua:13705 - [x] 76% FindBestWheelingWindow imgui.lua:13726 - [x] 92% ImGui::UpdateMouseWheel imgui.lua:13776 - [x] 60% ImGui::SetNextFrameWantCaptureKeyboard imgui.lua:19751 - [x] 60% ImGui::SetNextFrameWantCaptureMouse imgui.lua:19752 - [x] 97% GetInputSourceName imgui.lua:9510 - [x] 97% GetMouseSourceName imgui.lua:9520 - [x] 90% DebugPrintInputEvent imgui.lua:9530 - [x] 81% ImGui::UpdateInputEvents imgui.lua:9550 - [x] 80% ImGui::GetKeyOwner imgui.lua:8905 - [x] 84% ImGui::TestKeyOwner imgui.lua:8719 - [x] 80% ImGui::SetKeyOwner imgui.lua:9719 - [x] 59% ImGui::SetKeyOwnersForKeyChord imgui.lua:9741 - [x] 79% ImGui::SetItemKeyOwner imgui.lua:9769 - [x] 75% ImGui::IsKeyChordPressed imgui.lua:9796 - [x] 76% ImGui::SetNextItemShortcut imgui.lua:9819 + [x] 93% ImGui::GetMousePosOnOpeningCurrentPopup imgui.lua:9475 + [x] 80% ImGui::IsMousePosValid imgui.lua:9290 + [x] 73% ImGui::IsAnyMouseDown imgui.lua:9299 + [x] 87% ImGui::GetMouseDragDelta imgui.lua:9489 + [x] 72% ImGui::ResetMouseDragDelta imgui.lua:9508 + [x] 100% ImGui::GetMouseCursor imgui.lua:14891 + [x] 100% ImGui::SetMouseCursor imgui.lua:14900 + [x] 92% UpdateAliasKey imgui.lua:13504 + [x] 42% GetMergedModsFromKeys imgui.lua:13512 + [x] 85% ImGui::UpdateKeyboardInputs imgui.lua:13525 + [x] 88% ImGui::UpdateMouseInputs imgui.lua:13603 + [x] 91% LockWheelingWindow imgui.lua:13711 + [x] 76% FindBestWheelingWindow imgui.lua:13732 + [x] 92% ImGui::UpdateMouseWheel imgui.lua:13782 + [x] 60% ImGui::SetNextFrameWantCaptureKeyboard imgui.lua:19757 + [x] 60% ImGui::SetNextFrameWantCaptureMouse imgui.lua:19758 + [x] 97% GetInputSourceName imgui.lua:9518 + [x] 97% GetMouseSourceName imgui.lua:9528 + [x] 90% DebugPrintInputEvent imgui.lua:9538 + [x] 81% ImGui::UpdateInputEvents imgui.lua:9558 + [x] 80% ImGui::GetKeyOwner imgui.lua:8913 + [x] 84% ImGui::TestKeyOwner imgui.lua:8728 + [x] 80% ImGui::SetKeyOwner imgui.lua:9727 + [x] 59% ImGui::SetKeyOwnersForKeyChord imgui.lua:9749 + [x] 79% ImGui::SetItemKeyOwner imgui.lua:9777 + [x] 75% ImGui::IsKeyChordPressed imgui.lua:9804 + [x] 76% ImGui::SetNextItemShortcut imgui.lua:9827 [x] 88% ImGui::ItemHandleShortcut imgui.lua:6526 - [x] 73% ImGui::Shortcut imgui.lua:9832 + [x] 73% ImGui::Shortcut imgui.lua:9840 -- ERROR CHECKING, STATE RECOVERY [=] ImGui::DebugCheckVersionAndDataLayout C++ ABI / sizeof check - [x] 86% ImGui::ErrorCheckUsingSetCursorPosToExtendParentBoundaries imgui.lua:19463 - [x] 73% ImGui::ErrorCheckNewFrameSanityChecks imgui.lua:20345 - [x] 88% ImGui::ErrorCheckEndFrameSanityChecks imgui.lua:20423 - [x] 100% ImGui::ErrorRecoveryStoreState imgui.lua:20439 - [x] 91% ImGui::ErrorRecoveryTryToRecoverState imgui.lua:20457 - [x] 91% ImGui::ErrorRecoveryTryToRecoverWindowState imgui.lua:20486 - [x] 86% ImGui::ErrorLog imgui.lua:20584 - [x] 90% ImGui::ErrorCheckEndFrameFinalizeErrorTooltip imgui.lua:20628 - [x] 77% ImGui::BeginErrorTooltip imgui.lua:20676 - [x] 100% ImGui::EndErrorTooltip imgui.lua:20698 + [x] 98% ImGui::ErrorCheckUsingSetCursorPosToExtendParentBoundaries imgui.lua:19468 + [x] 73% ImGui::ErrorCheckNewFrameSanityChecks imgui.lua:20351 + [x] 88% ImGui::ErrorCheckEndFrameSanityChecks imgui.lua:20429 + [x] 100% ImGui::ErrorRecoveryStoreState imgui.lua:20445 + [x] 91% ImGui::ErrorRecoveryTryToRecoverState imgui.lua:20463 + [x] 91% ImGui::ErrorRecoveryTryToRecoverWindowState imgui.lua:20492 + [x] 86% ImGui::ErrorLog imgui.lua:20590 + [x] 90% ImGui::ErrorCheckEndFrameFinalizeErrorTooltip imgui.lua:20634 + [x] 77% ImGui::BeginErrorTooltip imgui.lua:20682 + [x] 100% ImGui::EndErrorTooltip imgui.lua:20704 -- ITEM SUBMISSION [x] 100% ImGui::KeepAliveID imgui.lua:6436 @@ -527,126 +527,126 @@ imgui.cpp [x] 91% ImGui::EndGroup imgui.lua:7042 -- SCROLLING - [x] 100% CalcScrollEdgeSnap imgui.lua:15469 - [x] 89% CalcNextScrollFromScrollTargetAndClamp imgui.lua:15480 - [x] 78% ImGui::ScrollToItem imgui.lua:15606 - [x] 86% ImGui::ScrollToRect imgui.lua:15614 - [x] 88% ImGui::ScrollToRectEx imgui.lua:15512 - [x] 74% ImGui::GetScrollX imgui.lua:15597 - [x] 74% ImGui::GetScrollY imgui.lua:15601 - [x] 74% ImGui::GetScrollMaxX imgui.lua:15593 - [x] 100% ImGui::GetScrollMaxY imgui.lua:15588 - [x] 75% ImGui::SetScrollX imgui.lua:15649 - [x] 75% ImGui::SetScrollY imgui.lua:15658 - [x] 78% ImGui::SetScrollFromPosX imgui.lua:15678 - [x] 78% ImGui::SetScrollFromPosY imgui.lua:15690 - [x] 95% ImGui::SetScrollHereX imgui.lua:15620 - [x] 95% ImGui::SetScrollHereY imgui.lua:15634 + [x] 100% CalcScrollEdgeSnap imgui.lua:15474 + [x] 89% CalcNextScrollFromScrollTargetAndClamp imgui.lua:15485 + [x] 78% ImGui::ScrollToItem imgui.lua:15611 + [x] 86% ImGui::ScrollToRect imgui.lua:15619 + [x] 88% ImGui::ScrollToRectEx imgui.lua:15517 + [x] 74% ImGui::GetScrollX imgui.lua:15602 + [x] 74% ImGui::GetScrollY imgui.lua:15606 + [x] 74% ImGui::GetScrollMaxX imgui.lua:15598 + [x] 100% ImGui::GetScrollMaxY imgui.lua:15593 + [x] 75% ImGui::SetScrollX imgui.lua:15654 + [x] 75% ImGui::SetScrollY imgui.lua:15663 + [x] 78% ImGui::SetScrollFromPosX imgui.lua:15683 + [x] 78% ImGui::SetScrollFromPosY imgui.lua:15695 + [x] 95% ImGui::SetScrollHereX imgui.lua:15625 + [x] 95% ImGui::SetScrollHereY imgui.lua:15639 -- TOOLTIPS - [x] 100% ImGui::BeginTooltip imgui.lua:15758 - [x] 100% ImGui::BeginItemTooltip imgui.lua:15762 - [x] 83% ImGui::BeginTooltipEx imgui.lua:15705 - [x] 73% ImGui::EndTooltip imgui.lua:15769 - [x] 38% ImGui::SetTooltip imgui.lua:15776 - [x] 91% ImGui::SetTooltipV imgui.lua:15781 - [x] 19% ImGui::SetItemTooltip imgui.lua:15793 - [x] 84% ImGui::SetItemTooltipV imgui.lua:15797 + [x] 100% ImGui::BeginTooltip imgui.lua:15763 + [x] 100% ImGui::BeginItemTooltip imgui.lua:15767 + [x] 83% ImGui::BeginTooltipEx imgui.lua:15710 + [x] 73% ImGui::EndTooltip imgui.lua:15774 + [x] 38% ImGui::SetTooltip imgui.lua:15781 + [x] 91% ImGui::SetTooltipV imgui.lua:15786 + [x] 19% ImGui::SetItemTooltip imgui.lua:15798 + [x] 84% ImGui::SetItemTooltipV imgui.lua:15802 -- POPUPS - [x] 73% ImGui::IsPopupOpen imgui.lua:11900 - [x] 82% ImGui::GetTopMostPopupModal imgui.lua:11935 - [x] 81% ImGui::GetTopMostAndVisiblePopupModal imgui.lua:19516 - [x] 79% ImGui::FindBlockingModal imgui.lua:15821 - [x] 26% ImGui::OpenPopup imgui.lua:15854 - [x] 86% ImGui::OpenPopupEx imgui.lua:15875 - [x] 73% ImGui::ClosePopupsOverWindow imgui.lua:15938 - [x] 80% ImGui::ClosePopupsExceptModals imgui.lua:19582 - [x] 62% ImGui::ClosePopupToLevel imgui.lua:15996 - [x] 81% ImGui::CloseCurrentPopup imgui.lua:16032 - [x] 81% ImGui::BeginPopupEx imgui.lua:16072 - [x] 80% ImGui::BeginPopupMenuEx imgui.lua:16095 - [x] 83% ImGui::BeginPopup imgui.lua:16121 - [x] 83% ImGui::BeginPopupModal imgui.lua:19600 - [x] 95% ImGui::EndPopup imgui.lua:16134 - [x] 38% ImGui::GetMouseButtonFromPopupFlags imgui.lua:16355 - [x] 94% ImGui::IsPopupOpenRequestForItem imgui.lua:16367 - [x] 85% ImGui::IsPopupOpenRequestForWindow imgui.lua:19630 - [x] 83% ImGui::OpenPopupOnItemClick imgui.lua:16384 - [x] 83% ImGui::BeginPopupContextItem imgui.lua:16418 - [x] 85% ImGui::BeginPopupContextWindow imgui.lua:19644 - [x] 88% ImGui::BeginPopupContextVoid imgui.lua:19654 - [x] 87% ImGui::FindBestWindowPosForPopupEx imgui.lua:16171 - [x] 87% ImGui::GetPopupAllowedExtentRect imgui.lua:16264 - [x] 92% ImGui::FindBestWindowPosForPopup imgui.lua:16287 + [x] 73% ImGui::IsPopupOpen imgui.lua:11907 + [x] 82% ImGui::GetTopMostPopupModal imgui.lua:11942 + [x] 81% ImGui::GetTopMostAndVisiblePopupModal imgui.lua:19522 + [x] 79% ImGui::FindBlockingModal imgui.lua:15826 + [x] 26% ImGui::OpenPopup imgui.lua:15859 + [x] 86% ImGui::OpenPopupEx imgui.lua:15880 + [x] 73% ImGui::ClosePopupsOverWindow imgui.lua:15943 + [x] 80% ImGui::ClosePopupsExceptModals imgui.lua:19588 + [x] 62% ImGui::ClosePopupToLevel imgui.lua:16001 + [x] 81% ImGui::CloseCurrentPopup imgui.lua:16037 + [x] 81% ImGui::BeginPopupEx imgui.lua:16077 + [x] 80% ImGui::BeginPopupMenuEx imgui.lua:16100 + [x] 83% ImGui::BeginPopup imgui.lua:16126 + [x] 83% ImGui::BeginPopupModal imgui.lua:19606 + [x] 95% ImGui::EndPopup imgui.lua:16139 + [x] 38% ImGui::GetMouseButtonFromPopupFlags imgui.lua:16360 + [x] 94% ImGui::IsPopupOpenRequestForItem imgui.lua:16372 + [x] 85% ImGui::IsPopupOpenRequestForWindow imgui.lua:19636 + [x] 83% ImGui::OpenPopupOnItemClick imgui.lua:16389 + [x] 83% ImGui::BeginPopupContextItem imgui.lua:16423 + [x] 85% ImGui::BeginPopupContextWindow imgui.lua:19650 + [x] 88% ImGui::BeginPopupContextVoid imgui.lua:19660 + [x] 87% ImGui::FindBestWindowPosForPopupEx imgui.lua:16176 + [x] 87% ImGui::GetPopupAllowedExtentRect imgui.lua:16269 + [x] 92% ImGui::FindBestWindowPosForPopup imgui.lua:16292 -- WINDOW FOCUS - [x] 51% ImGui::SetWindowFocus imgui.lua:11371 - [x] 71% ImGui::SetNextWindowFocus imgui.lua:11760 - [x] 87% ImGui::IsWindowFocused imgui.lua:15401 + [x] 51% ImGui::SetWindowFocus imgui.lua:11378 + [x] 71% ImGui::SetNextWindowFocus imgui.lua:11767 + [x] 87% ImGui::IsWindowFocused imgui.lua:15406 [x] 94% ImGui::FindWindowFocusIndex imgui.lua:7406 [x] 81% ImGui::UpdateWindowInFocusOrderList imgui.lua:7441 [x] 82% ImGui::BringWindowToFocusFront imgui.lua:7466 [x] 56% ImGui::BringWindowToDisplayFront imgui.lua:7492 - [x] 54% ImGui::BringWindowToDisplayBack imgui.lua:19490 - [x] 35% ImGui::BringWindowToDisplayBehind imgui.lua:7513 - [x] 41% ImGui::FindWindowDisplayIndex imgui.lua:19484 + [x] 54% ImGui::BringWindowToDisplayBack imgui.lua:19496 + [x] 58% ImGui::BringWindowToDisplayBehind imgui.lua:7513 + [x] 41% ImGui::FindWindowDisplayIndex imgui.lua:19490 [x] 87% ImGui::FocusWindow imgui.lua:7327 - [x] 84% ImGui::FocusTopMostWindowUnderOne imgui.lua:7525 + [x] 84% ImGui::FocusTopMostWindowUnderOne imgui.lua:7534 -- KEYBOARD/GAMEPAD NAVIGATION - [x] 93% ImGui::SetNavCursorVisible imgui.lua:19735 - [x] 94% ImGui::SetNavCursorVisibleAfterMove imgui.lua:16540 - [x] 80% ImGui::SetNavWindow imgui.lua:16556 - [x] 100% ImGui::NavHighlightActivated imgui.lua:16636 - [x] 100% ImGui::NavClearPreferredPosForAxis imgui.lua:16570 - [x] 95% ImGui::SetNavID imgui.lua:16579 - [x] 96% ImGui::SetFocusID imgui.lua:7565 - [x] 90% ImGetDirQuadrantFromDelta imgui.lua:17606 - [x] 100% NavScoreItemDistInterval imgui.lua:17613 - [x] 77% ImGui::NavScoreItem imgui.lua:17627 - [x] 93% ImGui::NavApplyItemToResult imgui.lua:17733 - [x] 100% ImGui::NavUpdateCurrentWindowIsScrollPushableX imgui.lua:18062 - [x] 94% ImGui::NavProcessItem imgui.lua:17825 - [x] 90% ImGui::NavProcessItemForTabbingRequest imgui.lua:17765 - [x] 100% ImGui::NavMoveRequestButNoResultYet imgui.lua:17601 - [x] 89% ImGui::NavMoveRequestSubmit imgui.lua:17079 - [x] 92% ImGui::NavMoveRequestResolveWithLastItem imgui.lua:17748 - [x] 92% ImGui::NavMoveRequestResolveWithPastTreeNode imgui.lua:18071 - [x] 93% ImGui::NavMoveRequestCancel imgui.lua:18082 - [x] 95% ImGui::NavMoveRequestForward imgui.lua:18094 - [x] 78% ImGui::NavMoveRequestTryWrapping imgui.lua:18109 - [x] 93% ImGui::NavSaveLastChildNavWindowIntoParent imgui.lua:16597 - [x] 57% ImGui::NavRestoreLastChildNavWindow imgui.lua:16610 - [x] 86% ImGui::NavRestoreLayer imgui.lua:16618 - [x] 100% ImGui::NavUpdateAnyRequestFlag imgui.lua:16642 - [x] 88% ImGui::NavInitWindow imgui.lua:16653 - [x] 97% ImGui::NavCalcPreferredRefPosSource imgui.lua:16685 - [x] 94% ImGui::NavCalcPreferredRefPos imgui.lua:16704 - [x] 91% ImGui::GetNavTweakPressedAmount imgui.lua:16746 - [x] 85% ImGui::NavUpdate imgui.lua:17348 - [x] 90% ImGui::NavInitRequestApplyResult imgui.lua:17899 - [x] 81% NavBiasScoringRect imgui.lua:17108 - [x] 83% ImGui::NavUpdateCreateMoveRequest imgui.lua:17209 - [x] 87% ImGui::NavUpdateCreateTabbingRequest imgui.lua:17319 - [x] 86% ImGui::NavMoveRequestApplyResult imgui.lua:17931 - [x] 91% ImGui::NavUpdateCancelRequest imgui.lua:17556 - [x] 83% ImGui::NavUpdateContextMenuRequest imgui.lua:17044 - [x] 90% ImGui::NavUpdatePageUpPageDown imgui.lua:17140 - [x] 81% ImGui::NavEndFrame imgui.lua:19870 - [x] 83% ImGui::NavUpdateCreateWrappingRequest imgui.lua:19814 + [x] 93% ImGui::SetNavCursorVisible imgui.lua:19741 + [x] 94% ImGui::SetNavCursorVisibleAfterMove imgui.lua:16545 + [x] 80% ImGui::SetNavWindow imgui.lua:16561 + [x] 100% ImGui::NavHighlightActivated imgui.lua:16641 + [x] 100% ImGui::NavClearPreferredPosForAxis imgui.lua:16575 + [x] 95% ImGui::SetNavID imgui.lua:16584 + [x] 96% ImGui::SetFocusID imgui.lua:7574 + [x] 90% ImGetDirQuadrantFromDelta imgui.lua:17611 + [x] 100% NavScoreItemDistInterval imgui.lua:17618 + [x] 77% ImGui::NavScoreItem imgui.lua:17632 + [x] 93% ImGui::NavApplyItemToResult imgui.lua:17738 + [x] 100% ImGui::NavUpdateCurrentWindowIsScrollPushableX imgui.lua:18067 + [x] 94% ImGui::NavProcessItem imgui.lua:17830 + [x] 90% ImGui::NavProcessItemForTabbingRequest imgui.lua:17770 + [x] 100% ImGui::NavMoveRequestButNoResultYet imgui.lua:17606 + [x] 89% ImGui::NavMoveRequestSubmit imgui.lua:17084 + [x] 92% ImGui::NavMoveRequestResolveWithLastItem imgui.lua:17753 + [x] 92% ImGui::NavMoveRequestResolveWithPastTreeNode imgui.lua:18076 + [x] 93% ImGui::NavMoveRequestCancel imgui.lua:18087 + [x] 95% ImGui::NavMoveRequestForward imgui.lua:18099 + [x] 78% ImGui::NavMoveRequestTryWrapping imgui.lua:18114 + [x] 93% ImGui::NavSaveLastChildNavWindowIntoParent imgui.lua:16602 + [x] 57% ImGui::NavRestoreLastChildNavWindow imgui.lua:16615 + [x] 86% ImGui::NavRestoreLayer imgui.lua:16623 + [x] 100% ImGui::NavUpdateAnyRequestFlag imgui.lua:16647 + [x] 88% ImGui::NavInitWindow imgui.lua:16658 + [x] 97% ImGui::NavCalcPreferredRefPosSource imgui.lua:16690 + [x] 94% ImGui::NavCalcPreferredRefPos imgui.lua:16709 + [x] 91% ImGui::GetNavTweakPressedAmount imgui.lua:16751 + [x] 85% ImGui::NavUpdate imgui.lua:17353 + [x] 90% ImGui::NavInitRequestApplyResult imgui.lua:17904 + [x] 81% NavBiasScoringRect imgui.lua:17113 + [x] 83% ImGui::NavUpdateCreateMoveRequest imgui.lua:17214 + [x] 87% ImGui::NavUpdateCreateTabbingRequest imgui.lua:17324 + [x] 86% ImGui::NavMoveRequestApplyResult imgui.lua:17936 + [x] 91% ImGui::NavUpdateCancelRequest imgui.lua:17561 + [x] 83% ImGui::NavUpdateContextMenuRequest imgui.lua:17049 + [x] 90% ImGui::NavUpdatePageUpPageDown imgui.lua:17145 + [x] 81% ImGui::NavEndFrame imgui.lua:19876 + [x] 83% ImGui::NavUpdateCreateWrappingRequest imgui.lua:19820 [x] 85% ImGui::IsWindowNavFocusable imgui.lua:7420 [x] 67% FindWindowNavFocusable imgui.lua:7428 - [x] 86% NavUpdateWindowingTarget imgui.lua:16774 - [x] 92% ImGui::NavUpdateWindowingApplyFocus imgui.lua:16797 - [x] 88% ImGui::NavUpdateWindowing imgui.lua:16835 - [x] 67% GetFallbackWindowNameForWindowingList imgui.lua:19771 - [x] 84% ImGui::NavUpdateWindowingOverlay imgui.lua:19785 + [x] 86% NavUpdateWindowingTarget imgui.lua:16779 + [x] 92% ImGui::NavUpdateWindowingApplyFocus imgui.lua:16802 + [x] 88% ImGui::NavUpdateWindowing imgui.lua:16840 + [x] 67% GetFallbackWindowNameForWindowingList imgui.lua:19777 + [x] 84% ImGui::NavUpdateWindowingOverlay imgui.lua:19791 -- DRAG AND DROP [x] 55% ImGui::IsDragDropActive imgui.lua:546 [x] 73% ImGui::ClearDragDrop imgui.lua:550 - [x] 82% ImGui::BeginTooltipHidden imgui.lua:19667 + [x] 82% ImGui::BeginTooltipHidden imgui.lua:19673 [x] 88% ImGui::BeginDragDropSource imgui.lua:568 [x] 86% ImGui::EndDragDropSource imgui.lua:669 [x] 62% ImGui::SetDragDropPayload imgui.lua:686 @@ -699,38 +699,38 @@ imgui.cpp [x] 80% WindowSettingsHandler_WriteAll imgui.lua:6188 -- LOCALIZATION - [x] 84% ImGui::LocalizeRegisterEntries imgui.lua:18135 + [x] 84% ImGui::LocalizeRegisterEntries imgui.lua:18140 -- VIEWPORTS, PLATFORM WINDOWS - [x] 83% ImGuiViewport::GetDebugName imgui.lua:18169 - [x] 76% ImGuiPlatformIO::ClearPlatformHandlers imgui.lua:18174 - [x] 69% ImGuiPlatformIO::ClearRendererHandlers imgui.lua:18189 - [x] 78% ImGui::GetMainViewport imgui.lua:18198 - [x] 88% ImGui::FindViewportByID imgui.lua:18207 - [x] 88% ImGui::FindViewportByPlatformHandle imgui.lua:18219 - [x] 98% ImGui::SetCurrentViewport imgui.lua:18231 - [x] 99% ImGui::SetWindowViewport imgui.lua:18259 - [x] 86% ImGui::GetWindowAlwaysWantOwnViewport imgui.lua:18272 - [x] 86% IsViewportAbove imgui.lua:18294 - [x] 89% ImGui::UpdateTryMergeWindowIntoHostViewport imgui.lua:18319 - [x] 83% ImGui::UpdateTryMergeWindowIntoHostViewports imgui.lua:18379 - [x] 88% ImGui::TranslateWindowsInViewport imgui.lua:18391 - [x] 94% ImGui::ScaleWindowsInViewport imgui.lua:15441 - [x] 85% ImGui::FindHoveredViewportFromPlatformWindowStack imgui.lua:18417 - [x] 87% ImGui::UpdateViewportsNewFrame imgui.lua:18434 - [x] 78% ImGui::UpdateViewportsEndFrame imgui.lua:18721 - [x] 84% ImGui::AddUpdateViewport imgui.lua:18755 - [x] 80% ImGui::DestroyViewport imgui.lua:18842 - [x] 93% ImGui::WindowSelectViewport imgui.lua:18868 - [x] 74% ImGui::WindowSyncOwnedViewport imgui.lua:18994 - [x] 88% ImGui::UpdatePlatformWindows imgui.lua:19100 - [x] 85% ImGui::RenderPlatformWindowsDefault imgui.lua:19218 - [x] 87% ImGui::FindPlatformMonitorForPos imgui.lua:19250 - [x] 78% ImGui::FindPlatformMonitorForRect imgui.lua:19266 - [x] 93% ImGui::UpdateViewportPlatformMonitor imgui.lua:19307 - [x] 89% ImGui::GetViewportPlatformMonitor imgui.lua:19314 - [x] 97% ImGui::DestroyPlatformWindow imgui.lua:19326 - [x] 77% ImGui::DestroyPlatformWindows imgui.lua:19352 + [x] 83% ImGuiViewport::GetDebugName imgui.lua:18174 + [x] 76% ImGuiPlatformIO::ClearPlatformHandlers imgui.lua:18179 + [x] 69% ImGuiPlatformIO::ClearRendererHandlers imgui.lua:18194 + [x] 78% ImGui::GetMainViewport imgui.lua:18203 + [x] 88% ImGui::FindViewportByID imgui.lua:18212 + [x] 88% ImGui::FindViewportByPlatformHandle imgui.lua:18224 + [x] 98% ImGui::SetCurrentViewport imgui.lua:18236 + [x] 99% ImGui::SetWindowViewport imgui.lua:18264 + [x] 86% ImGui::GetWindowAlwaysWantOwnViewport imgui.lua:18277 + [x] 86% IsViewportAbove imgui.lua:18299 + [x] 89% ImGui::UpdateTryMergeWindowIntoHostViewport imgui.lua:18324 + [x] 83% ImGui::UpdateTryMergeWindowIntoHostViewports imgui.lua:18384 + [x] 88% ImGui::TranslateWindowsInViewport imgui.lua:18396 + [x] 94% ImGui::ScaleWindowsInViewport imgui.lua:15446 + [x] 85% ImGui::FindHoveredViewportFromPlatformWindowStack imgui.lua:18422 + [x] 87% ImGui::UpdateViewportsNewFrame imgui.lua:18439 + [x] 78% ImGui::UpdateViewportsEndFrame imgui.lua:18726 + [x] 84% ImGui::AddUpdateViewport imgui.lua:18760 + [x] 80% ImGui::DestroyViewport imgui.lua:18847 + [x] 93% ImGui::WindowSelectViewport imgui.lua:18873 + [x] 74% ImGui::WindowSyncOwnedViewport imgui.lua:18999 + [x] 88% ImGui::UpdatePlatformWindows imgui.lua:19105 + [x] 85% ImGui::RenderPlatformWindowsDefault imgui.lua:19223 + [x] 87% ImGui::FindPlatformMonitorForPos imgui.lua:19255 + [x] 78% ImGui::FindPlatformMonitorForRect imgui.lua:19271 + [x] 93% ImGui::UpdateViewportPlatformMonitor imgui.lua:19312 + [x] 89% ImGui::GetViewportPlatformMonitor imgui.lua:19319 + [x] 97% ImGui::DestroyPlatformWindow imgui.lua:19331 + [x] 77% ImGui::DestroyPlatformWindows imgui.lua:19357 -- DOCKING [x] 61% ImGuiDockRequest::ImGuiDockRequest imgui.lua:1040 @@ -847,423 +847,423 @@ imgui.cpp [x] 40% InitializeDefaultPlatformHandlers imgui.lua:5680 -- METRICS/DEBUGGER WINDOW - [x] 97% MetricsHelpMarker imgui.lua:20734 = MetricsHelpMarker - [x] 93% ImGui::DebugRenderViewportThumbnail imgui.lua:19375 - [x] 92% RenderViewportsThumbnails imgui.lua:19414 - [x] 54% ViewportComparerByLastFocusedStampCount imgui.lua:20741 - [x] 91% ImGui::DebugRenderKeyboardPreview imgui.lua:20747 - [x] 52% ImGui::DebugTextEncoding imgui.lua:22026 - [x] 95% DebugFlashStyleColorStop imgui.lua:20795 - [x] 94% ImGui::DebugFlashStyleColor imgui.lua:20805 - [x] 49% ImGui::UpdateDebugToolFlashStyleColor imgui.lua:20813 - [~] 12% ImGui::DebugTextureIDToU64 imgui.lua:20830 stub - [x] 37% FormatTextureRefForDebugDisplay imgui.lua:20836 - [x] 52% ImGui::ShowFontAtlas imgui.lua:21094 - [x] 85% ImGui::DebugNodeTexture imgui.lua:21061 - [x] 50% ImGui::ShowMetricsWindow imgui.lua:22091 - [x] 100% ImGui::DebugBreakClearData imgui.lua:22556 - [x] 81% ImGui::DebugBreakButtonTooltip imgui.lua:22566 - [x] 81% ImGui::DebugBreakButton imgui.lua:22583 - [x] 87% ImGui::DebugNodeColumns imgui.lua:21590 - [x] 48% DebugNodeDockNodeFlags imgui.lua:21842 - [x] 79% ImGui::DebugNodeDockNode imgui.lua:21859 - [x] 70% ImGui::DebugNodeDrawList imgui.lua:21613 - [x] 74% ImGui::DebugNodeDrawCmdShowMeshAndBoundingBox imgui.lua:21713 - [x] 63% CalcFontGlyphSrcOverlapMask imgui.lua:20937 - [x] 69% ImGui::DebugNodeFont imgui.lua:20951 - [x] 59% ImGui::DebugNodeFontGlyphsForSrcMask imgui.lua:20880 - [x] 89% ImGui::DebugNodeFontGlyph imgui.lua:20866 - [x] 37% ImGui::DebugNodeStorage imgui.lua:21600 - [x] 69% ImGui::DebugNodeTabBar imgui.lua:21745 - [x] 62% ImGui::DebugNodeViewport imgui.lua:21998 - [x] 100% ImGui::DebugNodePlatformMonitor imgui.lua:22018 - [x] 72% ImGui::DebugNodeWindow imgui.lua:21903 - [x] 87% ImGui::DebugNodeWindowSettings imgui.lua:21967 - [x] 73% ImGui::DebugNodeWindowsList imgui.lua:21973 - [x] 67% ImGui::DebugNodeWindowsListByBeginStackParent imgui.lua:21984 + [x] 97% MetricsHelpMarker imgui.lua:20740 = MetricsHelpMarker + [x] 93% ImGui::DebugRenderViewportThumbnail imgui.lua:19380 + [x] 92% RenderViewportsThumbnails imgui.lua:19419 + [x] 54% ViewportComparerByLastFocusedStampCount imgui.lua:20747 + [x] 91% ImGui::DebugRenderKeyboardPreview imgui.lua:20753 + [x] 52% ImGui::DebugTextEncoding imgui.lua:22032 + [x] 95% DebugFlashStyleColorStop imgui.lua:20801 + [x] 94% ImGui::DebugFlashStyleColor imgui.lua:20811 + [x] 49% ImGui::UpdateDebugToolFlashStyleColor imgui.lua:20819 + [~] 12% ImGui::DebugTextureIDToU64 imgui.lua:20836 stub + [x] 37% FormatTextureRefForDebugDisplay imgui.lua:20842 + [x] 52% ImGui::ShowFontAtlas imgui.lua:21100 + [x] 85% ImGui::DebugNodeTexture imgui.lua:21067 + [x] 50% ImGui::ShowMetricsWindow imgui.lua:22097 + [x] 100% ImGui::DebugBreakClearData imgui.lua:22563 + [x] 81% ImGui::DebugBreakButtonTooltip imgui.lua:22573 + [x] 81% ImGui::DebugBreakButton imgui.lua:22590 + [x] 87% ImGui::DebugNodeColumns imgui.lua:21596 + [x] 48% DebugNodeDockNodeFlags imgui.lua:21848 + [x] 79% ImGui::DebugNodeDockNode imgui.lua:21865 + [x] 70% ImGui::DebugNodeDrawList imgui.lua:21619 + [x] 74% ImGui::DebugNodeDrawCmdShowMeshAndBoundingBox imgui.lua:21719 + [x] 63% CalcFontGlyphSrcOverlapMask imgui.lua:20943 + [x] 69% ImGui::DebugNodeFont imgui.lua:20957 + [x] 59% ImGui::DebugNodeFontGlyphsForSrcMask imgui.lua:20886 + [x] 89% ImGui::DebugNodeFontGlyph imgui.lua:20872 + [x] 37% ImGui::DebugNodeStorage imgui.lua:21606 + [x] 69% ImGui::DebugNodeTabBar imgui.lua:21751 + [x] 62% ImGui::DebugNodeViewport imgui.lua:22004 + [x] 100% ImGui::DebugNodePlatformMonitor imgui.lua:22024 + [x] 72% ImGui::DebugNodeWindow imgui.lua:21909 + [x] 87% ImGui::DebugNodeWindowSettings imgui.lua:21973 + [x] 73% ImGui::DebugNodeWindowsList imgui.lua:21979 + [x] 67% ImGui::DebugNodeWindowsListByBeginStackParent imgui.lua:21990 -- DEBUG LOG WINDOW - [x] 38% ImGui::DebugLog imgui.lua:20556 - [x] 34% ImGui::DebugLogV imgui.lua:20561 - [x] 93% SameLineOrWrap imgui.lua:21166 - [x] 61% ShowDebugLogFlag imgui.lua:21173 - [x] 65% ImGui::ShowDebugLogWindow imgui.lua:21186 - [x] 61% ImGui::DebugTextUnformattedWithLocateItem imgui.lua:21243 + [x] 38% ImGui::DebugLog imgui.lua:20562 + [x] 34% ImGui::DebugLogV imgui.lua:20567 + [x] 93% SameLineOrWrap imgui.lua:21172 + [x] 61% ShowDebugLogFlag imgui.lua:21179 + [x] 65% ImGui::ShowDebugLogWindow imgui.lua:21192 + [x] 61% ImGui::DebugTextUnformattedWithLocateItem imgui.lua:21249 -- OTHER DEBUG TOOLS (ITEM PICKER, ID STACK TOOL) - [x] 88% ImGui::DebugDrawCursorPos imgui.lua:21276 - [x] 90% ImGui::DebugDrawLineExtents imgui.lua:21287 - [x] 78% ImGui::DebugDrawItemRect imgui.lua:21301 - [x] 100% ImGui::DebugLocateItem imgui.lua:21312 - [x] 94% ImGui::DebugLocateItemOnHover imgui.lua:21321 - [x] 84% ImGui::DebugLocateItemResolveWithLastItem imgui.lua:21338 - [x] 100% ImGui::DebugStartItemPicker imgui.lua:21357 - [x] 88% ImGui::UpdateDebugToolItemPicker imgui.lua:21363 - [x] 75% DebugItemPathQuery_UpdateAndGetHookId imgui.lua:21406 - [x] 79% ImGui::UpdateDebugToolItemPathQuery imgui.lua:21435 - [x] 54% ImGui::DebugHookIdInfo imgui.lua:21447 - [x] 52% DebugItemPathQuery_FormatLevelInfo imgui.lua:21484 - [x] 32% DebugItemPathQuery_GetResultAsPath imgui.lua:21493 - [x] 80% ImGui::ShowIDStackToolWindow imgui.lua:21508 - [x] 78% ImGui::ShowFontSelector imgui.lua:20850 + [x] 88% ImGui::DebugDrawCursorPos imgui.lua:21282 + [x] 90% ImGui::DebugDrawLineExtents imgui.lua:21293 + [x] 78% ImGui::DebugDrawItemRect imgui.lua:21307 + [x] 100% ImGui::DebugLocateItem imgui.lua:21318 + [x] 94% ImGui::DebugLocateItemOnHover imgui.lua:21327 + [x] 84% ImGui::DebugLocateItemResolveWithLastItem imgui.lua:21344 + [x] 100% ImGui::DebugStartItemPicker imgui.lua:21363 + [x] 88% ImGui::UpdateDebugToolItemPicker imgui.lua:21369 + [x] 75% DebugItemPathQuery_UpdateAndGetHookId imgui.lua:21412 + [x] 79% ImGui::UpdateDebugToolItemPathQuery imgui.lua:21441 + [x] 54% ImGui::DebugHookIdInfo imgui.lua:21453 + [x] 52% DebugItemPathQuery_FormatLevelInfo imgui.lua:21490 + [x] 32% DebugItemPathQuery_GetResultAsPath imgui.lua:21499 + [x] 80% ImGui::ShowIDStackToolWindow imgui.lua:21514 + [x] 78% ImGui::ShowFontSelector imgui.lua:20856 ==================================================================================================== imgui_widgets.cpp ==================================================================================================== -- Widgets: Text, etc. - [x] 69% ImGui::TextEx imgui_widgets.lua:80 - [x] 100% ImGui::TextUnformatted imgui_widgets.lua:201 - [x] 29% ImGui::Text imgui_widgets.lua:222 - [x] 60% ImGui::TextV imgui_widgets.lua:208 - [x] 30% ImGui::TextColored imgui_widgets.lua:233 - [x] 83% ImGui::TextColoredV imgui_widgets.lua:7570 = ImGui . TextColored(...) - [x] 17% ImGui::TextDisabled imgui_widgets.lua:241 - [x] 89% ImGui::TextDisabledV imgui_widgets.lua:7571 = ImGui . TextDisabled(...) - [x] 10% ImGui::TextWrapped imgui_widgets.lua:250 - [x] 91% ImGui::TextWrappedV imgui_widgets.lua:7572 = ImGui . TextWrapped(...) - [x] 2% ImGui::TextAligned imgui_widgets.lua:269 - [x] 67% ImGui::TextAlignedV imgui_widgets.lua:7573 = ImGui . TextAligned(...) - [x] 4% ImGui::LabelText imgui_widgets.lua:305 - [x] 89% ImGui::LabelTextV imgui_widgets.lua:7574 = ImGui . LabelText(...) - [x] 2% ImGui::BulletText imgui_widgets.lua:340 - [x] 77% ImGui::BulletTextV imgui_widgets.lua:7575 = ImGui . BulletText(...) + [x] 69% ImGui::TextEx imgui_widgets.lua:85 + [x] 100% ImGui::TextUnformatted imgui_widgets.lua:206 + [x] 29% ImGui::Text imgui_widgets.lua:227 + [x] 60% ImGui::TextV imgui_widgets.lua:213 + [x] 30% ImGui::TextColored imgui_widgets.lua:238 + [x] 83% ImGui::TextColoredV imgui_widgets.lua:7662 = ImGui . TextColored(...) + [x] 17% ImGui::TextDisabled imgui_widgets.lua:246 + [x] 89% ImGui::TextDisabledV imgui_widgets.lua:7663 = ImGui . TextDisabled(...) + [x] 10% ImGui::TextWrapped imgui_widgets.lua:255 + [x] 91% ImGui::TextWrappedV imgui_widgets.lua:7664 = ImGui . TextWrapped(...) + [x] 2% ImGui::TextAligned imgui_widgets.lua:274 + [x] 67% ImGui::TextAlignedV imgui_widgets.lua:7665 = ImGui . TextAligned(...) + [x] 4% ImGui::LabelText imgui_widgets.lua:310 + [x] 89% ImGui::LabelTextV imgui_widgets.lua:7666 = ImGui . LabelText(...) + [x] 2% ImGui::BulletText imgui_widgets.lua:345 + [x] 77% ImGui::BulletTextV imgui_widgets.lua:7667 = ImGui . BulletText(...) -- Widgets: Main - [x] 85% ImGui::ButtonBehavior imgui_widgets.lua:488 - [x] 64% ImGui::ButtonEx imgui_widgets.lua:745 - [x] 100% ImGui::Button imgui_widgets.lua:807 - [x] 99% ImGui::SmallButton imgui_widgets.lua:814 - [x] 71% ImGui::InvisibleButton imgui_widgets.lua:828 - [x] 87% ImGui::ArrowButtonEx imgui_widgets.lua:859 - [x] 97% ImGui::ArrowButton imgui_widgets.lua:891 - [x] 80% ImGui::CloseButton imgui_widgets.lua:900 + [x] 85% ImGui::ButtonBehavior imgui_widgets.lua:493 + [x] 66% ImGui::ButtonEx imgui_widgets.lua:750 + [x] 100% ImGui::Button imgui_widgets.lua:813 + [x] 99% ImGui::SmallButton imgui_widgets.lua:820 + [x] 71% ImGui::InvisibleButton imgui_widgets.lua:834 + [x] 87% ImGui::ArrowButtonEx imgui_widgets.lua:865 + [x] 97% ImGui::ArrowButton imgui_widgets.lua:897 + [x] 80% ImGui::CloseButton imgui_widgets.lua:906 [x] 90% ImGui::CollapseButton imgui.lua:4592 - [x] 52% ImGui::GetWindowScrollbarID imgui_widgets.lua:950 - [x] 90% ImGui::GetWindowScrollbarRect imgui_widgets.lua:963 - [x] 99% ImGui::ExtendHitBoxWhenNearViewportEdge imgui_widgets.lua:986 - [x] 77% ImGui::Scrollbar imgui_widgets.lua:1163 - [x] 85% ImGui::ScrollbarEx imgui_widgets.lua:1014 - [x] 84% ImGui::ImageWithBg imgui_widgets.lua:1188 - [x] 28% ImGui::Image imgui_widgets.lua:1226 - [x] 92% ImGui::ImageButtonEx imgui_widgets.lua:1238 - [x] 98% ImGui::ImageButton imgui_widgets.lua:1282 - [x] 77% ImGui::Checkbox imgui_widgets.lua:1297 - [x] 79% ImGui::CheckboxFlagsT imgui_widgets.lua:1410 = ImGui . CheckboxFlags - [x] 7% ImGui::CheckboxFlags imgui_widgets.lua:1389 - [x] 5% ImGui::RadioButton imgui_widgets.lua:1484 - [x] 93% ImGui::ProgressBar imgui_widgets.lua:1496 - [x] 97% ImGui::Bullet imgui_widgets.lua:1559 - [x] 86% ImGui::TextLink imgui_widgets.lua:1586 - [x] 95% ImGui::TextLinkOpenURL imgui_widgets.lua:1641 + [x] 52% ImGui::GetWindowScrollbarID imgui_widgets.lua:956 + [x] 90% ImGui::GetWindowScrollbarRect imgui_widgets.lua:969 + [x] 99% ImGui::ExtendHitBoxWhenNearViewportEdge imgui_widgets.lua:992 + [x] 77% ImGui::Scrollbar imgui_widgets.lua:1169 + [x] 85% ImGui::ScrollbarEx imgui_widgets.lua:1020 + [x] 84% ImGui::ImageWithBg imgui_widgets.lua:1194 + [x] 28% ImGui::Image imgui_widgets.lua:1232 + [x] 92% ImGui::ImageButtonEx imgui_widgets.lua:1244 + [x] 98% ImGui::ImageButton imgui_widgets.lua:1288 + [x] 76% ImGui::Checkbox imgui_widgets.lua:1303 + [x] 79% ImGui::CheckboxFlagsT imgui_widgets.lua:1416 = ImGui . CheckboxFlags + [x] 7% ImGui::CheckboxFlags imgui_widgets.lua:1395 + [x] 5% ImGui::RadioButton imgui_widgets.lua:1490 + [x] 93% ImGui::ProgressBar imgui_widgets.lua:1502 + [x] 97% ImGui::Bullet imgui_widgets.lua:1565 + [x] 86% ImGui::TextLink imgui_widgets.lua:1592 + [x] 95% ImGui::TextLinkOpenURL imgui_widgets.lua:1647 -- Widgets: Low-level Layout helpers - [x] 82% ImGui::Spacing imgui_widgets.lua:1676 - [x] 62% ImGui::Dummy imgui_widgets.lua:1685 - [x] 96% ImGui::NewLine imgui_widgets.lua:1697 - [x] 100% ImGui::AlignTextToFramePadding imgui_widgets.lua:1717 - [x] 87% ImGui::SeparatorEx imgui_widgets.lua:1733 - [x] 87% ImGui::Separator imgui_widgets.lua:1802 - [x] 96% ImGui::SeparatorTextEx imgui_widgets.lua:1829 - [x] 100% ImGui::SeparatorText imgui_widgets.lua:1890 + [x] 82% ImGui::Spacing imgui_widgets.lua:1682 + [x] 62% ImGui::Dummy imgui_widgets.lua:1691 + [x] 96% ImGui::NewLine imgui_widgets.lua:1703 + [x] 100% ImGui::AlignTextToFramePadding imgui_widgets.lua:1723 + [x] 87% ImGui::SeparatorEx imgui_widgets.lua:1739 + [x] 87% ImGui::Separator imgui_widgets.lua:1808 + [x] 96% ImGui::SeparatorTextEx imgui_widgets.lua:1835 + [x] 100% ImGui::SeparatorText imgui_widgets.lua:1896 [x] 82% ImGui::SplitterBehavior imgui.lua:4626 - [x] 41% ShrinkWidthItemComparer imgui_widgets.lua:10844 - [x] 61% ImGui::ShrinkWidths imgui_widgets.lua:10852 + [x] 41% ShrinkWidthItemComparer imgui_widgets.lua:10936 + [x] 61% ImGui::ShrinkWidths imgui_widgets.lua:10944 -- Widgets: ComboBox - [x] 100% CalcMaxPopupHeightFromItemCount imgui_widgets.lua:1919 - [x] 84% ImGui::BeginCombo imgui_widgets.lua:1930 - [x] 86% ImGui::BeginComboPopup imgui_widgets.lua:2046 - [x] 73% ImGui::EndCombo imgui_widgets.lua:2119 - [x] 88% ImGui::BeginComboPreview imgui_widgets.lua:2139 - [x] 88% ImGui::EndComboPreview imgui_widgets.lua:2180 - [x] 36% Items_ArrayGetter imgui_widgets.lua:2209 - [x] 41% Items_SingleStringGetter imgui_widgets.lua:2214 - [x] 67% ImGui::Combo imgui_widgets.lua:2257 + [x] 100% CalcMaxPopupHeightFromItemCount imgui_widgets.lua:1925 + [x] 84% ImGui::BeginCombo imgui_widgets.lua:1936 + [x] 86% ImGui::BeginComboPopup imgui_widgets.lua:2052 + [x] 73% ImGui::EndCombo imgui_widgets.lua:2125 + [x] 88% ImGui::BeginComboPreview imgui_widgets.lua:2145 + [x] 88% ImGui::EndComboPreview imgui_widgets.lua:2186 + [x] 36% Items_ArrayGetter imgui_widgets.lua:2215 + [x] 41% Items_SingleStringGetter imgui_widgets.lua:2220 + [x] 67% ImGui::Combo imgui_widgets.lua:2263 -- Data Type and Data Formatting Helpers [Internal] - [x] 93% ImGui::DataTypeGetInfo imgui_widgets.lua:2357 - [x] 51% ImGui::DataTypeFormatString imgui_widgets.lua:2367 - [x] 65% ImGui::DataTypeApplyOp imgui_widgets.lua:2395 - [x] 69% ImGui::DataTypeApplyFromText imgui_widgets.lua:2460 - [x] 97% DataTypeCompareT imgui_widgets.lua:2521 - [x] 47% ImGui::DataTypeCompare imgui_widgets.lua:2530 - [x] 75% DataTypeClampT imgui_widgets.lua:2549 - [x] 42% ImGui::DataTypeClamp imgui_widgets.lua:2560 - [x] 93% ImGui::DataTypeIsZero imgui_widgets.lua:2576 - [x] 53% GetMinimumStepAtDecimalPrecision imgui_widgets.lua:2587 - [x] 56% ImGui::RoundScalarWithFormatT imgui_widgets.lua:2605 + [x] 93% ImGui::DataTypeGetInfo imgui_widgets.lua:2365 + [x] 11% ImGui::DataTypeFormatString imgui_widgets.lua:2423 + [x] 73% ImGui::DataTypeApplyOp imgui_widgets.lua:2434 + [x] 69% ImGui::DataTypeApplyFromText imgui_widgets.lua:2511 + [x] 97% DataTypeCompareT imgui_widgets.lua:2572 + [x] 52% ImGui::DataTypeCompare imgui_widgets.lua:2581 + [x] 75% DataTypeClampT imgui_widgets.lua:2602 + [x] 45% ImGui::DataTypeClamp imgui_widgets.lua:2613 + [x] 93% ImGui::DataTypeIsZero imgui_widgets.lua:2631 + [x] 53% GetMinimumStepAtDecimalPrecision imgui_widgets.lua:2642 + [x] 56% ImGui::RoundScalarWithFormatT imgui_widgets.lua:2660 -- Widgets: DragScalar, DragFloat, DragInt, etc. - [x] 85% ImGui::DragBehaviorT imgui_widgets.lua:3197 - [x] 95% ShortcutsForCancel imgui_widgets.lua:3344 - [x] 62% ImGui::DragBehavior imgui_widgets.lua:3365 - [x] 74% TempInputIsClampEnabled imgui_widgets.lua:3419 - [x] 75% ImGui::DragScalar imgui_widgets.lua:3462 - [x] 70% ImGui::DragScalarN imgui_widgets.lua:3605 - [x] 52% ImGui::DragFloat imgui_widgets.lua:3575 - [x] n/a ImGui::DragFloat2 imgui_widgets.lua:3655 = DragFloatN ( 2 ) - [x] n/a ImGui::DragFloat3 imgui_widgets.lua:3656 = DragFloatN ( 3 ) - [x] n/a ImGui::DragFloat4 imgui_widgets.lua:3657 = DragFloatN ( 4 ) - [x] 67% ImGui::DragFloatRange2 imgui_widgets.lua:3702 - [x] 52% ImGui::DragInt imgui_widgets.lua:3594 - [x] n/a ImGui::DragInt2 imgui_widgets.lua:3658 = DragIntN ( 2 ) - [x] n/a ImGui::DragInt3 imgui_widgets.lua:3659 = DragIntN ( 3 ) - [x] n/a ImGui::DragInt4 imgui_widgets.lua:3660 = DragIntN ( 4 ) - [x] 67% ImGui::DragIntRange2 imgui_widgets.lua:3706 + [x] 85% ImGui::DragBehaviorT imgui_widgets.lua:3252 + [x] 95% ShortcutsForCancel imgui_widgets.lua:3399 + [x] 65% ImGui::DragBehavior imgui_widgets.lua:3420 + [x] 74% TempInputIsClampEnabled imgui_widgets.lua:3478 + [x] 66% ImGui::DragScalar imgui_widgets.lua:3521 + [x] 70% ImGui::DragScalarN imgui_widgets.lua:3673 + [x] 52% ImGui::DragFloat imgui_widgets.lua:3643 + [x] n/a ImGui::DragFloat2 imgui_widgets.lua:3723 = DragFloatN ( 2 ) + [x] n/a ImGui::DragFloat3 imgui_widgets.lua:3724 = DragFloatN ( 3 ) + [x] n/a ImGui::DragFloat4 imgui_widgets.lua:3725 = DragFloatN ( 4 ) + [x] 67% ImGui::DragFloatRange2 imgui_widgets.lua:3770 + [x] 52% ImGui::DragInt imgui_widgets.lua:3662 + [x] n/a ImGui::DragInt2 imgui_widgets.lua:3726 = DragIntN ( 2 ) + [x] n/a ImGui::DragInt3 imgui_widgets.lua:3727 = DragIntN ( 3 ) + [x] n/a ImGui::DragInt4 imgui_widgets.lua:3728 = DragIntN ( 4 ) + [x] 67% ImGui::DragIntRange2 imgui_widgets.lua:3774 -- Widgets: SliderScalar, SliderFloat, SliderInt, etc. - [x] 89% ImGui::ScaleRatioFromValueT imgui_widgets.lua:3740 - [x] 89% ImGui::ScaleValueFromRatioT imgui_widgets.lua:3817 - [x] 85% ImGui::SliderBehaviorT imgui_widgets.lua:3905 - [x] 70% ImGui::SliderBehavior imgui_widgets.lua:4075 - [x] 72% ImGui::SliderScalar imgui_widgets.lua:4152 - [x] 74% ImGui::SliderScalarN imgui_widgets.lua:4267 - [x] 71% ImGui::SliderFloat imgui_widgets.lua:4343 - [x] 100% ImGui::SliderFloat2 imgui_widgets.lua:4313 - [x] 100% ImGui::SliderFloat3 imgui_widgets.lua:4323 - [x] 100% ImGui::SliderFloat4 imgui_widgets.lua:4333 - [x] 74% ImGui::SliderAngle imgui_widgets.lua:4358 - [x] 71% ImGui::SliderInt imgui_widgets.lua:4379 - [x] 95% ImGui::SliderInt2 imgui_widgets.lua:4386 - [x] 95% ImGui::SliderInt3 imgui_widgets.lua:4390 - [x] 95% ImGui::SliderInt4 imgui_widgets.lua:4394 - [x] 80% ImGui::VSliderScalar imgui_widgets.lua:4406 - [x] 84% ImGui::VSliderFloat imgui_widgets.lua:4482 - [x] 84% ImGui::VSliderInt imgui_widgets.lua:4495 + [x] 89% ImGui::ScaleRatioFromValueT imgui_widgets.lua:3808 + [x] 89% ImGui::ScaleValueFromRatioT imgui_widgets.lua:3885 + [x] 85% ImGui::SliderBehaviorT imgui_widgets.lua:3973 + [x] 77% ImGui::SliderBehavior imgui_widgets.lua:4143 + [x] 63% ImGui::SliderScalar imgui_widgets.lua:4226 + [x] 74% ImGui::SliderScalarN imgui_widgets.lua:4347 + [x] 71% ImGui::SliderFloat imgui_widgets.lua:4423 + [x] 100% ImGui::SliderFloat2 imgui_widgets.lua:4393 + [x] 100% ImGui::SliderFloat3 imgui_widgets.lua:4403 + [x] 100% ImGui::SliderFloat4 imgui_widgets.lua:4413 + [x] 74% ImGui::SliderAngle imgui_widgets.lua:4438 + [x] 71% ImGui::SliderInt imgui_widgets.lua:4459 + [x] 95% ImGui::SliderInt2 imgui_widgets.lua:4466 + [x] 95% ImGui::SliderInt3 imgui_widgets.lua:4470 + [x] 95% ImGui::SliderInt4 imgui_widgets.lua:4474 + [x] 62% ImGui::VSliderScalar imgui_widgets.lua:4486 + [x] 84% ImGui::VSliderFloat imgui_widgets.lua:4568 + [x] 84% ImGui::VSliderInt imgui_widgets.lua:4581 -- Widgets: InputScalar, InputFloat, InputInt, etc. - [x] 44% ImParseFormatFindStart imgui_widgets.lua:2649 - [x] 46% ImParseFormatFindEnd imgui_widgets.lua:2667 - [x] 55% ImParseFormatTrimDecorations imgui_widgets.lua:2694 - [x] 51% ImParseFormatSanitizeForPrinting imgui_widgets.lua:2713 - [x] 61% ImParseFormatSanitizeForScanning imgui_widgets.lua:2734 - [x] 41% ImAtoi imgui_widgets.lua:2764 - [x] 55% ImParseFormatPrecision imgui_widgets.lua:2789 - [x] 88% ImGui::TempInputText imgui_widgets.lua:2830 - [x] 70% ImGui::TempInputScalar imgui_widgets.lua:2874 - [x] 63% ImGui::SetNextItemRefVal imgui_widgets.lua:7579 - [x] 77% ImGui::InputScalar imgui_widgets.lua:2932 - [x] 71% ImGui::InputScalarN imgui_widgets.lua:3055 - [x] 65% ImGui::InputFloat imgui_widgets.lua:3143 - [x] 95% ImGui::InputFloat2 imgui_widgets.lua:3102 - [x] 84% ImGui::InputFloat3 imgui_widgets.lua:3096 - [x] 95% ImGui::InputFloat4 imgui_widgets.lua:3106 - [x] 66% ImGui::InputInt imgui_widgets.lua:3127 - [x] 100% ImGui::InputInt2 imgui_widgets.lua:3110 - [x] 100% ImGui::InputInt3 imgui_widgets.lua:3114 - [x] 100% ImGui::InputInt4 imgui_widgets.lua:3118 - [x] 65% ImGui::InputDouble imgui_widgets.lua:3157 + [x] 44% ImParseFormatFindStart imgui_widgets.lua:2704 + [x] 46% ImParseFormatFindEnd imgui_widgets.lua:2722 + [x] 55% ImParseFormatTrimDecorations imgui_widgets.lua:2749 + [x] 51% ImParseFormatSanitizeForPrinting imgui_widgets.lua:2768 + [x] 61% ImParseFormatSanitizeForScanning imgui_widgets.lua:2789 + [x] 41% ImAtoi imgui_widgets.lua:2819 + [x] 55% ImParseFormatPrecision imgui_widgets.lua:2844 + [x] 88% ImGui::TempInputText imgui_widgets.lua:2885 + [x] 70% ImGui::TempInputScalar imgui_widgets.lua:2929 + [x] 63% ImGui::SetNextItemRefVal imgui_widgets.lua:7671 + [x] 77% ImGui::InputScalar imgui_widgets.lua:2987 + [x] 71% ImGui::InputScalarN imgui_widgets.lua:3110 + [x] 65% ImGui::InputFloat imgui_widgets.lua:3198 + [x] 95% ImGui::InputFloat2 imgui_widgets.lua:3157 + [x] 84% ImGui::InputFloat3 imgui_widgets.lua:3151 + [x] 95% ImGui::InputFloat4 imgui_widgets.lua:3161 + [x] 66% ImGui::InputInt imgui_widgets.lua:3182 + [x] 100% ImGui::InputInt2 imgui_widgets.lua:3165 + [x] 100% ImGui::InputInt3 imgui_widgets.lua:3169 + [x] 100% ImGui::InputInt4 imgui_widgets.lua:3173 + [x] 65% ImGui::InputDouble imgui_widgets.lua:3212 -- Widgets: InputText, InputTextMultiline, InputTextWithHint - [x] 77% ImGui::InputText imgui_widgets.lua:4518 - [x] 80% ImGui::InputTextMultiline imgui_widgets.lua:4540 - [x] 77% ImGui::InputTextWithHint imgui_widgets.lua:6378 - [x] 87% InputTextCalcTextSize imgui_widgets.lua:4560 - [x] 100% STB_TEXTEDIT_STRINGLEN imgui_widgets.lua:4576 - [x] 88% STB_TEXTEDIT_GETCHAR imgui_widgets.lua:4580 - [x] 61% STB_TEXTEDIT_GETWIDTH imgui_widgets.lua:4586 - [x] 86% STB_TEXTEDIT_LAYOUTROW imgui_widgets.lua:4591 - [x] 79% IMSTB_TEXTEDIT_GETNEXTCHARINDEX_IMPL imgui_widgets.lua:4604 - [x] 70% IMSTB_TEXTEDIT_GETPREVCHARINDEX_IMPL imgui_widgets.lua:4613 - [x] 23% ImCharIsSeparatorW imgui_widgets.lua:4630 - [x] 66% is_word_boundary_from_right imgui_widgets.lua:4643 - [x] 65% is_word_boundary_from_left imgui_widgets.lua:4662 - [x] 71% STB_TEXTEDIT_MOVEWORDLEFT_IMPL imgui_widgets.lua:4680 - [x] 76% STB_TEXTEDIT_MOVEWORDRIGHT_MAC imgui_widgets.lua:4690 - [x] 76% STB_TEXTEDIT_MOVEWORDRIGHT_WIN imgui_widgets.lua:4701 - [x] 83% STB_TEXTEDIT_MOVEWORDRIGHT_IMPL imgui_widgets.lua:4712 - [x] 68% STB_TEXTEDIT_MOVELINESTART_IMPL imgui_widgets.lua:4725 - [x] 73% STB_TEXTEDIT_MOVELINEEND_IMPL imgui_widgets.lua:4764 - [x] 79% STB_TEXTEDIT_DELETECHARS imgui_widgets.lua:4797 - [x] 87% STB_TEXTEDIT_INSERTCHARS imgui_widgets.lua:4811 - [x] 81% stb_textedit_replace imgui_widgets.lua:4854 + [x] 77% ImGui::InputText imgui_widgets.lua:4604 + [x] 80% ImGui::InputTextMultiline imgui_widgets.lua:4626 + [x] 77% ImGui::InputTextWithHint imgui_widgets.lua:6470 + [x] 87% InputTextCalcTextSize imgui_widgets.lua:4646 + [x] 100% STB_TEXTEDIT_STRINGLEN imgui_widgets.lua:4662 + [x] 88% STB_TEXTEDIT_GETCHAR imgui_widgets.lua:4666 + [x] 61% STB_TEXTEDIT_GETWIDTH imgui_widgets.lua:4672 + [x] 86% STB_TEXTEDIT_LAYOUTROW imgui_widgets.lua:4677 + [x] 79% IMSTB_TEXTEDIT_GETNEXTCHARINDEX_IMPL imgui_widgets.lua:4690 + [x] 70% IMSTB_TEXTEDIT_GETPREVCHARINDEX_IMPL imgui_widgets.lua:4699 + [x] 23% ImCharIsSeparatorW imgui_widgets.lua:4716 + [x] 66% is_word_boundary_from_right imgui_widgets.lua:4729 + [x] 65% is_word_boundary_from_left imgui_widgets.lua:4748 + [x] 71% STB_TEXTEDIT_MOVEWORDLEFT_IMPL imgui_widgets.lua:4766 + [x] 76% STB_TEXTEDIT_MOVEWORDRIGHT_MAC imgui_widgets.lua:4776 + [x] 76% STB_TEXTEDIT_MOVEWORDRIGHT_WIN imgui_widgets.lua:4787 + [x] 83% STB_TEXTEDIT_MOVEWORDRIGHT_IMPL imgui_widgets.lua:4798 + [x] 68% STB_TEXTEDIT_MOVELINESTART_IMPL imgui_widgets.lua:4811 + [x] 73% STB_TEXTEDIT_MOVELINEEND_IMPL imgui_widgets.lua:4850 + [x] 79% STB_TEXTEDIT_DELETECHARS imgui_widgets.lua:4883 + [x] 87% STB_TEXTEDIT_INSERTCHARS imgui_widgets.lua:4897 + [x] 81% stb_textedit_replace imgui_widgets.lua:4940 [x] 10% ImGuiInputTextState::ImGuiInputTextState imgui_internal.lua:1811 [-] ImGuiInputTextState::~ImGuiInputTextState c++-only - [x] 93% ImGuiInputTextState::OnKeyPressed imgui_widgets.lua:4882 - [x] 63% ImGuiInputTextState::OnCharPressed imgui_widgets.lua:4897 - [x] 100% ImGuiInputTextState::CursorAnimReset imgui_widgets.lua:4909 - [x] 85% ImGuiInputTextState::CursorClamp imgui_widgets.lua:4911 - [x] 94% ImGuiInputTextState::HasSelection imgui_widgets.lua:4917 - [x] 85% ImGuiInputTextState::ClearSelection imgui_widgets.lua:4918 - [x] 100% ImGuiInputTextState::GetCursorPos imgui_widgets.lua:4920 - [x] 100% ImGuiInputTextState::GetSelectionStart imgui_widgets.lua:4921 - [x] 100% ImGuiInputTextState::GetSelectionEnd imgui_widgets.lua:4922 - [x] 84% ImGuiInputTextState::SetSelection imgui_widgets.lua:4923 - [x] 55% ImGuiInputTextState::GetPreferredOffsetX imgui_widgets.lua:4924 - [x] 74% ImGuiInputTextState::SelectAll imgui_widgets.lua:4926 - [x] 80% ImGuiInputTextState::ReloadUserBufAndSelectAll imgui_widgets.lua:4933 - [x] 93% ImGuiInputTextState::ReloadUserBufAndKeepSelection imgui_widgets.lua:4934 - [x] 84% ImGuiInputTextState::ReloadUserBufAndMoveToEnd imgui_widgets.lua:4935 - [x] 18% ImGuiInputTextCallbackData::ImGuiInputTextCallbackData imgui_h.lua:2530 - [x] 61% ImGuiInputTextCallbackData::DeleteChars imgui_h.lua:2534 - [x] 33% ImGuiInputTextCallbackData::InsertChars imgui_h.lua:2551 - [x] 92% ImGui::PushPasswordFont imgui_widgets.lua:4939 - [x] 98% ImGui::PopPasswordFont imgui_widgets.lua:4954 - [x] 79% InputTextFilterCharacter imgui_widgets.lua:4974 - [x] 74% InputTextReconcileUndoState imgui_widgets.lua:5112 - [x] 86% ImGui::InputTextDeactivateHook imgui_widgets.lua:5154 - [x] 74% ImLowerBound imgui_widgets.lua:5256 - [x] 55% InputTextLineIndexBuild imgui_widgets.lua:5188 - [x] 77% InputTextLineIndexGetPosOffset imgui_widgets.lua:5284 - [x] 87% ImGui::InputTextEx imgui_widgets.lua:5329 - [x] 78% ImGui::DebugNodeInputTextState imgui_widgets.lua:6387 + [x] 93% ImGuiInputTextState::OnKeyPressed imgui_widgets.lua:4968 + [x] 63% ImGuiInputTextState::OnCharPressed imgui_widgets.lua:4983 + [x] 100% ImGuiInputTextState::CursorAnimReset imgui_widgets.lua:4995 + [x] 85% ImGuiInputTextState::CursorClamp imgui_widgets.lua:4997 + [x] 94% ImGuiInputTextState::HasSelection imgui_widgets.lua:5003 + [x] 85% ImGuiInputTextState::ClearSelection imgui_widgets.lua:5004 + [x] 100% ImGuiInputTextState::GetCursorPos imgui_widgets.lua:5006 + [x] 100% ImGuiInputTextState::GetSelectionStart imgui_widgets.lua:5007 + [x] 100% ImGuiInputTextState::GetSelectionEnd imgui_widgets.lua:5008 + [x] 84% ImGuiInputTextState::SetSelection imgui_widgets.lua:5009 + [x] 55% ImGuiInputTextState::GetPreferredOffsetX imgui_widgets.lua:5010 + [x] 74% ImGuiInputTextState::SelectAll imgui_widgets.lua:5012 + [x] 80% ImGuiInputTextState::ReloadUserBufAndSelectAll imgui_widgets.lua:5019 + [x] 93% ImGuiInputTextState::ReloadUserBufAndKeepSelection imgui_widgets.lua:5020 + [x] 84% ImGuiInputTextState::ReloadUserBufAndMoveToEnd imgui_widgets.lua:5021 + [x] 18% ImGuiInputTextCallbackData::ImGuiInputTextCallbackData imgui_h.lua:2540 + [x] 61% ImGuiInputTextCallbackData::DeleteChars imgui_h.lua:2544 + [x] 33% ImGuiInputTextCallbackData::InsertChars imgui_h.lua:2561 + [x] 92% ImGui::PushPasswordFont imgui_widgets.lua:5025 + [x] 98% ImGui::PopPasswordFont imgui_widgets.lua:5040 + [x] 79% InputTextFilterCharacter imgui_widgets.lua:5060 + [x] 74% InputTextReconcileUndoState imgui_widgets.lua:5198 + [x] 86% ImGui::InputTextDeactivateHook imgui_widgets.lua:5240 + [x] 74% ImLowerBound imgui_widgets.lua:5342 + [x] 55% InputTextLineIndexBuild imgui_widgets.lua:5274 + [x] 77% InputTextLineIndexGetPosOffset imgui_widgets.lua:5370 + [x] 87% ImGui::InputTextEx imgui_widgets.lua:5415 + [x] 78% ImGui::DebugNodeInputTextState imgui_widgets.lua:6479 -- Widgets: ColorEdit, ColorPicker, ColorButton, etc. - [x] 54% ImGui::ColorEdit3 imgui_widgets.lua:6797 - [x] 88% ColorEditRestoreH imgui_widgets.lua:6443 - [x] 87% ColorEditRestoreHS imgui_widgets.lua:6460 - [x] 62% ImGui::ColorEdit4 imgui_widgets.lua:6503 - [x] 70% ImGui::ColorPicker3 imgui_widgets.lua:6805 - [x] 98% RenderArrowsForVerticalBar imgui_widgets.lua:6833 - [x] 80% ImGui::ColorPicker4 imgui_widgets.lua:6852 - [x] 85% ImGui::ColorButton imgui_widgets.lua:7279 + [x] 54% ImGui::ColorEdit3 imgui_widgets.lua:6889 + [x] 88% ColorEditRestoreH imgui_widgets.lua:6535 + [x] 87% ColorEditRestoreHS imgui_widgets.lua:6552 + [x] 62% ImGui::ColorEdit4 imgui_widgets.lua:6595 + [x] 70% ImGui::ColorPicker3 imgui_widgets.lua:6897 + [x] 98% RenderArrowsForVerticalBar imgui_widgets.lua:6925 + [x] 80% ImGui::ColorPicker4 imgui_widgets.lua:6944 + [x] 85% ImGui::ColorButton imgui_widgets.lua:7371 [-] ImGui::SetColorEditOptions obsolete - [x] 73% ImGui::ColorTooltip imgui_widgets.lua:7383 - [x] 72% ImGui::ColorEditOptionsPopup imgui_widgets.lua:7427 - [x] 75% ImGui::ColorPickerOptionsPopup imgui_widgets.lua:7503 + [x] 73% ImGui::ColorTooltip imgui_widgets.lua:7475 + [x] 72% ImGui::ColorEditOptionsPopup imgui_widgets.lua:7519 + [x] 75% ImGui::ColorPickerOptionsPopup imgui_widgets.lua:7595 -- Widgets: TreeNode, CollapsingHeader, etc. - [x] 78% ImGui::TreeNode imgui_widgets.lua:7588 - [x] 89% ImGui::TreeNodeV imgui_widgets.lua:7600 - [x] 69% ImGui::TreeNodeEx imgui_widgets.lua:7607 - [x] 68% ImGui::TreeNodeExV imgui_widgets.lua:7621 - [x] 73% ImGui::TreeNodeGetOpen imgui_widgets.lua:7634 - [x] 79% ImGui::TreeNodeSetOpen imgui_widgets.lua:7642 - [x] 82% ImGui::TreeNodeUpdateNextOpen imgui_widgets.lua:7650 - [x] 86% TreeNodeStoreStackData imgui_widgets.lua:7693 - [x] 82% ImGui::TreeNodeBehavior imgui_widgets.lua:7720 - [x] 91% ImGui::TreeNodeDrawLineToChildNode imgui_widgets.lua:8024 - [x] 98% ImGui::TreeNodeDrawLineToTreePop imgui_widgets.lua:8059 - [x] 67% ImGui::TreePush imgui_widgets.lua:8091 - [x] 74% ImGui::TreePushOverrideID imgui_widgets.lua:8099 - [x] 84% ImGui::TreePop imgui_widgets.lua:8107 - [x] 100% ImGui::GetTreeNodeToLabelSpacing imgui_widgets.lua:8156 - [x] 77% ImGui::SetNextItemOpen imgui_widgets.lua:8143 - [x] 85% ImGui::SetNextItemStorageID imgui_widgets.lua:8163 - [x] 81% ImGui::CollapsingHeader imgui_widgets.lua:8182 + [x] 78% ImGui::TreeNode imgui_widgets.lua:7680 + [x] 89% ImGui::TreeNodeV imgui_widgets.lua:7692 + [x] 69% ImGui::TreeNodeEx imgui_widgets.lua:7699 + [x] 68% ImGui::TreeNodeExV imgui_widgets.lua:7713 + [x] 73% ImGui::TreeNodeGetOpen imgui_widgets.lua:7726 + [x] 79% ImGui::TreeNodeSetOpen imgui_widgets.lua:7734 + [x] 82% ImGui::TreeNodeUpdateNextOpen imgui_widgets.lua:7742 + [x] 86% TreeNodeStoreStackData imgui_widgets.lua:7785 + [x] 82% ImGui::TreeNodeBehavior imgui_widgets.lua:7812 + [x] 91% ImGui::TreeNodeDrawLineToChildNode imgui_widgets.lua:8116 + [x] 98% ImGui::TreeNodeDrawLineToTreePop imgui_widgets.lua:8151 + [x] 67% ImGui::TreePush imgui_widgets.lua:8183 + [x] 74% ImGui::TreePushOverrideID imgui_widgets.lua:8191 + [x] 84% ImGui::TreePop imgui_widgets.lua:8199 + [x] 100% ImGui::GetTreeNodeToLabelSpacing imgui_widgets.lua:8248 + [x] 77% ImGui::SetNextItemOpen imgui_widgets.lua:8235 + [x] 85% ImGui::SetNextItemStorageID imgui_widgets.lua:8255 + [x] 81% ImGui::CollapsingHeader imgui_widgets.lua:8274 -- Widgets: Selectable - [x] 83% ImGui::Selectable imgui_widgets.lua:8239 + [x] 83% ImGui::Selectable imgui_widgets.lua:8331 -- Widgets: Typing-Select support - [x] 74% ImGui::GetTypingSelectRequest imgui_widgets.lua:8470 - [x] 48% ImStrimatchlen imgui_widgets.lua:8572 - [x] 95% ImGui::TypingSelectFindMatch imgui_widgets.lua:8595 - [x] 88% ImGui::TypingSelectFindNextSingleCharMatch imgui_widgets.lua:8612 - [x] 85% ImGui::TypingSelectFindBestLeadingMatch imgui_widgets.lua:8643 - [x] 86% ImGui::DebugNodeTypingSelectState imgui_widgets.lua:8661 + [x] 74% ImGui::GetTypingSelectRequest imgui_widgets.lua:8562 + [x] 48% ImStrimatchlen imgui_widgets.lua:8664 + [x] 95% ImGui::TypingSelectFindMatch imgui_widgets.lua:8687 + [x] 88% ImGui::TypingSelectFindNextSingleCharMatch imgui_widgets.lua:8704 + [x] 85% ImGui::TypingSelectFindBestLeadingMatch imgui_widgets.lua:8735 + [x] 86% ImGui::DebugNodeTypingSelectState imgui_widgets.lua:8753 -- Widgets: Box-Select support - [x] 67% BoxSelectPreStartDrag imgui_widgets.lua:8682 - [x] 89% BoxSelectActivateDrag imgui_widgets.lua:8696 - [x] 99% BoxSelectDeactivateDrag imgui_widgets.lua:8709 - [x] 81% BoxSelectScrollWithMouseDrag imgui_widgets.lua:8719 - [x] 49% ImGui::BeginBoxSelect imgui_widgets.lua:8756 - [x] 90% ImGui::EndBoxSelect imgui_widgets.lua:8852 + [x] 67% BoxSelectPreStartDrag imgui_widgets.lua:8774 + [x] 89% BoxSelectActivateDrag imgui_widgets.lua:8788 + [x] 99% BoxSelectDeactivateDrag imgui_widgets.lua:8801 + [x] 81% BoxSelectScrollWithMouseDrag imgui_widgets.lua:8811 + [x] 49% ImGui::BeginBoxSelect imgui_widgets.lua:8848 + [x] 90% ImGui::EndBoxSelect imgui_widgets.lua:8944 -- Widgets: Multi-Select support - [x] 74% DebugLogMultiSelectRequests imgui_widgets.lua:8896 - [x] 61% CalcScopeRect imgui_widgets.lua:8904 - [x] 80% ImGui::BeginMultiSelect imgui_widgets.lua:8935 - [x] 83% ImGui::EndMultiSelect imgui_widgets.lua:9082 - [x] 73% ImGui::SetNextItemSelectionUserData imgui_widgets.lua:9172 - [x] 84% ImGui::MultiSelectItemHeader imgui_widgets.lua:9203 - [x] 86% ImGui::MultiSelectItemFooter imgui_widgets.lua:9273 - [x] 59% ImGui::MultiSelectAddSetAll imgui_widgets.lua:9487 - [x] 31% ImGui::MultiSelectAddSetRange imgui_widgets.lua:9499 - [x] 84% ImGui::DebugNodeMultiSelectState imgui_widgets.lua:9517 + [x] 74% DebugLogMultiSelectRequests imgui_widgets.lua:8988 + [x] 61% CalcScopeRect imgui_widgets.lua:8996 + [x] 80% ImGui::BeginMultiSelect imgui_widgets.lua:9027 + [x] 83% ImGui::EndMultiSelect imgui_widgets.lua:9174 + [x] 73% ImGui::SetNextItemSelectionUserData imgui_widgets.lua:9264 + [x] 84% ImGui::MultiSelectItemHeader imgui_widgets.lua:9295 + [x] 86% ImGui::MultiSelectItemFooter imgui_widgets.lua:9365 + [x] 59% ImGui::MultiSelectAddSetAll imgui_widgets.lua:9579 + [x] 31% ImGui::MultiSelectAddSetRange imgui_widgets.lua:9591 + [x] 84% ImGui::DebugNodeMultiSelectState imgui_widgets.lua:9609 -- Widgets: Multi-Select helpers - [x] 46% ImGuiSelectionBasicStorage::ImGuiSelectionBasicStorage imgui_widgets.lua:9562 - [x] 61% ImGuiSelectionBasicStorage::Clear imgui_widgets.lua:9574 - [x] 53% ImGuiSelectionBasicStorage::Swap imgui_widgets.lua:9581 - [x] 57% ImGuiSelectionBasicStorage::Contains imgui_widgets.lua:9589 - [x] 12% PairComparerByValueInt imgui_widgets.lua:9594 - [x] 26% ImGuiSelectionBasicStorage::GetNextSelectedItem imgui_widgets.lua:9603 - [x] 50% ImGuiSelectionBasicStorage::SetItemSelected imgui_widgets.lua:9634 - [x] 42% ImGuiSelectionBasicStorage_BatchSetItemSelected imgui_widgets.lua:9647 - [~] 0% ImGuiSelectionBasicStorage_BatchFinish imgui_widgets.lua:9662 stub - [x] 78% ImGuiSelectionBasicStorage::ApplyRequests imgui_widgets.lua:9681 - [x] 48% ImGuiSelectionExternalStorage::ImGuiSelectionExternalStorage imgui_widgets.lua:9746 - [x] 84% ImGuiSelectionExternalStorage::ApplyRequests imgui_widgets.lua:9757 + [x] 46% ImGuiSelectionBasicStorage::ImGuiSelectionBasicStorage imgui_widgets.lua:9654 + [x] 61% ImGuiSelectionBasicStorage::Clear imgui_widgets.lua:9666 + [x] 53% ImGuiSelectionBasicStorage::Swap imgui_widgets.lua:9673 + [x] 57% ImGuiSelectionBasicStorage::Contains imgui_widgets.lua:9681 + [x] 12% PairComparerByValueInt imgui_widgets.lua:9686 + [x] 26% ImGuiSelectionBasicStorage::GetNextSelectedItem imgui_widgets.lua:9695 + [x] 50% ImGuiSelectionBasicStorage::SetItemSelected imgui_widgets.lua:9726 + [x] 42% ImGuiSelectionBasicStorage_BatchSetItemSelected imgui_widgets.lua:9739 + [~] 0% ImGuiSelectionBasicStorage_BatchFinish imgui_widgets.lua:9754 stub + [x] 78% ImGuiSelectionBasicStorage::ApplyRequests imgui_widgets.lua:9773 + [x] 48% ImGuiSelectionExternalStorage::ImGuiSelectionExternalStorage imgui_widgets.lua:9838 + [x] 84% ImGuiSelectionExternalStorage::ApplyRequests imgui_widgets.lua:9849 -- Widgets: ListBox - [x] 92% ImGui::BeginListBox imgui_widgets.lua:9790 - [x] 78% ImGui::EndListBox imgui_widgets.lua:9831 - [x] 63% ImGui::ListBox imgui_widgets.lua:9846 + [x] 92% ImGui::BeginListBox imgui_widgets.lua:9882 + [x] 78% ImGui::EndListBox imgui_widgets.lua:9923 + [x] 63% ImGui::ListBox imgui_widgets.lua:9938 -- Widgets: PlotLines, PlotHistogram - [x] 89% ImGui::PlotEx imgui_widgets.lua:9918 - [x] 86% ImGuiPlotArrayGetterData::ImGuiPlotArrayGetterData imgui_widgets.lua:10048 - [x] 48% Plot_ArrayGetter imgui_widgets.lua:10059 - [x] 41% ImGui::PlotLines imgui_widgets.lua:10073 - [x] 41% ImGui::PlotHistogram imgui_widgets.lua:10099 + [x] 89% ImGui::PlotEx imgui_widgets.lua:10010 + [x] 86% ImGuiPlotArrayGetterData::ImGuiPlotArrayGetterData imgui_widgets.lua:10140 + [x] 48% Plot_ArrayGetter imgui_widgets.lua:10151 + [x] 41% ImGui::PlotLines imgui_widgets.lua:10165 + [x] 41% ImGui::PlotHistogram imgui_widgets.lua:10191 -- Widgets: Value helpers - [x] 21% ImGui::Value imgui_widgets.lua:384 + [x] 21% ImGui::Value imgui_widgets.lua:389 -- MenuItem, BeginMenu, EndMenu, etc. - [x] 49% ImGuiMenuColumns::Update imgui_widgets.lua:10131 - [x] 77% ImGuiMenuColumns::CalcNextTotalWidth imgui_widgets.lua:10143 - [x] 64% ImGuiMenuColumns::DeclColumns imgui_widgets.lua:10166 - [x] 91% ImGui::BeginMenuBar imgui_widgets.lua:10179 - [x] 92% ImGui::EndMenuBar imgui_widgets.lua:10213 - [x] 85% ImGui::BeginViewportSideBar imgui_widgets.lua:10276 - [x] 90% ImGui::BeginMainMenuBar imgui_widgets.lua:10312 - [x] 90% ImGui::EndMainMenuBar imgui_widgets.lua:10338 - [x] 91% IsRootOfOpenMenuSet imgui_widgets.lua:10354 - [x] 89% ImGui::BeginMenuEx imgui_widgets.lua:10382 - [x] 67% ImGui::BeginMenu imgui_widgets.lua:10613 - [x] 92% ImGui::EndMenu imgui_widgets.lua:10619 - [x] 85% ImGui::MenuItemEx imgui_widgets.lua:10643 - [x] 67% ImGui::MenuItem imgui_widgets.lua:10750 + [x] 49% ImGuiMenuColumns::Update imgui_widgets.lua:10223 + [x] 77% ImGuiMenuColumns::CalcNextTotalWidth imgui_widgets.lua:10235 + [x] 64% ImGuiMenuColumns::DeclColumns imgui_widgets.lua:10258 + [x] 91% ImGui::BeginMenuBar imgui_widgets.lua:10271 + [x] 92% ImGui::EndMenuBar imgui_widgets.lua:10305 + [x] 85% ImGui::BeginViewportSideBar imgui_widgets.lua:10368 + [x] 90% ImGui::BeginMainMenuBar imgui_widgets.lua:10404 + [x] 90% ImGui::EndMainMenuBar imgui_widgets.lua:10430 + [x] 91% IsRootOfOpenMenuSet imgui_widgets.lua:10446 + [x] 90% ImGui::BeginMenuEx imgui_widgets.lua:10474 + [x] 67% ImGui::BeginMenu imgui_widgets.lua:10705 + [x] 92% ImGui::EndMenu imgui_widgets.lua:10711 + [x] 85% ImGui::MenuItemEx imgui_widgets.lua:10735 + [x] 67% ImGui::MenuItem imgui_widgets.lua:10842 -- Widgets: BeginTabBar, EndTabBar, etc. - [x] 19% ImGuiTabBarSection::ImGuiTabBarSection imgui_widgets.lua:10841 + [x] 19% ImGuiTabBarSection::ImGuiTabBarSection imgui_widgets.lua:10933 [x] 16% ImGuiTabBar::ImGuiTabBar imgui_internal.lua:2340 - [x] 65% TabItemGetSectionIdx imgui_widgets.lua:10785 - [x] 71% TabItemComparerBySection imgui_widgets.lua:10792 - [x] 54% TabItemComparerByBeginOrder imgui_widgets.lua:10802 - [x] 70% GetTabBarFromTabBarRef imgui_widgets.lua:10806 - [x] 95% GetTabBarRefFromTabBar imgui_widgets.lua:10811 - [x] 60% ImGui::TabBarFindByID imgui_widgets.lua:10932 - [x] 77% ImGui::TabBarRemove imgui_widgets.lua:10938 - [x] 92% ImGui::BeginTabBar imgui_widgets.lua:10943 - [x] 84% ImGui::BeginTabBarEx imgui_widgets.lua:10961 - [x] 91% ImGui::EndTabBar imgui_widgets.lua:11025 - [x] 68% TabBarCalcScrollableWidth imgui_widgets.lua:10834 - [x] 82% ImGui::TabBarLayout imgui_widgets.lua:11060 - [x] 75% ImGui::TabBarCalcTabID imgui_widgets.lua:11331 - [x] 62% ImGui::TabBarCalcMaxTabWidth imgui_widgets.lua:11341 - [x] 71% ImGui::TabBarFindTabByID imgui_widgets.lua:11345 - [x] 90% ImGui::TabBarFindTabByOrder imgui_widgets.lua:11357 - [x] 85% ImGui::TabBarFindMostRecentlySelectedTabForActiveWindow imgui_widgets.lua:11369 - [x] 93% ImGui::TabBarGetCurrentTab imgui_widgets.lua:11380 - [x] 55% ImGui::TabBarGetTabName imgui_widgets.lua:11385 - [x] 89% ImGui::TabBarGetTabPos imgui_widgets.lua:11391 - [x] 92% ImGui::TabBarAddTab imgui_widgets.lua:11400 - [x] 91% ImGui::TabBarRemoveTab imgui_widgets.lua:11417 - [x] 92% ImGui::TabBarCloseTab imgui_widgets.lua:11426 - [x] 97% ImGui::TabBarScrollClamp imgui_widgets.lua:11444 - [x] 89% ImGui::TabBarScrollToTab imgui_widgets.lua:11450 - [x] 67% ImGui::TabBarQueueFocus imgui_widgets.lua:11488 - [x] 100% ImGui::TabBarQueueReorder imgui_widgets.lua:11497 - [x] 85% ImGui::TabBarQueueReorderFromMousePos imgui_widgets.lua:11504 - [x] 64% ImGui::TabBarProcessReorder imgui_widgets.lua:11538 - [x] 85% ImGui::TabBarScrollingButtons imgui_widgets.lua:11561 - [x] 80% ImGui::TabBarTabListPopupButton imgui_widgets.lua:11621 + [x] 65% TabItemGetSectionIdx imgui_widgets.lua:10877 + [x] 71% TabItemComparerBySection imgui_widgets.lua:10884 + [x] 54% TabItemComparerByBeginOrder imgui_widgets.lua:10894 + [x] 70% GetTabBarFromTabBarRef imgui_widgets.lua:10898 + [x] 95% GetTabBarRefFromTabBar imgui_widgets.lua:10903 + [x] 60% ImGui::TabBarFindByID imgui_widgets.lua:11024 + [x] 77% ImGui::TabBarRemove imgui_widgets.lua:11030 + [x] 92% ImGui::BeginTabBar imgui_widgets.lua:11035 + [x] 84% ImGui::BeginTabBarEx imgui_widgets.lua:11053 + [x] 91% ImGui::EndTabBar imgui_widgets.lua:11117 + [x] 68% TabBarCalcScrollableWidth imgui_widgets.lua:10926 + [x] 82% ImGui::TabBarLayout imgui_widgets.lua:11152 + [x] 75% ImGui::TabBarCalcTabID imgui_widgets.lua:11423 + [x] 62% ImGui::TabBarCalcMaxTabWidth imgui_widgets.lua:11433 + [x] 71% ImGui::TabBarFindTabByID imgui_widgets.lua:11437 + [x] 90% ImGui::TabBarFindTabByOrder imgui_widgets.lua:11449 + [x] 85% ImGui::TabBarFindMostRecentlySelectedTabForActiveWindow imgui_widgets.lua:11461 + [x] 93% ImGui::TabBarGetCurrentTab imgui_widgets.lua:11472 + [x] 55% ImGui::TabBarGetTabName imgui_widgets.lua:11477 + [x] 89% ImGui::TabBarGetTabPos imgui_widgets.lua:11483 + [x] 92% ImGui::TabBarAddTab imgui_widgets.lua:11492 + [x] 91% ImGui::TabBarRemoveTab imgui_widgets.lua:11509 + [x] 92% ImGui::TabBarCloseTab imgui_widgets.lua:11518 + [x] 97% ImGui::TabBarScrollClamp imgui_widgets.lua:11536 + [x] 89% ImGui::TabBarScrollToTab imgui_widgets.lua:11542 + [x] 67% ImGui::TabBarQueueFocus imgui_widgets.lua:11580 + [x] 100% ImGui::TabBarQueueReorder imgui_widgets.lua:11589 + [x] 85% ImGui::TabBarQueueReorderFromMousePos imgui_widgets.lua:11596 + [x] 64% ImGui::TabBarProcessReorder imgui_widgets.lua:11630 + [x] 85% ImGui::TabBarScrollingButtons imgui_widgets.lua:11653 + [x] 80% ImGui::TabBarTabListPopupButton imgui_widgets.lua:11713 -- Widgets: BeginTabItem, EndTabItem, etc. - [x] 78% ImGui::BeginTabItem imgui_widgets.lua:11669 - [x] 85% ImGui::EndTabItem imgui_widgets.lua:11688 - [x] 81% ImGui::TabItemButton imgui_widgets.lua:11702 - [x] 84% ImGui::TabItemSpacing imgui_widgets.lua:11712 - [x] 79% ImGui::TabItemEx imgui_widgets.lua:11723 - [x] 88% ImGui::SetTabItemClosed imgui_widgets.lua:12009 - [x] 79% ImGui::TabItemCalcSize imgui_widgets.lua:12031 - [x] 93% ImGui::TabItemBackground imgui_widgets.lua:12047 - [x] 86% ImGui::TabItemLabelAndCloseButton imgui_widgets.lua:12068 + [x] 78% ImGui::BeginTabItem imgui_widgets.lua:11761 + [x] 85% ImGui::EndTabItem imgui_widgets.lua:11780 + [x] 81% ImGui::TabItemButton imgui_widgets.lua:11794 + [x] 84% ImGui::TabItemSpacing imgui_widgets.lua:11804 + [x] 79% ImGui::TabItemEx imgui_widgets.lua:11815 + [x] 88% ImGui::SetTabItemClosed imgui_widgets.lua:12101 + [x] 79% ImGui::TabItemCalcSize imgui_widgets.lua:12123 + [x] 93% ImGui::TabItemBackground imgui_widgets.lua:12139 + [x] 86% ImGui::TabItemLabelAndCloseButton imgui_widgets.lua:12160 ==================================================================================================== imgui_draw.cpp @@ -1277,109 +1277,109 @@ imgui_draw.cpp -- ImDrawList [x] 30% ImDrawListSharedData::ImDrawListSharedData imgui_internal.lua:1194 [-] ImDrawListSharedData::~ImDrawListSharedData c++-only - [x] 57% ImDrawListSharedData::SetCircleTessellationMaxError imgui_draw.lua:4224 - [x] 6% ImDrawList::ImDrawList imgui_h.lua:657 + [x] 57% ImDrawListSharedData::SetCircleTessellationMaxError imgui_draw.lua:4234 + [x] 6% ImDrawList::ImDrawList imgui_h.lua:667 [-] ImDrawList::~ImDrawList c++-only - [x] 88% ImDrawList::_SetDrawListSharedData imgui_draw.lua:4241 - [x] 43% ImDrawList::_ResetForNewFrame imgui_draw.lua:4254 - [x] 64% ImDrawList::_ClearFreeMemory imgui_draw.lua:4282 - [x] 23% ImDrawList::CloneOutput imgui_draw.lua:4304 - [x] 77% ImDrawList::AddDrawCmd imgui_draw.lua:4324 - [x] 88% ImDrawList::_PopUnusedDrawCmd imgui_draw.lua:4341 - [x] 57% ImDrawList::AddCallback imgui_draw.lua:4355 - [x] 42% ImDrawList::_TryMergeDrawCmds imgui_draw.lua:4430 - [x] 33% ImDrawList::_OnChangedClipRect imgui_draw.lua:4442 - [x] 55% ImDrawList::_OnChangedTexture imgui_draw.lua:4469 - [x] 91% ImDrawList::_OnChangedVtxOffset imgui_draw.lua:4495 - [x] 57% ImDrawList::_CalcCircleAutoSegmentCount imgui_draw.lua:6951 - [x] 86% ImDrawList::PushClipRect imgui_draw.lua:6963 - [x] 60% ImDrawList::PushClipRectFullScreen imgui_draw.lua:6986 - [x] 39% ImDrawList::PopClipRect imgui_draw.lua:6991 - [x] 67% ImDrawList::PushTexture imgui_draw.lua:4711 - [x] 81% ImDrawList::PopTexture imgui_draw.lua:4720 - [x] 62% ImDrawList::PushDrawFlag imgui_draw.lua:4729 - [x] 85% ImDrawList::PopDrawFlag imgui_draw.lua:4741 - [x] 83% ImDrawList::_SetTexture imgui_draw.lua:4748 - [x] 89% ImDrawList::_SetPixelDensity imgui_draw.lua:4758 - [x] 57% ImDrawList::PrimReserve imgui_draw.lua:4798 = PrimReserve - [x] 68% ImDrawList::PrimUnreserve imgui_draw.lua:4801 - [x] 8% ImDrawList::PrimRect imgui_draw.lua:4848 - [x] 13% ImDrawList::PrimRectUV imgui_draw.lua:4857 - [x] 17% ImDrawList::PrimQuadUV imgui_draw.lua:4881 - [x] 83% ImDrawList::_CalculateCenterBiasedOffset imgui_draw.lua:4911 = _CalculateCenterBiasedOffset + [x] 88% ImDrawList::_SetDrawListSharedData imgui_draw.lua:4251 + [x] 47% ImDrawList::_ResetForNewFrame imgui_draw.lua:4263 + [x] 66% ImDrawList::_ClearFreeMemory imgui_draw.lua:4292 + [x] 23% ImDrawList::CloneOutput imgui_draw.lua:4314 + [x] 77% ImDrawList::AddDrawCmd imgui_draw.lua:4334 + [x] 88% ImDrawList::_PopUnusedDrawCmd imgui_draw.lua:4351 + [x] 65% ImDrawList::AddCallback imgui_draw.lua:4365 + [x] 42% ImDrawList::_TryMergeDrawCmds imgui_draw.lua:4452 + [x] 33% ImDrawList::_OnChangedClipRect imgui_draw.lua:4464 + [x] 55% ImDrawList::_OnChangedTexture imgui_draw.lua:4491 + [x] 91% ImDrawList::_OnChangedVtxOffset imgui_draw.lua:4517 + [x] 57% ImDrawList::_CalcCircleAutoSegmentCount imgui_draw.lua:6973 + [x] 86% ImDrawList::PushClipRect imgui_draw.lua:6985 + [x] 60% ImDrawList::PushClipRectFullScreen imgui_draw.lua:7008 + [x] 39% ImDrawList::PopClipRect imgui_draw.lua:7013 + [x] 67% ImDrawList::PushTexture imgui_draw.lua:4733 + [x] 81% ImDrawList::PopTexture imgui_draw.lua:4742 + [x] 62% ImDrawList::PushDrawFlag imgui_draw.lua:4751 + [x] 85% ImDrawList::PopDrawFlag imgui_draw.lua:4763 + [x] 83% ImDrawList::_SetTexture imgui_draw.lua:4770 + [x] 89% ImDrawList::_SetPixelDensity imgui_draw.lua:4780 + [x] 57% ImDrawList::PrimReserve imgui_draw.lua:4820 = PrimReserve + [x] 68% ImDrawList::PrimUnreserve imgui_draw.lua:4823 + [x] 8% ImDrawList::PrimRect imgui_draw.lua:4870 + [x] 13% ImDrawList::PrimRectUV imgui_draw.lua:4879 + [x] 17% ImDrawList::PrimQuadUV imgui_draw.lua:4903 + [x] 83% ImDrawList::_CalculateCenterBiasedOffset imgui_draw.lua:4933 = _CalculateCenterBiasedOffset [x] 77% ImAlphaMultiply imgui_draw.lua:4100 - [x] 72% ImDrawList::_SelectLineTexture imgui_draw.lua:4946 = _SelectLineTexture - [x] 37% ImDrawList::_AddPolyline imgui_draw.lua:4959 - [x] 43% ImDrawList::AddConvexPolyFilled imgui_draw.lua:5329 - [x] 59% CalcCornerArcStepAndCount imgui_draw.lua:4203 - [x] 64% ImDrawList::_PathArcToFastEx imgui_draw.lua:7113 - [x] 63% ImDrawList::_PathArcToN imgui_draw.lua:7133 - [x] 10% ImDrawList::PathArcToFast imgui_draw.lua:7119 - [x] 46% ImDrawList::PathArcTo imgui_draw.lua:7159 - [x] 61% ImDrawList::PathEllipticalArcTo imgui_draw.lua:7749 - [x] 88% ImBezierCubicCalc imgui_draw.lua:7761 - [x] 89% ImBezierQuadraticCalc imgui_draw.lua:7767 - [x] 85% PathBezierCubicCurveToCasteljau imgui_draw.lua:7774 - [x] 90% PathBezierQuadraticCurveToCasteljau imgui_draw.lua:7792 - [x] 91% ImDrawList::PathBezierCubicCurveTo imgui_draw.lua:7806 - [x] 90% ImDrawList::PathBezierQuadraticCurveTo imgui_draw.lua:7818 - [x] 8% ImDrawList::PathRect imgui_draw.lua:5579 - [x] 46% ImDrawList::_AddLine imgui_draw.lua:5711 - [x] 4% ImDrawList::AddLine imgui_draw.lua:5720 - [x] 9% ImDrawList::AddLineH imgui_draw.lua:5748 - [x] 9% ImDrawList::AddLineV imgui_draw.lua:5804 - [x] 18% ImDrawList::_AddRectBaked imgui_draw.lua:5964 - [x] 42% ImDrawList::_AddRectTinyRounding imgui_draw.lua:5981 - [x] 12% ImDrawList::AddRect imgui_draw.lua:6107 - [x] 10% ImDrawList::_AddRectFilledBaked imgui_draw.lua:6325 - [x] 11% ImDrawList::AddRectFilled imgui_draw.lua:6335 - [x] 26% ImDrawList::AddRectFilledMultiColor imgui_draw.lua:6441 - [x] 59% ImDrawList::AddQuad imgui_draw.lua:6464 - [x] 71% ImDrawList::AddQuadFilled imgui_draw.lua:6481 - [x] 59% ImDrawList::AddTriangle imgui_draw.lua:6493 - [x] 73% ImDrawList::AddTriangleFilled imgui_draw.lua:6510 - [x] 100% ApproxApothem imgui_draw.lua:4213 - [x] 47% ImDrawList::AddCircle imgui_draw.lua:6526 - [x] 32% ImDrawList::AddCircleFilled imgui_draw.lua:6591 - [x] 86% ImDrawList::AddNgon imgui_draw.lua:6629 - [x] 95% ImDrawList::AddNgonFilled imgui_draw.lua:6677 - [x] 80% ImDrawList::AddEllipse imgui_draw.lua:6702 - [x] 88% ImDrawList::AddEllipseFilled imgui_draw.lua:6739 - [x] 73% ImDrawList::AddBezierCubic imgui_draw.lua:6780 - [x] 71% ImDrawList::AddBezierQuadratic imgui_draw.lua:6796 - [x] 65% ImDrawList::AddText imgui_draw.lua:6821 - [x] 69% ImDrawList::AddImage imgui_draw.lua:6864 - [x] 63% ImDrawList::AddImageQuad imgui_draw.lua:6886 - [x] 84% ImDrawList::AddImageRounded imgui_draw.lua:6918 + [x] 72% ImDrawList::_SelectLineTexture imgui_draw.lua:4968 = _SelectLineTexture + [x] 37% ImDrawList::_AddPolyline imgui_draw.lua:4981 + [x] 43% ImDrawList::AddConvexPolyFilled imgui_draw.lua:5351 + [x] 59% CalcCornerArcStepAndCount imgui_draw.lua:4213 + [x] 64% ImDrawList::_PathArcToFastEx imgui_draw.lua:7135 + [x] 63% ImDrawList::_PathArcToN imgui_draw.lua:7155 + [x] 10% ImDrawList::PathArcToFast imgui_draw.lua:7141 + [x] 46% ImDrawList::PathArcTo imgui_draw.lua:7181 + [x] 61% ImDrawList::PathEllipticalArcTo imgui_draw.lua:7771 + [x] 88% ImBezierCubicCalc imgui_draw.lua:7783 + [x] 89% ImBezierQuadraticCalc imgui_draw.lua:7789 + [x] 85% PathBezierCubicCurveToCasteljau imgui_draw.lua:7796 + [x] 90% PathBezierQuadraticCurveToCasteljau imgui_draw.lua:7814 + [x] 91% ImDrawList::PathBezierCubicCurveTo imgui_draw.lua:7828 + [x] 90% ImDrawList::PathBezierQuadraticCurveTo imgui_draw.lua:7840 + [x] 8% ImDrawList::PathRect imgui_draw.lua:5601 + [x] 46% ImDrawList::_AddLine imgui_draw.lua:5733 + [x] 4% ImDrawList::AddLine imgui_draw.lua:5742 + [x] 9% ImDrawList::AddLineH imgui_draw.lua:5770 + [x] 9% ImDrawList::AddLineV imgui_draw.lua:5826 + [x] 18% ImDrawList::_AddRectBaked imgui_draw.lua:5986 + [x] 42% ImDrawList::_AddRectTinyRounding imgui_draw.lua:6003 + [x] 12% ImDrawList::AddRect imgui_draw.lua:6129 + [x] 10% ImDrawList::_AddRectFilledBaked imgui_draw.lua:6347 + [x] 11% ImDrawList::AddRectFilled imgui_draw.lua:6357 + [x] 26% ImDrawList::AddRectFilledMultiColor imgui_draw.lua:6463 + [x] 59% ImDrawList::AddQuad imgui_draw.lua:6486 + [x] 71% ImDrawList::AddQuadFilled imgui_draw.lua:6503 + [x] 59% ImDrawList::AddTriangle imgui_draw.lua:6515 + [x] 73% ImDrawList::AddTriangleFilled imgui_draw.lua:6532 + [x] 100% ApproxApothem imgui_draw.lua:4223 + [x] 47% ImDrawList::AddCircle imgui_draw.lua:6548 + [x] 32% ImDrawList::AddCircleFilled imgui_draw.lua:6613 + [x] 86% ImDrawList::AddNgon imgui_draw.lua:6651 + [x] 95% ImDrawList::AddNgonFilled imgui_draw.lua:6699 + [x] 80% ImDrawList::AddEllipse imgui_draw.lua:6724 + [x] 88% ImDrawList::AddEllipseFilled imgui_draw.lua:6761 + [x] 73% ImDrawList::AddBezierCubic imgui_draw.lua:6802 + [x] 71% ImDrawList::AddBezierQuadratic imgui_draw.lua:6818 + [x] 65% ImDrawList::AddText imgui_draw.lua:6843 + [x] 69% ImDrawList::AddImage imgui_draw.lua:6886 + [x] 63% ImDrawList::AddImageQuad imgui_draw.lua:6908 + [x] 84% ImDrawList::AddImageRounded imgui_draw.lua:6940 -- ImTriangulator, ImDrawList concave polygon fill - [x] 35% ImTriangulatorNode::Unlink imgui_draw.lua:7850 - [x] 50% ImTriangulatorNodeSpan::push_back imgui_draw.lua:7863 - [x] 66% ImTriangulatorNodeSpan::find_erase_unsorted imgui_draw.lua:7864 - [x] 84% ImTriangulator::EstimateTriangleCount imgui_draw.lua:7880 - [x] 71% ImTriangulator::EstimateScratchBufferSize imgui_draw.lua:7882 - [x] 38% ImTriangulator::Init imgui_draw.lua:7888 - [x] 45% ImTriangulator::BuildNodes imgui_draw.lua:7913 - [x] 32% ImTriangulator::BuildReflexes imgui_draw.lua:7926 - [x] 38% ImTriangulator::BuildEars imgui_draw.lua:7938 - [x] 53% ImTriangulator::GetNextTriangle imgui_draw.lua:7954 - [x] 65% ImTriangulator::FlipNodeList imgui_draw.lua:7992 - [x] 56% ImTriangulator::IsEar imgui_draw.lua:8015 - [x] 58% ImTriangulator::ReclassifyNode imgui_draw.lua:8030 - [x] 39% ImDrawList::AddConcavePolyFilled imgui_draw.lua:8073 + [x] 35% ImTriangulatorNode::Unlink imgui_draw.lua:7872 + [x] 50% ImTriangulatorNodeSpan::push_back imgui_draw.lua:7885 + [x] 66% ImTriangulatorNodeSpan::find_erase_unsorted imgui_draw.lua:7886 + [x] 84% ImTriangulator::EstimateTriangleCount imgui_draw.lua:7902 + [x] 71% ImTriangulator::EstimateScratchBufferSize imgui_draw.lua:7904 + [x] 38% ImTriangulator::Init imgui_draw.lua:7910 + [x] 45% ImTriangulator::BuildNodes imgui_draw.lua:7935 + [x] 32% ImTriangulator::BuildReflexes imgui_draw.lua:7948 + [x] 38% ImTriangulator::BuildEars imgui_draw.lua:7960 + [x] 53% ImTriangulator::GetNextTriangle imgui_draw.lua:7976 + [x] 65% ImTriangulator::FlipNodeList imgui_draw.lua:8014 + [x] 56% ImTriangulator::IsEar imgui_draw.lua:8037 + [x] 58% ImTriangulator::ReclassifyNode imgui_draw.lua:8052 + [x] 39% ImDrawList::AddConcavePolyFilled imgui_draw.lua:8095 -- ImDrawListSplitter - [x] 58% ImDrawListSplitter::ClearFreeMemory imgui_draw.lua:4530 - [x] 63% ImDrawListSplitter::Split imgui_draw.lua:4548 - [x] 54% ImDrawListSplitter::Merge imgui_draw.lua:4574 - [x] 29% ImDrawListSplitter::SetCurrentChannel imgui_draw.lua:4665 + [x] 58% ImDrawListSplitter::ClearFreeMemory imgui_draw.lua:4552 + [x] 63% ImDrawListSplitter::Split imgui_draw.lua:4570 + [x] 54% ImDrawListSplitter::Merge imgui_draw.lua:4596 + [x] 29% ImDrawListSplitter::SetCurrentChannel imgui_draw.lua:4687 -- ImDrawData [x] 60% ImDrawData::Clear imgui_draw.lua:4118 - [x] 68% ImGui::AddDrawListToDrawDataEx imgui_draw.lua:4131 - [x] 94% ImDrawData::AddDrawList imgui_draw.lua:4153 - [x] 48% ImDrawData::DeIndexAllBuffers imgui_draw.lua:4160 - [x] 77% ImDrawData::ScaleClipRects imgui_draw.lua:4184 + [x] 80% ImGui::AddDrawListToDrawDataEx imgui_draw.lua:4131 + [x] 94% ImDrawData::AddDrawList imgui_draw.lua:4163 + [x] 48% ImDrawData::DeIndexAllBuffers imgui_draw.lua:4170 + [x] 77% ImDrawData::ScaleClipRects imgui_draw.lua:4194 -- Helpers ShadeVertsXXX functions [x] 36% ImGui::ShadeVertsLinearColorGradientKeepAlpha imgui_draw.lua:351 @@ -1387,7 +1387,7 @@ imgui_draw.cpp [x] 16% ImGui::ShadeVertsTransformPos imgui_draw.lua:378 -- ImFontConfig - [x] 20% ImFontConfig::ImFontConfig imgui_h.lua:968 + [x] 20% ImFontConfig::ImFontConfig imgui_h.lua:978 -- ImTextureData [x] 76% ImTextureDataGetFormatBytesPerPixel imgui_draw.lua:2685 @@ -1397,7 +1397,7 @@ imgui_draw.cpp [x] 71% ImTextureData::DestroyPixels imgui_draw.lua:2680 -- ImFontAtlas, ImFontAtlasBuilder - [x] 39% ImFontAtlas::ImFontAtlas imgui_h.lua:1049 + [x] 39% ImFontAtlas::ImFontAtlas imgui_h.lua:1059 [-] ImFontAtlas::~ImFontAtlas c++-only [x] 93% ImFontAtlas::Clear imgui_draw.lua:571 [x] 76% ImFontAtlas::ClearFonts imgui_draw.lua:616 @@ -1526,9 +1526,9 @@ imgui_draw.cpp [x] 78% ImFontGlyphRangesBuilder::BuildRanges imgui_draw.lua:2768 -- ImFontBaked, ImFont - [x] 12% ImFontBaked::ImFontBaked imgui_h.lua:855 + [x] 12% ImFontBaked::ImFontBaked imgui_h.lua:865 [x] 79% ImFontBaked::ClearOutputData imgui_draw.lua:2788 - [x] 10% ImFont::ImFont imgui_h.lua:912 + [x] 10% ImFont::ImFont imgui_h.lua:922 [-] ImFont::~ImFont c++-only [x] 49% ImFont::ClearOutputData imgui_draw.lua:2842 [x] 58% ImFont::IsGlyphRangeUnused imgui_draw.lua:2855 @@ -1553,27 +1553,27 @@ imgui_draw.cpp [x] 49% ImFontCalcTextSizeEx imgui_draw.lua:3470 [x] 91% ImFont::CalcTextSizeA imgui_draw.lua:3631 [x] 85% ImFont::RenderChar imgui_draw.lua:3644 - [x] 66% ImFont::RenderText imgui_draw.lua:7225 + [x] 66% ImFont::RenderText imgui_draw.lua:7247 -- ImGui Internal Render Helpers - [x] 58% ImGui::RenderArrow imgui_draw.lua:7472 - [x] 88% ImGui::RenderBullet imgui_draw.lua:7504 - [x] 66% ImGui::RenderCheckMark imgui_draw.lua:7516 - [x] 90% ImGui::RenderArrowPointingAt imgui_draw.lua:7541 + [x] 58% ImGui::RenderArrow imgui_draw.lua:7494 + [x] 88% ImGui::RenderBullet imgui_draw.lua:7526 + [x] 66% ImGui::RenderCheckMark imgui_draw.lua:7538 + [x] 90% ImGui::RenderArrowPointingAt imgui_draw.lua:7563 [x] 93% ImGui::RenderArrowDockMenu imgui.lua:4585 - [x] 100% ImAcos01 imgui_draw.lua:7554 - [x] 95% ImGui::RenderRectFilledInRangeH imgui_draw.lua:7570 - [x] 80% ImGui::RenderRectFilledWithHole imgui_draw.lua:7727 - [x] 81% ImGui::CalcRoundingFlagsForRectInRect imgui_draw.lua:7625 - [x] 79% ImGui::RenderColorRectWithAlphaCheckerboard imgui_draw.lua:7661 + [x] 100% ImAcos01 imgui_draw.lua:7576 + [x] 95% ImGui::RenderRectFilledInRangeH imgui_draw.lua:7592 + [x] 80% ImGui::RenderRectFilledWithHole imgui_draw.lua:7749 + [x] 81% ImGui::CalcRoundingFlagsForRectInRect imgui_draw.lua:7647 + [x] 79% ImGui::RenderColorRectWithAlphaCheckerboard imgui_draw.lua:7683 -- Decompression code - [x] 59% stb_decompress_length imgui_draw.lua:8187 - [x] 49% stb__match imgui_draw.lua:8195 - [x] 80% stb__lit imgui_draw.lua:8211 - [x] 50% stb_decompress_token imgui_draw.lua:8223 - [x] 34% stb_adler32 imgui_draw.lua:8244 - [x] 44% stb_decompress imgui_draw.lua:8266 + [x] 59% stb_decompress_length imgui_draw.lua:8209 + [x] 49% stb__match imgui_draw.lua:8217 + [x] 80% stb__lit imgui_draw.lua:8233 + [x] 50% stb_decompress_token imgui_draw.lua:8245 + [x] 34% stb_adler32 imgui_draw.lua:8266 + [x] 44% stb_decompress imgui_draw.lua:8288 -- Default font data (ProggyClean.ttf) [ ] ImGui_GetDefaultCompressedFontDataProggyClean @@ -1699,8 +1699,8 @@ imgui_tables.cpp -- Tables: Debugging [x] 89% DebugNodeTableGetSizingPolicyDesc imgui_tables.lua:4642 - [x] 17% ImGui::DebugNodeTable imgui.lua:21795 - [x] 69% ImGui::DebugNodeTableSettings imgui.lua:21777 + [x] 17% ImGui::DebugNodeTable imgui.lua:21801 + [x] 69% ImGui::DebugNodeTableSettings imgui.lua:21783 -- Columns, BeginColumns, EndColumns, etc. [x] 24% ImGui::SetWindowClipRectBeforeSetChannel imgui_tables.lua:2064 @@ -1764,109 +1764,109 @@ imgui_demo.cpp [x] 69% DemoWindowWidgetsComboBoxes imgui_demo.lua:1410 -- DemoWindowWidgetsDataTypes() - [x] 64% DemoWindowWidgetsDataTypes imgui_demo.lua:1531 + [x] 73% DemoWindowWidgetsDataTypes imgui_demo.lua:1532 -- DemoWindowWidgetsDisableBlocks() - [x] 72% DemoWindowWidgetsDisableBlocks imgui_demo.lua:1647 + [x] 72% DemoWindowWidgetsDisableBlocks imgui_demo.lua:1654 -- DemoWindowWidgetsDragAndDrop() - [x] 73% DemoWindowWidgetsDragAndDrop imgui_demo.lua:1674 + [x] 73% DemoWindowWidgetsDragAndDrop imgui_demo.lua:1681 -- DemoWindowWidgetsDragsAndSliders() - [x] 78% DemoWindowWidgetsDragsAndSliders imgui_demo.lua:1816 + [x] 78% DemoWindowWidgetsDragsAndSliders imgui_demo.lua:1823 -- DemoWindowWidgetsFonts() - [x] 77% DemoWindowWidgetsFonts imgui_demo.lua:1866 + [x] 77% DemoWindowWidgetsFonts imgui_demo.lua:1873 -- DemoWindowWidgetsImages() - [x] 87% DemoWindowWidgetsImages imgui_demo.lua:1884 + [x] 87% DemoWindowWidgetsImages imgui_demo.lua:1891 -- DemoWindowWidgetsListBoxes() - [x] 80% DemoWindowWidgetsListBoxes imgui_demo.lua:1969 + [x] 80% DemoWindowWidgetsListBoxes imgui_demo.lua:1976 -- DemoWindowWidgetsLiveEdit() - [x] 79% DemoWindowWidgetsLiveEdit imgui_demo.lua:2039 + [x] 79% DemoWindowWidgetsLiveEdit imgui_demo.lua:2046 -- DemoWindowWidgetsMixedValues() - [x] 66% DemoWindowWidgetsMixedValues imgui_demo.lua:2078 + [x] 66% DemoWindowWidgetsMixedValues imgui_demo.lua:2085 -- DemoWindowWidgetsMultiComponents() - [x] 86% DemoWindowWidgetsMultiComponents imgui_demo.lua:2146 + [x] 86% DemoWindowWidgetsMultiComponents imgui_demo.lua:2153 -- DemoWindowWidgetsPlotting() - [x] 69% DemoWindowWidgetsPlotting imgui_demo.lua:2212 + [x] 69% DemoWindowWidgetsPlotting imgui_demo.lua:2219 -- DemoWindowWidgetsProgressBars() - [x] 76% DemoWindowWidgetsProgressBars imgui_demo.lua:2282 + [x] 76% DemoWindowWidgetsProgressBars imgui_demo.lua:2289 -- DemoWindowWidgetsQueryingStatuses() - [x] 74% DemoWindowWidgetsQueryingStatuses imgui_demo.lua:2333 + [x] 74% DemoWindowWidgetsQueryingStatuses imgui_demo.lua:2340 -- DemoWindowWidgetsSelectables() - [x] 64% DemoWindowWidgetsSelectables imgui_demo.lua:2583 + [x] 64% DemoWindowWidgetsSelectables imgui_demo.lua:2590 -- DemoWindowWidgetsSelectionAndMultiSelect() - [x] 87% ExampleSelectionWithDeletion::ApplyDeletionPreLoop imgui_demo.lua:2773 - [x] 84% ExampleSelectionWithDeletion::ApplyDeletionPostLoop imgui_demo.lua:2806 - [x] 74% ExampleDualListBox::MoveAll imgui_demo.lua:2840 - [x] 59% ExampleDualListBox::MoveSelected imgui_demo.lua:2850 - [x] 74% ExampleDualListBox::ApplySelectionRequests imgui_demo.lua:2870 - [x] 29% ExampleDualListBox::CompareItemsByValue imgui_demo.lua:2877 - [x] 36% ExampleDualListBox::SortItems imgui_demo.lua:2880 - [x] 90% ExampleDualListBox::Show imgui_demo.lua:2885 - [x] 70% DemoWindowWidgetsSelectionAndMultiSelect imgui_demo.lua:3129 + [x] 87% ExampleSelectionWithDeletion::ApplyDeletionPreLoop imgui_demo.lua:2780 + [x] 84% ExampleSelectionWithDeletion::ApplyDeletionPostLoop imgui_demo.lua:2813 + [x] 74% ExampleDualListBox::MoveAll imgui_demo.lua:2847 + [x] 59% ExampleDualListBox::MoveSelected imgui_demo.lua:2857 + [x] 74% ExampleDualListBox::ApplySelectionRequests imgui_demo.lua:2877 + [x] 29% ExampleDualListBox::CompareItemsByValue imgui_demo.lua:2884 + [x] 36% ExampleDualListBox::SortItems imgui_demo.lua:2887 + [x] 90% ExampleDualListBox::Show imgui_demo.lua:2892 + [x] 70% DemoWindowWidgetsSelectionAndMultiSelect imgui_demo.lua:3136 -- DemoWindowWidgetsTabs() - [x] 58% EditTabBarFittingPolicyFlags imgui_demo.lua:3754 - [x] 68% DemoWindowWidgetsTabs imgui_demo.lua:3784 + [x] 58% EditTabBarFittingPolicyFlags imgui_demo.lua:3761 + [x] 68% DemoWindowWidgetsTabs imgui_demo.lua:3791 -- DemoWindowWidgetsText() - [x] 85% DemoWindowWidgetsText imgui_demo.lua:3940 + [x] 85% DemoWindowWidgetsText imgui_demo.lua:3947 -- DemoWindowWidgetsTextFilter() - [x] 81% DemoWindowWidgetsTextFilter imgui_demo.lua:4054 + [x] 81% DemoWindowWidgetsTextFilter imgui_demo.lua:4061 -- DemoWindowWidgetsTextInput() - [x] 73% DemoWindowWidgetsTextInput imgui_demo.lua:4129 + [x] 73% DemoWindowWidgetsTextInput imgui_demo.lua:4136 -- DemoWindowWidgetsTooltips() - [x] 83% DemoWindowWidgetsTooltips imgui_demo.lua:4313 + [x] 83% DemoWindowWidgetsTooltips imgui_demo.lua:4320 -- DemoWindowWidgetsTreeNodes() - [x] 72% DemoWindowWidgetsTreeNodes imgui_demo.lua:4420 + [x] 72% DemoWindowWidgetsTreeNodes imgui_demo.lua:4427 -- DemoWindowWidgetsVerticalSliders() - [x] 82% DemoWindowWidgetsVerticalSliders imgui_demo.lua:4601 + [x] 82% DemoWindowWidgetsVerticalSliders imgui_demo.lua:4608 -- DemoWindowWidgets() - [x] 97% DemoWindowWidgets imgui_demo.lua:4669 + [x] 97% DemoWindowWidgets imgui_demo.lua:4676 -- DemoWindowLayout() - [x] 80% DemoWindowLayout imgui_demo.lua:4776 + [x] 80% DemoWindowLayout imgui_demo.lua:4783 -- DemoWindowPopups() - [x] 56% DemoWindowPopups imgui_demo.lua:5620 - [x] 36% MyItem::SortWithSortSpecs imgui_demo.lua:5938 - [x] 68% MyItem::CompareWithSortSpecs imgui_demo.lua:5955 - [x] 96% PushStyleCompact imgui_demo.lua:5982 - [x] 100% PopStyleCompact imgui_demo.lua:5988 - [x] 69% EditTableSizingFlags imgui_demo.lua:5995 - [x] 74% EditTableColumnsFlags imgui_demo.lua:6047 - [x] 100% ShowTableColumnsStatusFlags imgui_demo.lua:6077 + [x] 56% DemoWindowPopups imgui_demo.lua:5627 + [x] 36% MyItem::SortWithSortSpecs imgui_demo.lua:5945 + [x] 68% MyItem::CompareWithSortSpecs imgui_demo.lua:5962 + [x] 96% PushStyleCompact imgui_demo.lua:5989 + [x] 100% PopStyleCompact imgui_demo.lua:5995 + [x] 69% EditTableSizingFlags imgui_demo.lua:6002 + [x] 74% EditTableColumnsFlags imgui_demo.lua:6054 + [x] 100% ShowTableColumnsStatusFlags imgui_demo.lua:6084 -- DemoWindowTables() - [x] 41% DemoWindowTables imgui_demo.lua:6223 + [x] 41% DemoWindowTables imgui_demo.lua:6230 ==================================================================================================== imgui.h ==================================================================================================== -- Forward declarations and basic types - [x] 0% ImVec2::ImVec2 imgui_h.lua:291 - [x] 0% ImVec4::ImVec4 imgui_h.lua:357 + [x] 0% ImVec2::ImVec2 imgui_h.lua:301 + [x] 0% ImVec4::ImVec4 imgui_h.lua:367 -- Texture identifiers (ImTextureID, ImTextureRef) - [x] 55% ImTextureRef::ImTextureRef imgui_h.lua:811 + [x] 55% ImTextureRef::ImTextureRef imgui_h.lua:821 -- Tables API flags and structures (ImGuiTableFlags, ImGuiTableColumnFlags, ImGuiTableRowFlags, ImGuiTableBgTarget, ImGuiTableSortSpecs, ImGuiTableColumnSortSpecs) [x] 35% ImGuiTableSortSpecs::ImGuiTableSortSpecs imgui_tables.lua:232 @@ -1875,14 +1875,14 @@ imgui.h -- Helpers: Debug log, memory allocations macros, ImVector<> [-] operatornew c++-only [-] operatordelete c++-only - [x] 26% IM_DELETE imgui_h.lua:130 - [x] 37% ImVector::ImVector imgui_h.lua:413 + [x] 26% IM_DELETE imgui_h.lua:138 + [x] 37% ImVector::ImVector imgui_h.lua:423 [-] ImVector::operator= c++-only [-] ImVector::~ImVector c++-only - [x] 76% ImVector::clear imgui_h.lua:418 - [x] 21% ImVector::clear_delete imgui_h.lua:419 + [x] 76% ImVector::clear imgui_h.lua:428 + [x] 21% ImVector::clear_delete imgui_h.lua:429 [=] ImVector::clear_destruct GC: clear_delete / clear - [x] 100% ImVector::empty imgui_h.lua:420 + [x] 100% ImVector::empty imgui_h.lua:430 [=] ImVector::size v.Size field [=] ImVector::size_in_bytes sizeof [=] ImVector::max_size sizeof @@ -1890,56 +1890,56 @@ imgui.h [=] ImVector::begin v.Data / v:iter() [=] ImVector::end v.Data / v:iter() [=] ImVector::front v.Data[1] - [x] 64% ImVector::back imgui_h.lua:421 - [x] 53% ImVector::swap imgui_h.lua:459 - [x] 65% ImVector::_grow_capacity imgui_h.lua:407 - [x] 59% ImVector::resize imgui_h.lua:450 - [x] 70% ImVector::shrink imgui_h.lua:448 - [x] 67% ImVector::reserve imgui_h.lua:430 - [x] 71% ImVector::reserve_discard imgui_h.lua:441 - [x] 54% ImVector::push_back imgui_h.lua:415 - [x] 48% ImVector::pop_back imgui_h.lua:416 - [x] 73% ImVector::push_front imgui_h.lua:417 - [x] 18% ImVector::erase imgui_h.lua:422 - [x] 24% ImVector::erase_unsorted imgui_h.lua:426 - [x] 30% ImVector::insert imgui_h.lua:463 - [x] 42% ImVector::contains imgui_h.lua:460 + [x] 64% ImVector::back imgui_h.lua:431 + [x] 53% ImVector::swap imgui_h.lua:469 + [x] 65% ImVector::_grow_capacity imgui_h.lua:417 + [x] 59% ImVector::resize imgui_h.lua:460 + [x] 70% ImVector::shrink imgui_h.lua:458 + [x] 67% ImVector::reserve imgui_h.lua:440 + [x] 71% ImVector::reserve_discard imgui_h.lua:451 + [x] 54% ImVector::push_back imgui_h.lua:425 + [x] 48% ImVector::pop_back imgui_h.lua:426 + [x] 73% ImVector::push_front imgui_h.lua:427 + [x] 18% ImVector::erase imgui_h.lua:432 + [x] 24% ImVector::erase_unsorted imgui_h.lua:436 + [x] 30% ImVector::insert imgui_h.lua:473 + [x] 42% ImVector::contains imgui_h.lua:470 [=] ImVector::find find_index (no element pointers) - [x] 24% ImVector::find_index imgui_h.lua:425 - [x] 36% ImVector::find_erase imgui_h.lua:427 - [x] 36% ImVector::find_erase_unsorted imgui_h.lua:428 - [x] 5% ImVector::index_from_ptr imgui_h.lua:476 + [x] 24% ImVector::find_index imgui_h.lua:435 + [x] 36% ImVector::find_erase imgui_h.lua:437 + [x] 36% ImVector::find_erase_unsorted imgui_h.lua:438 + [x] 5% ImVector::index_from_ptr imgui_h.lua:486 -- Misc data structures (ImGuiInputTextCallbackData, ImGuiSizeCallbackData, ImGuiPayload) - [x] 84% ImGuiInputTextCallbackData::SelectAll imgui_h.lua:2580 - [x] 77% ImGuiInputTextCallbackData::SetSelection imgui_h.lua:2581 - [x] 83% ImGuiInputTextCallbackData::ClearSelection imgui_h.lua:2582 - [x] 89% ImGuiInputTextCallbackData::HasSelection imgui_h.lua:2583 - [x] 27% ImGuiWindowClass::ImGuiWindowClass imgui_h.lua:2445 - [x] 0% ImGuiPayload::ImGuiPayload imgui_h.lua:2791 - [x] 61% ImGuiPayload::Clear imgui_h.lua:2787 - [x] 55% ImGuiPayload::IsDataType imgui_h.lua:2788 - [x] 100% ImGuiPayload::IsPreview imgui_h.lua:2789 - [x] 100% ImGuiPayload::IsDelivery imgui_h.lua:2790 + [x] 84% ImGuiInputTextCallbackData::SelectAll imgui_h.lua:2590 + [x] 77% ImGuiInputTextCallbackData::SetSelection imgui_h.lua:2591 + [x] 83% ImGuiInputTextCallbackData::ClearSelection imgui_h.lua:2592 + [x] 89% ImGuiInputTextCallbackData::HasSelection imgui_h.lua:2593 + [x] 27% ImGuiWindowClass::ImGuiWindowClass imgui_h.lua:2455 + [x] 0% ImGuiPayload::ImGuiPayload imgui_h.lua:2812 + [x] 61% ImGuiPayload::Clear imgui_h.lua:2808 + [x] 55% ImGuiPayload::IsDataType imgui_h.lua:2809 + [x] 100% ImGuiPayload::IsPreview imgui_h.lua:2810 + [x] 100% ImGuiPayload::IsDelivery imgui_h.lua:2811 -- Helpers (ImGuiOnceUponAFrame, ImGuiTextFilter, ImGuiTextBuffer, ImGuiStorage, ImGuiListClipper, Math Operators, ImColor) [x] 57% ImGuiOnceUponAFrame::ImGuiOnceUponAFrame imgui_internal.lua:3885 [-] ImGuiOnceUponAFrame::operatorbool c++-only - [x] 80% ImGuiTextFilter::Clear imgui.lua:19923 - [x] 100% ImGuiTextFilter::IsActive imgui.lua:19924 + [x] 80% ImGuiTextFilter::Clear imgui.lua:19929 + [x] 100% ImGuiTextFilter::IsActive imgui.lua:19930 [-] ImGuiTextFilter::Draw obsolete - [x] 0% ImGuiTextBuffer::ImGuiTextBuffer imgui_h.lua:2815 + [x] 0% ImGuiTextBuffer::ImGuiTextBuffer imgui_h.lua:2836 [=] ImGuiTextBuffer::begin chunk-list string builder: c_str() [=] ImGuiTextBuffer::end chunk-list string builder: c_str() - [x] 14% ImGuiTextBuffer::size imgui_h.lua:2821 - [x] 33% ImGuiTextBuffer::empty imgui_h.lua:2817 - [x] 40% ImGuiTextBuffer::clear imgui_h.lua:2816 + [x] 14% ImGuiTextBuffer::size imgui_h.lua:2842 + [x] 33% ImGuiTextBuffer::empty imgui_h.lua:2838 + [x] 40% ImGuiTextBuffer::clear imgui_h.lua:2837 [=] ImGuiTextBuffer::resize chunk-list string builder, no byte buffer [=] ImGuiTextBuffer::reserve chunk-list string builder, no byte buffer - [x] 31% ImGuiTextBuffer::c_str imgui_h.lua:2820 + [x] 31% ImGuiTextBuffer::c_str imgui_h.lua:2841 [=] ImGuiStoragePair::ImGuiStoragePair Lua table keyed by ID [=] ImGuiStorage::Clear Lua table keyed by ID (e.g. window.StateStorage = {}) - [x] 100% ImGuiListClipper::IncludeItemByIndex imgui.lua:20150 + [x] 100% ImGuiListClipper::IncludeItemByIndex imgui.lua:20156 [-] operator+ c++-only [-] operator- c++-only [-] operator* c++-only @@ -1950,80 +1950,80 @@ imgui.h [-] operator/= c++-only [-] operator== c++-only [-] operator!= c++-only - [x] n/a ImColor::ImColor imgui_h.lua:2831 = setmetatable ( { } , { + [x] n/a ImColor::ImColor imgui_h.lua:2852 = setmetatable ( { } , { [-] ImColor::operatorImU32 c++-only [-] ImColor::operatorImVec4 c++-only - [x] 65% ImColor::SetHSV imgui_h.lua:2846 - [x] 80% ImColor::HSV imgui_h.lua:2847 + [x] 65% ImColor::SetHSV imgui_h.lua:2867 + [x] 80% ImColor::HSV imgui_h.lua:2868 -- Multi-Select API flags and structures (ImGuiMultiSelectFlags, ImGuiSelectionRequestType, ImGuiSelectionRequest, ImGuiMultiSelectIO, ImGuiSelectionBasicStorage) - [x] 100% ImGuiSelectionBasicStorage::GetStorageIdFromIndex imgui_widgets.lua:9643 + [x] 100% ImGuiSelectionBasicStorage::GetStorageIdFromIndex imgui_widgets.lua:9735 -- Drawing API (ImDrawCmd, ImDrawIdx, ImDrawVert, ImDrawChannel, ImDrawListSplitter, ImDrawFlags, ImDrawList, ImDrawData) - [x] 13% ImDrawCmd::ImDrawCmd imgui_h.lua:507 - [x] 18% ImDrawListSplitter::ImDrawListSplitter imgui_h.lua:594 + [x] 13% ImDrawCmd::ImDrawCmd imgui_h.lua:517 + [x] 18% ImDrawListSplitter::ImDrawListSplitter imgui_h.lua:604 [-] ImDrawListSplitter::~ImDrawListSplitter c++-only - [x] 92% ImDrawListSplitter::Clear imgui_draw.lua:4525 - [x] 92% ImDrawList::GetClipRectMin imgui_draw.lua:7003 - [x] 92% ImDrawList::GetClipRectMax imgui_draw.lua:7004 + [x] 92% ImDrawListSplitter::Clear imgui_draw.lua:4547 + [x] 92% ImDrawList::GetClipRectMin imgui_draw.lua:7025 + [x] 92% ImDrawList::GetClipRectMax imgui_draw.lua:7026 [x] 80% ImDrawList::AddPolyline imgui_internal.lua:1151 [x] 100% ImDrawList::PathClear imgui_internal.lua:1103 [x] 16% ImDrawList::PathLineTo imgui_internal.lua:1107 [x] 48% ImDrawList::PathLineToMergeDuplicate imgui_internal.lua:1117 [x] 94% ImDrawList::PathFillConvex imgui_internal.lua:1127 - [x] 94% ImDrawList::PathFillConcave imgui_draw.lua:8167 + [x] 94% ImDrawList::PathFillConcave imgui_draw.lua:8189 [x] 75% ImDrawList::PathStroke imgui_internal.lua:1135 - [x] 89% ImDrawList::ChannelsSplit imgui_draw.lua:4706 - [x] 80% ImDrawList::ChannelsMerge imgui_draw.lua:4707 - [x] 89% ImDrawList::ChannelsSetCurrent imgui_draw.lua:4709 - [x] 16% ImDrawList::PrimWriteVtx imgui_h.lua:631 - [x] 44% ImDrawList::PrimWriteIdx imgui_h.lua:641 - [x] 89% ImDrawList::PrimVtx imgui_h.lua:649 + [x] 89% ImDrawList::ChannelsSplit imgui_draw.lua:4728 + [x] 80% ImDrawList::ChannelsMerge imgui_draw.lua:4729 + [x] 89% ImDrawList::ChannelsSetCurrent imgui_draw.lua:4731 + [x] 16% ImDrawList::PrimWriteVtx imgui_h.lua:641 + [x] 44% ImDrawList::PrimWriteIdx imgui_h.lua:651 + [x] 89% ImDrawList::PrimVtx imgui_h.lua:659 [-] ImDrawList::AddRect obsolete [-] ImDrawList::PushTextureID obsolete [-] ImDrawList::PopTextureID obsolete - [x] 12% ImDrawData::ImDrawData imgui_h.lua:707 + [x] 12% ImDrawData::ImDrawData imgui_h.lua:717 -- Texture API (ImTextureFormat, ImTextureStatus, ImTextureRect, ImTextureData) - [x] 14% ImTextureData::ImTextureData imgui_h.lua:751 + [x] 14% ImTextureData::ImTextureData imgui_h.lua:761 [-] ImTextureData::~ImTextureData c++-only - [x] 71% ImTextureData::GetPixels imgui_h.lua:779 - [x] 58% ImTextureData::GetPixelsAt imgui_h.lua:780 - [x] 80% ImTextureData::GetSizeInBytes imgui_h.lua:784 - [x] 86% ImTextureData::GetPitch imgui_h.lua:785 - [x] 76% ImTextureData::GetTexRef imgui_h.lua:786 - [x] 100% ImTextureData::GetTexID imgui_h.lua:787 - [x] 100% ImTextureData::SetTexID imgui_h.lua:790 - [x] 95% ImTextureData::SetStatus imgui_h.lua:793 + [x] 71% ImTextureData::GetPixels imgui_h.lua:789 + [x] 58% ImTextureData::GetPixelsAt imgui_h.lua:790 + [x] 80% ImTextureData::GetSizeInBytes imgui_h.lua:794 + [x] 86% ImTextureData::GetPitch imgui_h.lua:795 + [x] 76% ImTextureData::GetTexRef imgui_h.lua:796 + [x] 100% ImTextureData::GetTexID imgui_h.lua:797 + [x] 100% ImTextureData::SetTexID imgui_h.lua:800 + [x] 95% ImTextureData::SetStatus imgui_h.lua:803 -- Font API (ImFontConfig, ImFontGlyph, ImFontAtlasFlags, ImFontAtlas, ImFontGlyphRangesBuilder, ImFont) - [x] 21% ImFontGlyph::ImFontGlyph imgui_h.lua:1137 - [x] 13% ImFontGlyphRangesBuilder::ImFontGlyphRangesBuilder imgui_h.lua:1161 - [x] 63% ImFontGlyphRangesBuilder::Clear imgui_h.lua:1167 - [x] 68% ImFontGlyphRangesBuilder::GetBit imgui_h.lua:1174 - [x] 51% ImFontGlyphRangesBuilder::SetBit imgui_h.lua:1176 - [x] 100% ImFontGlyphRangesBuilder::AddChar imgui_h.lua:1178 - [x] 14% ImFontAtlasRect::ImFontAtlasRect imgui_h.lua:1109 + [x] 21% ImFontGlyph::ImFontGlyph imgui_h.lua:1147 + [x] 13% ImFontGlyphRangesBuilder::ImFontGlyphRangesBuilder imgui_h.lua:1171 + [x] 63% ImFontGlyphRangesBuilder::Clear imgui_h.lua:1177 + [x] 68% ImFontGlyphRangesBuilder::GetBit imgui_h.lua:1184 + [x] 51% ImFontGlyphRangesBuilder::SetBit imgui_h.lua:1186 + [x] 100% ImFontGlyphRangesBuilder::AddChar imgui_h.lua:1188 + [x] 14% ImFontAtlasRect::ImFontAtlasRect imgui_h.lua:1119 [-] ImFontAtlas::SetTexID obsolete [-] ImFontAtlas::IsBuilt obsolete [-] ImFontAtlas::AddCustomRectRegular obsolete [-] ImFontAtlas::GetCustomRectByIndex obsolete [-] ImFontAtlas::CalcCustomRectUV obsolete - [x] 100% ImFont::IsLoaded imgui_h.lua:907 - [x] 58% ImFont::GetDebugName imgui_h.lua:908 + [x] 100% ImFont::IsLoaded imgui_h.lua:917 + [x] 58% ImFont::GetDebugName imgui_h.lua:918 [-] ImFont::CalcWordWrapPositionA obsolete - [x] 63% ImTextureRef::GetTexID imgui_h.lua:821 - [x] 76% ImDrawCmd::GetTexID imgui_h.lua:522 + [x] 63% ImTextureRef::GetTexID imgui_h.lua:831 + [x] 76% ImDrawCmd::GetTexID imgui_h.lua:532 -- Viewports - [x] 7% ImGuiViewport::ImGuiViewport imgui_h.lua:1534 + [x] 7% ImGuiViewport::ImGuiViewport imgui_h.lua:1544 [-] ImGuiViewport::~ImGuiViewport c++-only - [x] 90% ImGuiViewport::GetCenter imgui_h.lua:1524 - [x] 90% ImGuiViewport::GetWorkCenter imgui_h.lua:1528 + [x] 90% ImGuiViewport::GetCenter imgui_h.lua:1534 + [x] 90% ImGuiViewport::GetWorkCenter imgui_h.lua:1538 -- ImGuiPlatformIO + other Platform Dependent Interfaces (ImGuiPlatformMonitor, ImGuiPlatformImeData) - [x] 42% ImGuiPlatformMonitor::ImGuiPlatformMonitor imgui_h.lua:1643 - [x] 24% ImGuiPlatformImeData::ImGuiPlatformImeData imgui_h.lua:1434 + [x] 42% ImGuiPlatformMonitor::ImGuiPlatformMonitor imgui_h.lua:1653 + [x] 24% ImGuiPlatformImeData::ImGuiPlatformImeData imgui_h.lua:1444 -- Obsolete functions and types [-] PushFont obsolete @@ -2075,7 +2075,7 @@ imgui_internal.h [x] 77% ImModPositive imgui_internal.lua:718 [x] 100% ImDot imgui_internal.lua:453 [x] 98% ImRotate imgui_internal.lua:447 - [x] 100% ImLinearSweep imgui_widgets.lua:10779 + [x] 100% ImLinearSweep imgui_widgets.lua:10871 [x] 100% ImLinearRemapClamp imgui_internal.lua:399 [x] 97% ImMul imgui_internal.lua:460 [x] 100% ImIsFloatAboveGuaranteedIntegerPrecision imgui_internal.lua:719 @@ -2200,7 +2200,7 @@ imgui_internal.h [x] 19% ImGuiNextItemData::ImGuiNextItemData imgui_internal.lua:1463 [x] 95% ImGuiNextItemData::ClearFlags imgui_internal.lua:1456 [x] 11% ImGuiLastItemData::ImGuiLastItemData imgui_internal.lua:1383 - [x] 8% ImGuiErrorRecoveryState::ImGuiErrorRecoveryState imgui.lua:20339 + [x] 8% ImGuiErrorRecoveryState::ImGuiErrorRecoveryState imgui.lua:20345 [x] 41% ImGuiPtrOrIndex::ImGuiPtrOrIndex imgui_internal.lua:3914 -- Popup support @@ -2269,7 +2269,7 @@ imgui_internal.h -- Settings support [x] 17% ImGuiWindowSettings::ImGuiWindowSettings imgui_internal.lua:2803 [x] 40% ImGuiWindowSettings::GetName imgui_internal.lua:2799 - [x] 13% ImGuiSettingsHandler::ImGuiSettingsHandler imgui_h.lua:2968 + [x] 13% ImGuiSettingsHandler::ImGuiSettingsHandler imgui_h.lua:2989 -- Metrics, Debug Tools [x] 7% ImGuiDebugAllocInfo::ImGuiDebugAllocInfo imgui_internal.lua:1968 @@ -2302,9 +2302,9 @@ imgui_internal.h [x] 86% TableGetInstanceID imgui_tables.lua:439 -- ImGui internal API - [x] 100% GetScale imgui.lua:13953 - [x] 100% GetCurrentWindowRead imgui.lua:13959 - [x] 100% GetCurrentWindow imgui.lua:13966 + [x] 100% GetScale imgui.lua:13959 + [x] 100% GetCurrentWindowRead imgui.lua:13965 + [x] 100% GetCurrentWindow imgui.lua:13972 [x] 100% SetWindowParentWindowForFocusRoute imgui_internal.lua:3955 [x] 99% WindowRectAbsToRel imgui_internal.lua:676 [x] 99% WindowRectRelToAbs imgui_internal.lua:681 @@ -2312,7 +2312,7 @@ imgui_internal.h [x] 98% WindowPosRelToAbs imgui_internal.lua:700 [x] 100% GetPixelDensity imgui_internal.lua:3956 [x] 55% GetRoundedFontSize imgui_internal.lua:670 - [x] 15% GetForegroundDrawList imgui.lua:14043 + [x] 15% GetForegroundDrawList imgui.lua:14049 [x] 80% LocalizeGetMsg imgui_internal.lua:3844 [x] 100% ScrollToBringRectIntoView imgui_internal.lua:3957 [x] 100% GetItemStatusFlags imgui_internal.lua:3958 @@ -2328,7 +2328,7 @@ imgui_internal.h [x] 60% IsAliasKey imgui_internal.lua:604 [x] 100% IsLRModKey imgui_internal.lua:609 [x] 76% ConvertSingleModFlagToKey imgui_internal.lua:621 - [x] 17% GetKeyData imgui.lua:8688 + [x] 17% GetKeyData imgui.lua:8697 [x] 97% MouseButtonToKey imgui_internal.lua:581 [x] 81% IsActiveIdUsingNavDir imgui_internal.lua:685 [x] 88% GetKeyOwnerData imgui_internal.lua:647 @@ -2342,7 +2342,7 @@ imgui_internal.h [x] 91% GetBoxSelectState imgui_internal.lua:2195 [x] 95% GetMultiSelectState imgui_internal.lua:2198 [x] 100% GetCurrentTabBar imgui_internal.lua:3964 - [x] 35% TabBarGetTabOrder imgui_widgets.lua:11363 + [x] 35% TabBarGetTabOrder imgui_widgets.lua:11455 [-] RenderNavHighlight obsolete [x] 100% TempInputIsActive imgui_internal.lua:3851 [x] 88% GetInputTextState imgui_internal.lua:3859 @@ -2389,7 +2389,7 @@ Enums (values ported / total; missing listed) ImGuiContextHookType 8 / 8 ImGuiDataAuthority_ 3 / 3 ImGuiDataTypePrivate_ 2 / 2 - ImGuiDataType_ 11 / 13 missing: ImGuiDataType_S64, ImGuiDataType_U64 + ImGuiDataType_ 13 / 13 ImGuiDebugLogFlags_ 18 / 18 ImGuiDir 6 / 6 ImGuiDockNodeFlagsPrivate_ 18 / 18 diff --git a/docs/TODO.txt b/docs/TODO.txt index 2af3d22..b2037cb 100644 --- a/docs/TODO.txt +++ b/docs/TODO.txt @@ -6,26 +6,16 @@ Re-check with: python3 tools/test/missing.py [imgui|widgets|tables|draw] and p which exist as ImGui.DragFloat2 = DragFloatN(2) etc. Those are NOT gaps.) -FEATURES NOT PORTED -------------------- -- Multi-select / box-select: BeginMultiSelect, EndMultiSelect, MultiSelectItemHeader/Footer, MultiSelectAddSetAll, - MultiSelectAddSetRange, SetNextItemSelectionUserData, BeginBoxSelect/EndBoxSelect, DebugNodeMultiSelectState. - (Selectable/TreeNode call sites are stubbed with TODOs; the demo "Selection State & Multi-Select" section is not ported.) -- Typing-select (type to jump in lists): GetTypingSelectRequest, TypingSelectFind*, DebugNodeTypingSelectState. -- Examples > Assets Browser (needs multi-select + box-select). -- Metrics > Tools > Item Picker (UpdateDebugToolItemPicker). -- DebugFlashStyleColor / UpdateDebugToolFlashStyleColor (Style Editor "?" flash button). -- DebugNodeInputTextState (Metrics > Internal state > InputText). -- BringWindowToDisplayBehind: stub, does nothing. -- ColorEdit4 / ColorPicker4: drag & drop target (dropping a color onto a color widget). -- ImFontAtlas:AddFontFromMemoryCompressedTTF: stub (binary_to_compressed_c fonts can't be loaded). -- ImGuiSizeCallbackData: SetNextWindowSizeConstraints custom callbacks only partially supported - (Examples > Constrained Resize). -- LogSetNextTextDecoration (Selectable "[ ]" decoration in log/clipboard output). -- stb_truetype: cmap high-byte mapping (some CJK fonts assert). -- Context hooks removal (RemoveContextHook), SetContextName. -- RegisterUserTexture / UnregisterUserTexture. -- ErrorCheckNewFrameSanityChecks / ErrorCheckEndFrameSanityChecks (fewer usage-error asserts than upstream). +FEATURES NOT PORTED / PARTIAL +----------------------------- +- ImFont::AddRemapCodepointToGlyphIndex / FontSrcGetGlyphIndexFromCodepoint (needs the 1.93 font loader split). +- Default compressed font data (GetDefaultCompressedFontDataTTF / ProggyClean/ProggyForever embedded data): + AddFontFromMemoryCompressedTTF works, but the default font comes from fonts/ instead. +- DebugLogSkippedErrors / DebugDrawIdConflicts* (Metrics error-recovery and ID-conflict debug tools). +- ImGuiDataType.S64/U64: supported, but values are Luau doubles: exact only within +-2^53 (LLONG_MAX/ULLONG_MAX + round up to 2^63/2^64; U64 max prints as 18446744073709551615 via a special case). +- ImDrawList::AddCallback(userdata_size > 0): "copy" = shallow copy of a table userdata (no raw bytes in Lua). +- stb_truetype: cmap format 2 (high-byte mapping) asserts -- same as upstream stb_truetype ("@TODO"). - GetAllocatorFunctions (n/a in Luau). WON'T DO (platform) @@ -41,11 +31,9 @@ NOT VERIFIED LINE BY LINE AGAINST UPSTREAM KNOWN ISSUES ------------ - Tables > "Columns flags": disabling every column asserts in TableUpdateLayout (upstream asserts too). -- Style Editor > Colors uses a ListClipper (port-only change, upstream submits every row). - -PERFORMANCE IDEAS (not done) ----------------------------- -- Cheaper visible ColorEdit4 rows; cheaper Begin() for child windows. +- ImTriangulator ([Luau] deviation, imgui_draw.lua ImTriangulator_IsReflex): only strictly counter-clockwise corners are + reflex (upstream: also collinear/duplicate points), so polygons with duplicate points triangulate differently (no + overlapping-triangle fallback). PLANNED EXTENSIONS ------------------ diff --git a/imgui.lua b/imgui.lua index eb77689..1fbb1b2 100644 --- a/imgui.lua +++ b/imgui.lua @@ -6489,7 +6489,7 @@ function ImGui.IsMouseDragPastThreshold(button, lock_threshold) if lock_threshold == nil then lock_threshold = -1.0 end local g = GImGui - IM_ASSERT(button >= 0 and button < 3) -- IM_COUNTOF(g.IO.MouseDown) + IM_ASSERT(button >= 0 and button < ImGuiMouseButton.COUNT) -- IM_COUNTOF(g.IO.MouseDown) if lock_threshold < 0.0 then lock_threshold = g.IO.MouseDragThreshold end @@ -6502,7 +6502,7 @@ function ImGui.IsMouseDragging(button, lock_threshold) if lock_threshold == nil then lock_threshold = -1.0 end local g = GImGui - IM_ASSERT(button >= 0 and button < 3) -- IM_COUNTOF(g.IO.MouseDown) + IM_ASSERT(button >= 0 and button < ImGuiMouseButton.COUNT) -- IM_COUNTOF(g.IO.MouseDown) if not g.IO.MouseDown[button] then return false end @@ -7048,7 +7048,7 @@ function ImGui.EndGroup() IM_ASSERT(group_data.WindowID == window.ID) -- EndGroup() in wrong window? if (window.DC.IsSetPos) then - -- TODO: ImGui.ErrorCheckUsingSetCursorPosToExtendParentBoundaries() + ImGui.ErrorCheckUsingSetCursorPosToExtendParentBoundaries() end -- Include LastItemData.Rect.Max as a workaround for e.g. EndTable() undershooting with CursorMaxPos report. (#7543) @@ -7515,7 +7515,16 @@ function ImGui.BringWindowToDisplayBehind(window, behind_window) local g = GImGui window = window.RootWindow behind_window = behind_window.RootWindow - -- TODO: + local pos_wnd = ImGui.FindWindowDisplayIndex(window) + 1 -- 1-based + local pos_beh = ImGui.FindWindowDisplayIndex(behind_window) + 1 + local data = g.Windows.Data + if pos_wnd < pos_beh then + for i = pos_wnd, pos_beh - 2 do data[i] = data[i + 1] end -- memmove + data[pos_beh - 1] = window + else + for i = pos_wnd, pos_beh + 1, -1 do data[i] = data[i - 1] end -- memmove + data[pos_beh] = window + end end --- @param under_this_window? ImGuiWindow @@ -8298,7 +8307,7 @@ function MT.ImGuiIO:ClearInputMouse() self.MousePos = ImVec2(-FLT_MAX, -FLT_MAX) - for n = 0, 2 do -- IM_COUNTOF(MouseDown) + for n = 0, ImGuiMouseButton.COUNT - 1 do self.MouseDown[n] = false self.MouseDownDuration[n] = -1.0 self.MouseDownDurationPrev[n] = -1.0 @@ -8841,7 +8850,6 @@ function ImGui.IsKeyPressedEx(key, flags, owner_id) return true end --- TODO: -- Return untranslated names: on macOS, Cmd key will show as Ctrl, Ctrl key will show as super. function ImGui.GetKeyChordName(key_chord) local key = bit32.band(key_chord, bit32.bnot(ImGuiMod_Mask_)) @@ -9290,7 +9298,7 @@ end --- @return bool function ImGui.IsAnyMouseDown() local g = GImGui - for n = 0, 2 do -- IM_COUNTOF(g.IO.MouseDown) - 1 + for n = 0, ImGuiMouseButton.COUNT - 1 do if g.IO.MouseDown[n] then return true end @@ -9304,7 +9312,7 @@ function ImGui.IsMouseDown(button, owner_id) if owner_id == nil then owner_id = ImGuiKeyOwner_Any end local g = GImGui - IM_ASSERT(button >= 0 and button < 3) -- IM_COUNTOF(g.IO.MouseDown) + IM_ASSERT(button >= 0 and button < ImGuiMouseButton.COUNT) -- IM_COUNTOF(g.IO.MouseDown) return g.IO.MouseDown[button] and ImGui.TestKeyOwner(ImGui.MouseButtonToKey(button), owner_id) -- Should be same as IsKeyDown(MouseButtonToKey(button), owner_id), but this allows legacy code hijacking the io.Mousedown[] array. end @@ -9324,7 +9332,7 @@ function ImGui.IsMouseClickedEx(button, flags, owner_id) if owner_id == nil then owner_id = ImGuiKeyOwner_Any end local g = GImGui - IM_ASSERT(button >= 0 and button < 3) -- IM_COUNTOF(g.IO.MouseDown) + IM_ASSERT(button >= 0 and button < ImGuiMouseButton.COUNT) -- IM_COUNTOF(g.IO.MouseDown) if not g.IO.MouseDown[button] then -- In theory this should already be encoded as (DownDuration < 0.0f), but testing this facilitates eating mechanism (until we finish work on key ownership) return false @@ -9355,7 +9363,7 @@ function ImGui.IsMouseReleased(button, owner_id) if owner_id == nil then owner_id = ImGuiKeyOwner_Any end local g = GImGui - IM_ASSERT(button >= 0 and button < 3) -- IM_COUNTOF(g.IO.MouseDown) + IM_ASSERT(button >= 0 and button < ImGuiMouseButton.COUNT) -- IM_COUNTOF(g.IO.MouseDown) return g.IO.MouseReleased[button] and ImGui.TestKeyOwner(ImGui.MouseButtonToKey(button), owner_id) -- Should be same as IsKeyReleased(MouseButtonToKey(button), owner_id) end @@ -9368,7 +9376,7 @@ end function ImGui.IsMouseReleasedWithDelay(button, delay) if delay == nil then delay = -1.0 end local g = GImGui - IM_ASSERT(button >= 0 and button < 3) + IM_ASSERT(button >= 0 and button < ImGuiMouseButton.COUNT) -- IM_COUNTOF(g.IO.MouseDown) if ImGui.IsMouseDown(button) then return false end @@ -9384,14 +9392,14 @@ end function ImGui.IsMouseDoubleClicked(button, owner_id) if owner_id == nil then owner_id = ImGuiKeyOwner_Any end local g = GImGui - IM_ASSERT(button >= 0 and button < 3) + IM_ASSERT(button >= 0 and button < ImGuiMouseButton.COUNT) -- IM_COUNTOF(g.IO.MouseDown) return g.IO.MouseClickedCount[button] == 2 and ImGui.TestKeyOwner(ImGui.MouseButtonToKey(button), owner_id) end --- @param button ImGuiMouseButton function ImGui.GetMouseClickedCount(button) local g = GImGui - IM_ASSERT(button >= 0 and button < 3) + IM_ASSERT(button >= 0 and button < ImGuiMouseButton.COUNT) -- IM_COUNTOF(g.IO.MouseDown) return g.IO.MouseClickedCount[button] end @@ -9482,7 +9490,7 @@ function ImGui.GetMouseDragDelta(button, lock_threshold) if button == nil then button = 0 end if lock_threshold == nil then lock_threshold = -1.0 end local g = GImGui - IM_ASSERT(button >= 0 and button < 3) + IM_ASSERT(button >= 0 and button < ImGuiMouseButton.COUNT) -- IM_COUNTOF(g.IO.MouseDown) if lock_threshold < 0.0 then lock_threshold = g.IO.MouseDragThreshold end @@ -9500,7 +9508,7 @@ end function ImGui.ResetMouseDragDelta(button) if button == nil then button = 0 end local g = GImGui - IM_ASSERT(button >= 0 and button < 3) + IM_ASSERT(button >= 0 and button < ImGuiMouseButton.COUNT) -- IM_COUNTOF(g.IO.MouseDown) -- NB: We don't need to reset g.IO.MouseDragMaxDistanceSqr ImVec2_Copy(g.IO.MouseClickedPos[button], g.IO.MousePos) end @@ -9945,14 +9953,13 @@ local function CalcWindowSizeAfterConstraint(window, size_desired) new_size.x = (cr.Min.x >= 0 and cr.Max.x >= 0) and ImClamp(new_size.x, cr.Min.x, cr.Max.x) or window.SizeFull.x new_size.y = (cr.Min.y >= 0 and cr.Max.y >= 0) and ImClamp(new_size.y, cr.Min.y, cr.Max.y) or window.SizeFull.y if g.NextWindowData.SizeCallback then - local data = {} -- TODO: ImGuiSizeCallbackData + local data = ImGuiSizeCallbackData() data.UserData = g.NextWindowData.SizeCallbackUserData - data.Pos = ImVec2(window.Pos.x, window.Pos.y) - data.CurrentSize = ImVec2(window.SizeFull.x, window.SizeFull.y) - data.DesiredSize = ImVec2(new_size.x, new_size.y) + ImVec2_Copy(data.Pos, window.Pos) + ImVec2_Copy(data.CurrentSize, window.SizeFull) + ImVec2_Copy(data.DesiredSize, new_size) g.NextWindowData.SizeCallback(data) - new_size.x = data.DesiredSize.x - new_size.y = data.DesiredSize.y + ImVec2_Copy(new_size, data.DesiredSize) end new_size.x = IM_TRUNC(new_size.x) new_size.y = IM_TRUNC(new_size.y) @@ -11161,6 +11168,7 @@ local function SetCurrentWindow(window) local g = GImGui --- @diagnostic disable-next-line g.CurrentWindow = window + g.StackSizesInBeginForCurrentWindow = window and g.CurrentWindowStack:back().StackSizesInBegin or nil g.CurrentTable = (window and window.DC.CurrentTableIdx ~= -1) and g.Tables:GetByIndex(window.DC.CurrentTableIdx) or nil if window then @@ -11177,7 +11185,6 @@ local function SetCurrentWindow(window) end end --- TODO: function ImGui.GcCompactTransientMiscBuffers() local g = GImGui g.ItemFlagsStack:clear() @@ -13399,7 +13406,6 @@ local function FindHoveredWindowEx(pos, find_first_and_in_any_viewport) return hovered_window, hovered_window_under_moving_window end --- TODO: -- The reason this is exposed in imgui_internal.h is: on touch-based system that don't have hovering, we want to dispatch inputs to the right target (imgui vs imgui+app) function ImGui.UpdateHoveredWindowAndCaptureFlags(mouse_pos) local g = GImGui @@ -13436,7 +13442,7 @@ function ImGui.UpdateHoveredWindowAndCaptureFlags(mouse_pos) local mouse_earliest_down = -1 local mouse_any_down = false - for i = 0, 2 do -- IM_COUNTOF(io.MouseDown) + for i = 0, ImGuiMouseButton.COUNT - 1 do if io.MouseClicked[i] then io.MouseDownOwned[i] = (g.HoveredWindow ~= nil) or has_open_popup io.MouseDownOwnedUnlessPopupClose[i] = (g.HoveredWindow ~= nil) or has_open_modal @@ -13525,7 +13531,7 @@ function ImGui.UpdateKeyboardInputs() end -- Update aliases - for n = 0, 2 do -- TODO: ImGuiMouseButton.COUNT - 1 + for n = 0, ImGuiMouseButton.COUNT - 1 do ImGui.UpdateAliasKey(ImGui.MouseButtonToKey(n), io.MouseDown[n], io.MouseDown[n] and 1.0 or 0.0) end ImGui.UpdateAliasKey(ImGuiKey.MouseWheelX, io.MouseWheelH ~= 0.0, io.MouseWheelH) @@ -13633,7 +13639,7 @@ function ImGui.UpdateMouseInputs() g.NavHighlightItemUnderNav = false end - for i = 0, 2 do -- IM_COUNTOF(io.MouseDown) + for i = 0, ImGuiMouseButton.COUNT - 1 do io.MouseClicked[i] = io.MouseDown[i] and (io.MouseDownDuration[i] < 0.0) io.MouseClickedCount[i] = 0 -- Will be filled below io.MouseReleased[i] = not io.MouseDown[i] and (io.MouseDownDuration[i] >= 0.0) @@ -14585,7 +14591,6 @@ function ImGui.EndFrame() ImGui.CallContextHooks(g, ImGuiContextHookType.EndFramePost) end --- TODO: -- Prepare the data for rendering so you can call GetDrawData() -- (As with anything within the ImGui:: namespace this doesn't touch your GPU or graphics API at all: -- it is the role of the ImGui_ImplXXXX_RenderDrawData() function provided by the renderer backend) @@ -16452,7 +16457,7 @@ end function ImGui.PopFocusScope() local g = GImGui - -- TODO: IM_ASSERT_USER_ERROR_RET(g.FocusScopeStack.Size > g.StackSizesInBeginForCurrentWindow.SizeOfFocusScopeStack, "Calling PopFocusScope() too many times!") + IM_ASSERT_USER_ERROR_RET(g.FocusScopeStack.Size > g.StackSizesInBeginForCurrentWindow.SizeOfFocusScopeStack, "Calling PopFocusScope() too many times!") g.FocusScopeStack:pop_back() if g.FocusScopeStack.Size > 0 then g.CurrentFocusScopeId = g.FocusScopeStack:back().ID @@ -19467,9 +19472,10 @@ function ImGui.ErrorCheckUsingSetCursorPosToExtendParentBoundaries() window.DC.IsSetPos = false if window.DC.CursorPos.x <= window.DC.CursorMaxPos.x and window.DC.CursorPos.y <= window.DC.CursorMaxPos.y then return end if window.SkipItems then return end - -- Upstream asserts (user error): "Code uses SetCursorPos()/SetCursorScreenPos() to extend window/parent boundaries. - -- Please submit an item e.g. Dummy() afterwards". We keep the old, tolerant behavior instead of erroring. - window.DC.CursorMaxPos = ImMax(window.DC.CursorMaxPos, window.DC.CursorPos) + IM_ASSERT_USER_ERROR(false, "Code uses SetCursorPos()/SetCursorScreenPos() to extend window/parent boundaries.\nPlease submit an item e.g. Dummy() afterwards in order to grow window/parent boundaries.") + + -- For reference, the old behavior was essentially: + --window.DC.CursorMaxPos = ImMax(window.DC.CursorMaxPos, window.DC.CursorPos) end ------------------------------------------------------------------------------- @@ -22456,11 +22462,12 @@ function ImGui.ShowMetricsWindow(p_open) if ImGui.IsMousePosValid() then ImGui.Text("Mouse pos: (%g, %g)", io.MousePos.x, io.MousePos.y) else ImGui.Text("Mouse pos: ") end ImGui.Text("Mouse delta: (%g, %g)", io.MouseDelta.x, io.MouseDelta.y) ImGui.Text("Mouse down:") - for i = 0, 2 do if ImGui.IsMouseDown(i) then ImGui.SameLine(); ImGui.Text("b%d (%.02f secs)", i, io.MouseDownDuration[i]) end end + local count = ImGuiMouseButton.COUNT -- IM_COUNTOF(io.MouseDown) + for i = 0, count - 1 do if ImGui.IsMouseDown(i) then ImGui.SameLine(); ImGui.Text("b%d (%.02f secs)", i, io.MouseDownDuration[i]) end end ImGui.Text("Mouse clicked:") - for i = 0, 2 do if ImGui.IsMouseClicked(i) then ImGui.SameLine(); ImGui.Text("b%d (%d)", i, io.MouseClickedCount[i]) end end + for i = 0, count - 1 do if ImGui.IsMouseClicked(i) then ImGui.SameLine(); ImGui.Text("b%d (%d)", i, io.MouseClickedCount[i]) end end ImGui.Text("Mouse released:") - for i = 0, 2 do if ImGui.IsMouseReleased(i) then ImGui.SameLine(); ImGui.Text("b%d", i) end end + for i = 0, count - 1 do if ImGui.IsMouseReleased(i) then ImGui.SameLine(); ImGui.Text("b%d", i) end end ImGui.Text("Mouse wheel: %.1f", io.MouseWheel) ImGui.Text("MouseStationaryTimer: %.2f", g.MouseStationaryTimer) ImGui.Text("Mouse source: %s", GetMouseSourceName(io.MouseSource)) diff --git a/imgui_demo.lua b/imgui_demo.lua index 0b399b4..d37ffee 100644 --- a/imgui_demo.lua +++ b/imgui_demo.lua @@ -1520,7 +1520,8 @@ S.DemoWindowWidgetsDataTypes = { u16_v = 65535, s32_v = -1, u32_v = 4294967295, -- (ImU32)-1 - -- [Port] s64_v / u64_v: 64-bit integer types are not supported (Lua numbers are doubles) + s64_v = -1, + u64_v = 18446744073709551615, -- (ImU64)-1 [Port] Lua numbers are doubles: 64-bit values are exact only within +-2^53 f32_v = 0.123, f64_v = 90000.01234567890123456789, drag_clamp = false, @@ -1551,14 +1552,15 @@ function DemoWindowWidgetsDataTypes() -- Setup limits (as helper variables so we can take their address, as explained above) -- Note: SliderScalar() functions have a maximum usable range of half the natural type maximum, hence the /2. - -- [Port] LLONG_MIN/LLONG_MAX/ULLONG_MAX fallback block dropped: no 64-bit integer types + local LLONG_MIN, LLONG_MAX, ULLONG_MAX = -9223372036854775808, 9223372036854775807, 18446744073709551615 -- [Port] doubles (LLONG_MAX/ULLONG_MAX round up) local s8_zero, s8_one, s8_fifty, s8_min, s8_max = 0, 1, 50, -128, 127 local u8_zero, u8_one, u8_fifty, u8_min, u8_max = 0, 1, 50, 0, 255 local s16_zero, s16_one, s16_fifty, s16_min, s16_max = 0, 1, 50, -32768, 32767 local u16_zero, u16_one, u16_fifty, u16_min, u16_max = 0, 1, 50, 0, 65535 local s32_zero, s32_one, s32_fifty, s32_min, s32_max, s32_hi_a, s32_hi_b = 0, 1, 50, -1073741824, 1073741823, 1073741823 - 100, 1073741823 -- INT_MIN/2, INT_MAX/2 local u32_zero, u32_one, u32_fifty, u32_min, u32_max, u32_hi_a, u32_hi_b = 0, 1, 50, 0, 2147483647, 2147483647 - 100, 2147483647 -- UINT_MAX/2 - -- [Port] s64_* / u64_* limits: ImGuiDataType.S64/U64 are not supported + local s64_zero, s64_one, s64_fifty, s64_min, s64_max, s64_hi_a, s64_hi_b = 0, 1, 50, LLONG_MIN / 2, LLONG_MAX / 2, LLONG_MAX / 2 - 100, LLONG_MAX / 2 + local u64_zero, u64_one, u64_fifty, u64_min, u64_max, u64_hi_a, u64_hi_b = 0, 1, 50, 0, ULLONG_MAX / 2, ULLONG_MAX / 2 - 100, ULLONG_MAX / 2 local f32_zero, f32_one, f32_lo_a, f32_hi_a = 0.0, 1.0, -10000000000.0, 10000000000.0 local f64_zero, f64_one, f64_lo_a, f64_hi_a = 0.0, 1.0, -1000000000000000.0, 1000000000000000.0 @@ -1580,8 +1582,8 @@ function DemoWindowWidgetsDataTypes() s.s32_v = ImGui.DragScalar("drag s32", ImGuiDataType.S32, s.s32_v, drag_speed, drag_clamp and s32_zero or nil, drag_clamp and s32_fifty or nil) s.s32_v = ImGui.DragScalar("drag s32 hex", ImGuiDataType.S32, s.s32_v, drag_speed, drag_clamp and s32_zero or nil, drag_clamp and s32_fifty or nil, "0x%08X") s.u32_v = ImGui.DragScalar("drag u32", ImGuiDataType.U32, s.u32_v, drag_speed, drag_clamp and u32_zero or nil, drag_clamp and u32_fifty or nil, "%u ms") - -- [Port] ImGui.DragScalar("drag s64", ImGuiDataType.S64, s64_v, ...) -- 64-bit types not supported - -- [Port] ImGui.DragScalar("drag u64", ImGuiDataType.U64, u64_v, ...) -- 64-bit types not supported + s.s64_v = ImGui.DragScalar("drag s64", ImGuiDataType.S64, s.s64_v, drag_speed, drag_clamp and s64_zero or nil, drag_clamp and s64_fifty or nil) + s.u64_v = ImGui.DragScalar("drag u64", ImGuiDataType.U64, s.u64_v, drag_speed, drag_clamp and u64_zero or nil, drag_clamp and u64_fifty or nil) s.f32_v = ImGui.DragScalar("drag float", ImGuiDataType.Float, s.f32_v, 0.005, f32_zero, f32_one, "%f") s.f32_v = ImGui.DragScalar("drag float log", ImGuiDataType.Float, s.f32_v, 0.005, f32_zero, f32_one, "%f", ImGuiSliderFlags.Logarithmic) s.f64_v = ImGui.DragScalar("drag double", ImGuiDataType.Double, s.f64_v, 0.0005, f64_zero, nil, "%.10f grams") @@ -1600,8 +1602,12 @@ function DemoWindowWidgetsDataTypes() s.u32_v = ImGui.SliderScalar("slider u32 low", ImGuiDataType.U32, s.u32_v, u32_zero, u32_fifty,"%u") s.u32_v = ImGui.SliderScalar("slider u32 high", ImGuiDataType.U32, s.u32_v, u32_hi_a, u32_hi_b, "%u") s.u32_v = ImGui.SliderScalar("slider u32 full", ImGuiDataType.U32, s.u32_v, u32_min, u32_max, "%u") - -- [Port] "slider s64 low" / "slider s64 high" / "slider s64 full" (ImGuiDataType.S64): 64-bit types not supported - -- [Port] "slider u64 low" / "slider u64 high" / "slider u64 full" (ImGuiDataType.U64): 64-bit types not supported + s.s64_v = ImGui.SliderScalar("slider s64 low", ImGuiDataType.S64, s.s64_v, s64_zero, s64_fifty,"%lld") -- "%" PRId64 + s.s64_v = ImGui.SliderScalar("slider s64 high", ImGuiDataType.S64, s.s64_v, s64_hi_a, s64_hi_b, "%lld") + s.s64_v = ImGui.SliderScalar("slider s64 full", ImGuiDataType.S64, s.s64_v, s64_min, s64_max, "%lld") + s.u64_v = ImGui.SliderScalar("slider u64 low", ImGuiDataType.U64, s.u64_v, u64_zero, u64_fifty,"%llu ms") -- "%" PRIu64 " ms" + s.u64_v = ImGui.SliderScalar("slider u64 high", ImGuiDataType.U64, s.u64_v, u64_hi_a, u64_hi_b, "%llu ms") + s.u64_v = ImGui.SliderScalar("slider u64 full", ImGuiDataType.U64, s.u64_v, u64_min, u64_max, "%llu ms") s.f32_v = ImGui.SliderScalar("slider float low", ImGuiDataType.Float, s.f32_v, f32_zero, f32_one) s.f32_v = ImGui.SliderScalar("slider float low log", ImGuiDataType.Float, s.f32_v, f32_zero, f32_one, "%.10f", ImGuiSliderFlags.Logarithmic) s.f32_v = ImGui.SliderScalar("slider float high", ImGuiDataType.Float, s.f32_v, f32_lo_a, f32_hi_a, "%e") @@ -1614,7 +1620,8 @@ function DemoWindowWidgetsDataTypes() s.u8_v = ImGui.SliderScalar("slider u8 reverse", ImGuiDataType.U8, s.u8_v, u8_max, u8_min, "%u") s.s32_v = ImGui.SliderScalar("slider s32 reverse", ImGuiDataType.S32, s.s32_v, s32_fifty, s32_zero, "%d") s.u32_v = ImGui.SliderScalar("slider u32 reverse", ImGuiDataType.U32, s.u32_v, u32_fifty, u32_zero, "%u") - -- [Port] "slider s64 reverse" / "slider u64 reverse": 64-bit types not supported + s.s64_v = ImGui.SliderScalar("slider s64 reverse", ImGuiDataType.S64, s.s64_v, s64_fifty, s64_zero, "%lld") + s.u64_v = ImGui.SliderScalar("slider u64 reverse", ImGuiDataType.U64, s.u64_v, u64_fifty, u64_zero, "%llu ms") IMGUI_DEMO_MARKER("Widgets/Data Types/Inputs") ImGui.SeparatorText("Inputs") @@ -1631,8 +1638,8 @@ function DemoWindowWidgetsDataTypes() s.s32_v = ImGui.InputScalar("input s32 hex", ImGuiDataType.S32, s.s32_v, inputs_step and s32_one or nil, nil, "%04X", flags) s.u32_v = ImGui.InputScalar("input u32", ImGuiDataType.U32, s.u32_v, inputs_step and u32_one or nil, nil, "%u", flags) s.u32_v = ImGui.InputScalar("input u32 hex", ImGuiDataType.U32, s.u32_v, inputs_step and u32_one or nil, nil, "%08X", flags) - -- [Port] ImGui.InputScalar("input s64", ImGuiDataType.S64, ...) -- 64-bit types not supported - -- [Port] ImGui.InputScalar("input u64", ImGuiDataType.U64, ...) -- 64-bit types not supported + s.s64_v = ImGui.InputScalar("input s64", ImGuiDataType.S64, s.s64_v, inputs_step and s64_one or nil, nil, nil, flags) + s.u64_v = ImGui.InputScalar("input u64", ImGuiDataType.U64, s.u64_v, inputs_step and u64_one or nil, nil, nil, flags) s.f32_v = ImGui.InputScalar("input float", ImGuiDataType.Float, s.f32_v, inputs_step and f32_one or nil, nil, nil, flags) s.f64_v = ImGui.InputScalar("input double", ImGuiDataType.Double, s.f64_v, inputs_step and f64_one or nil, nil, nil, flags) @@ -8188,10 +8195,10 @@ function DemoWindowInputs() end ImGui.Text("Mouse delta: (%g, %g)", io.MouseDelta.x, io.MouseDelta.y) ImGui.Text("Mouse down:") - for i = 0, 2 do if ImGui.IsMouseDown(i) then ImGui.SameLine(); ImGui.Text("b%d (%.02f secs)", i, io.MouseDownDuration[i]) end end -- IM_COUNTOF(io.MouseDown) == 3, 0-based + for i = 0, ImGuiMouseButton.COUNT - 1 do if ImGui.IsMouseDown(i) then ImGui.SameLine(); ImGui.Text("b%d (%.02f secs)", i, io.MouseDownDuration[i]) end end -- IM_COUNTOF(io.MouseDown), 0-based ImGui.Text("Mouse wheel: %.1f", io.MouseWheel) ImGui.Text("Mouse clicked count:") - for i = 0, 2 do if io.MouseClickedCount[i] > 0 then ImGui.SameLine(); ImGui.Text("b%d: %d", i, io.MouseClickedCount[i]) end end + for i = 0, ImGuiMouseButton.COUNT - 1 do if io.MouseClickedCount[i] > 0 then ImGui.SameLine(); ImGui.Text("b%d: %d", i, io.MouseClickedCount[i]) end end -- We iterate both legacy native range and named ImGuiKey ranges. This is a little unusual/odd but this allows -- displaying the data for old/new backends. diff --git a/imgui_draw.lua b/imgui_draw.lua index 3a1e1f7..65c9dca 100644 --- a/imgui_draw.lua +++ b/imgui_draw.lua @@ -4144,6 +4144,16 @@ function ImGui.AddDrawListToDrawDataEx(draw_data, out_list, draw_list) IM_ASSERT(draw_list._VtxCurrentIdx == draw_list.VtxBuffer.Size + 1) end + -- Resolve callback data pointers + local cb_buf = draw_list._CallbacksDataBuf + if cb_buf.Size > 0 then + for _, cmd in draw_list.CmdBuffer:iter() do + if cmd.UserCallback ~= nil and cmd.UserCallbackDataOffset ~= -1 and cmd.UserCallbackDataSize > 0 then + cmd.UserCallbackData = cb_buf.Data[cmd.UserCallbackDataOffset + 1] + end + end + end + -- Add to output list + records state in ImDrawData out_list:push_back(draw_list) draw_data.TotalVtxCount = draw_data.TotalVtxCount + draw_list.VtxBuffer.Size @@ -4250,7 +4260,6 @@ end -- Initialize before use in a new frame. We always have a command ready in the buffer. -- In the majority of cases, you would want to call PushClipRect() and PushTexture() after this. --- TODO: function MT.ImDrawList:_ResetForNewFrame() self._ContentClipX0 = nil -- set again by Begin() (Roblox backend scroll reuse) if self._Splitter._Count > 1 then @@ -4272,6 +4281,7 @@ function MT.ImDrawList:_ResetForNewFrame() self._IdxWritePtr = 1 self._ClipRectStack:resize(0) self._TextureStack:resize(0) + self._CallbacksDataBuf:resize(0) self._DrawFlagsStack.Size = 0 -- _DrawFlagsStack.clear() (ImSmallStack_) self._Path:resize(0) @@ -4292,7 +4302,7 @@ function MT.ImDrawList:_ClearFreeMemory() self._ClipRectStack:clear() self._TextureStack:clear() - -- self._CallbacksDataBuf:clear() + self._CallbacksDataBuf:clear() self._DrawFlagsStack.Size = 0 -- _DrawFlagsStack.clear() (ImSmallStack_) self._Path:clear() self._Splitter:ClearFreeMemory() @@ -4365,15 +4375,27 @@ function MT.ImDrawList:AddCallback(callback, userdata, userdata_size) curr_cmd = self.CmdBuffer.Data[self.CmdBuffer.Size] end curr_cmd.UserCallback = callback - -- TODO: _CallbacksDataBuf? if userdata_size == 0 then -- Store user data directly in command (no indirection) curr_cmd.UserCallbackData = userdata - + curr_cmd.UserCallbackDataSize = 0 + curr_cmd.UserCallbackDataOffset = -1 else + -- Copy and store user data in a buffer + -- [Lua] No raw bytes: the "copy" is a shallow copy of a table userdata (other values are immutable and stored as is), + -- so later changes to the caller's table don't affect this command. userdata_size is only recorded. IM_ASSERT(userdata ~= nil) - IM_ASSERT(userdata_size < bit32.lshift(1, 31)) - + IM_ASSERT(userdata_size < 2147483648) -- (1u << 31) + curr_cmd.UserCallbackData = nil -- Will be resolved during Render() + curr_cmd.UserCallbackDataSize = userdata_size + curr_cmd.UserCallbackDataOffset = self._CallbacksDataBuf.Size -- 0-based + local copy = userdata + if type(userdata) == "table" then + copy = {} + for k, v in pairs(userdata) do copy[k] = v end + setmetatable(copy, getmetatable(userdata)) + end + self._CallbacksDataBuf:push_back(copy) -- memcpy() end self:AddDrawCmd() -- Force a new command after us (see comment below) diff --git a/imgui_h.lua b/imgui_h.lua index 009bc0e..33f3e6c 100644 --- a/imgui_h.lua +++ b/imgui_h.lua @@ -75,6 +75,14 @@ function ImU32(val) return bitAnd(val, 0xFFFFFFFF) end --- @return ImS32 function ImS32(val) return bitAnd(val, 0xFFFFFFFF) end +-- [Luau] 64-bit integers are stored in doubles (exact only within +-2^53): the cast just truncates toward zero like a C double->int64 cast. +--- @param val number +--- @return ImS64 +function ImS64(val) if val >= 0 then return math.floor(val) end return -math.floor(-val) end +--- @param val number +--- @return ImU64 +function ImU64(val) if val >= 0 then return math.floor(val) end return -math.floor(-val) end + --- @alias float number --- @class double : number @@ -155,15 +163,17 @@ ImGuiDataType = U16 = 3, -- unsigned short S32 = 4, -- int U32 = 5, -- unsigned int - Float = 6, -- float - Double = 7, -- double - Bool = 8, -- bool (provided for user convenience, not supported by scalar widgets) - String = 9, -- string (provided for user convenience, not supported by scalar widgets) - COUNT = 10 + S64 = 6, -- long long / __int64 -- [Luau] stored in a double: exact only within +-2^53 + U64 = 7, -- unsigned long long / unsigned __int64 -- [Luau] stored in a double: exact only within 0..2^53 + Float = 8, -- float + Double = 9, -- double + Bool = 10, -- bool (provided for user convenience, not supported by scalar widgets) + String = 11, -- string (provided for user convenience, not supported by scalar widgets) + COUNT = 12 } -- Extend ImGuiDataType_ -ImGuiDataType.Pointer = 11 -- [internal] -ImGuiDataType.ID = 12 -- [internal] +ImGuiDataType.Pointer = ImGuiDataType.COUNT -- [internal] +ImGuiDataType.ID = ImGuiDataType.COUNT + 1 -- [internal] ImTextureID_Invalid = -1 @@ -673,7 +683,7 @@ function ImDrawList(data) _Splitter = ImDrawListSplitter(), -- [Internal] for channels api (note: prefer using your own persistent instance of ImDrawListSplitter!) _ClipRectStack = ImVector(), -- [Internal] _TextureStack = ImVector(), -- [Internal] - _CallbacksDataBuf = nil, -- [Internal] + _CallbacksDataBuf = ImVector(), -- [Internal] [Lua] copies of AddCallback() userdata (userdata_size > 0) _DrawFlagsStack = ImVector(), -- [Internal] ImSmallStack_: capacity checked by PushDrawFlag() _FringeScale = 1.0, -- [Internal] anti-alias fringe is scaled by this value, this helps to keep things sharp while zooming at vertex buffer content -- [Luau] 1.0 instead of memset 0 so a list used before _SetPixelDensity() still works _InvFringeScale = 1.0, -- [internal] 1.0 / _FringeScale // FIXME: Consider renaming to _PixelDensity. @@ -1258,7 +1268,7 @@ function ImGuiIO() MouseDelta = ImVec2(), -- Mouse delta. Note that this is zero if either current or previous position are invalid (-FLT_MAX,-FLT_MAX), so a disappearing/reappearing mouse won't have a huge delta. - MouseDown = {[0] = false, [1] = false, [2] = false}, -- Mouse buttons: 0=left, 1=right, 2=middle + extras (ImGuiMouseButton.COUNT == 5). Dear ImGui mostly uses left and right buttons. Other buttons allow us to track if the mouse is being used by your application + available to user as a convenience via IsMouse** API. + MouseDown = {[0] = false, [1] = false, [2] = false, [3] = false, [4] = false}, -- Mouse buttons: 0=left, 1=right, 2=middle + extras (ImGuiMouseButton.COUNT == 5). Dear ImGui mostly uses left and right buttons. Other buttons allow us to track if the mouse is being used by your application + available to user as a convenience via IsMouse** API. MouseWheel = 0, -- Mouse wheel Vertical: 1 unit scrolls about 5 lines text. >0 scrolls Up, <0 scrolls Down. Hold Shift to turn vertical scroll into horizontal scroll. MouseWheelH = 0, -- Mouse wheel Horizontal. >0 scrolls Left, <0 scrolls Right. Most users don't have a mouse with a horizontal wheel, may not be filled by all backends. @@ -1360,23 +1370,23 @@ function ImGuiIO() -- (you can visualize and interact with all options in 'Demo->Configuration') MouseDrawCursor = false, -- = false -- Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor). Cannot be easily renamed to 'io.ConfigXXX' because this is frequently used by backend implementations. - MouseClicked = {[0] = false, [1] = false, [2] = false}, -- Mouse button went from !Down to Down (same as MouseClickedCount[x] != 0) - MouseReleased = {[0] = false, [1] = false, [2] = false}, -- Mouse button went from Down to !Down - MouseClickedCount = {[0] = 0, [1] = 0, [2] = 0}, -- == 0 (not clicked), == 1 (same as MouseClicked[]), == 2 (double-clicked), == 3 (triple-clicked) etc. when going from !Down to Down - MouseClickedLastCount = {[0] = 0, [1] = 0, [2] = 0}, -- Count successive number of clicks. Stays valid after mouse release. Reset after another click is done. - MouseDownDuration = {[0] = -1, [1] = -1, [2] = -1}, -- Duration the mouse button has been down (0.0f == just clicked) - MouseDownDurationPrev = {[0] = -1, [1] = -1, [2] = -1}, -- Previous time the mouse button has been down + MouseClicked = {[0] = false, [1] = false, [2] = false, [3] = false, [4] = false}, -- Mouse button went from !Down to Down (same as MouseClickedCount[x] != 0) + MouseReleased = {[0] = false, [1] = false, [2] = false, [3] = false, [4] = false}, -- Mouse button went from Down to !Down + MouseClickedCount = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0}, -- == 0 (not clicked), == 1 (same as MouseClicked[]), == 2 (double-clicked), == 3 (triple-clicked) etc. when going from !Down to Down + MouseClickedLastCount = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0}, -- Count successive number of clicks. Stays valid after mouse release. Reset after another click is done. + MouseDownDuration = {[0] = -1, [1] = -1, [2] = -1, [3] = -1, [4] = -1}, -- Duration the mouse button has been down (0.0f == just clicked) + MouseDownDurationPrev = {[0] = -1, [1] = -1, [2] = -1, [3] = -1, [4] = -1}, -- Previous time the mouse button has been down - MouseDragMaxDistanceAbs = {[0] = ImVec2(), [1] = ImVec2(), [2] = ImVec2()}, -- Maximum distance, absolute, on each axis, of how much mouse has traveled from the clicking point - MouseDragMaxDistanceSqr = {[0] = 0, [1] = 0, [2] = 0}, -- Squared maximum distance of how much mouse has traveled from the clicking point (used for moving thresholds) + MouseDragMaxDistanceAbs = {[0] = ImVec2(), [1] = ImVec2(), [2] = ImVec2(), [3] = ImVec2(), [4] = ImVec2()}, -- Maximum distance, absolute, on each axis, of how much mouse has traveled from the clicking point + MouseDragMaxDistanceSqr = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0}, -- Squared maximum distance of how much mouse has traveled from the clicking point (used for moving thresholds) - MouseDownOwned = {[0] = nil, [1] = nil, [2] = nil}, -- Track if button was clicked inside a dear imgui window or over void blocked by a popup. We don't request mouse capture from the application if click started outside ImGui bounds. - MouseDownOwnedUnlessPopupClose = {[0] = nil, [1] = nil, [2] = nil}, -- Track if button was clicked inside a dear imgui window. - MouseClickedTime = {[0] = 0, [1] = 0, [2] = 0}, -- Time of last click (used to figure out double-click) - MouseReleasedTime = {[0] = 0, [1] = 0, [2] = 0}, -- Time of last released (rarely used! but useful to handle delayed single-click when trying to disambiguate them from double-click). - MouseClickedPos = {[0] = ImVec2(), [1] = ImVec2(), [2] = ImVec2()}, -- Position at time of clicking + MouseDownOwned = {[0] = nil, [1] = nil, [2] = nil, [3] = nil, [4] = nil}, -- Track if button was clicked inside a dear imgui window or over void blocked by a popup. We don't request mouse capture from the application if click started outside ImGui bounds. + MouseDownOwnedUnlessPopupClose = {[0] = nil, [1] = nil, [2] = nil, [3] = nil, [4] = nil}, -- Track if button was clicked inside a dear imgui window. + MouseClickedTime = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0}, -- Time of last click (used to figure out double-click) + MouseReleasedTime = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0}, -- Time of last released (rarely used! but useful to handle delayed single-click when trying to disambiguate them from double-click). + MouseClickedPos = {[0] = ImVec2(), [1] = ImVec2(), [2] = ImVec2(), [3] = ImVec2(), [4] = ImVec2()}, -- Position at time of clicking - MouseDoubleClicked = {[0] = false, [1] = false, [2] = false}, -- Has mouse button been double-clicked? (same as MouseClickedCount[x] == 2) + MouseDoubleClicked = {[0] = false, [1] = false, [2] = false, [3] = false, [4] = false}, -- Has mouse button been double-clicked? (same as MouseClickedCount[x] == 2) -- Inputs Behaviors -- (other variables, ones which are expected to be tweaked within UI code, are exposed in ImGuiStyle) @@ -2777,6 +2787,17 @@ ImGuiTableBgTarget = { None = 0, RowBg0 = 1, RowBg1 = 2, CellBg = 3 } --- @enum ImGuiSortDirection ImGuiSortDirection = { None = 0, Ascending = 1, Descending = 2 } +-- Resizing callback data to apply custom constraint. As enabled by SetNextWindowSizeConstraints(). Callback is called during the next Begin(). +-- NB: For basic min/max size constraint on each axis you don't need to use the callback! The SetNextWindowSizeConstraints() parameters are enough. +--- @class ImGuiSizeCallbackData +--- @field UserData any Read-only. What user passed to SetNextWindowSizeConstraints(). Generally store an integer or float in here. +--- @field Pos ImVec2 Read-only. Window position, for reference. +--- @field CurrentSize ImVec2 Read-only. Current window size. +--- @field DesiredSize ImVec2 Read-write. Desired size, based on user's mouse position. Write to this field to restrain resizing. +--- @return ImGuiSizeCallbackData +function ImGuiSizeCallbackData() + return { UserData = nil, Pos = ImVec2(), CurrentSize = ImVec2(), DesiredSize = ImVec2() } +end -- Data payload for Drag and Drop operations: AcceptDragDropPayload(), GetDragDropPayload() diff --git a/imgui_widgets.lua b/imgui_widgets.lua index fc2e6e6..318f54d 100644 --- a/imgui_widgets.lua +++ b/imgui_widgets.lua @@ -54,6 +54,11 @@ local IM_S32_MIN = INT_MIN -- (-2147483647 - 1), (0x80000000); local IM_S32_MAX = INT_MAX -- (2147483647), (0x7FFFFFFF) local IM_U32_MIN = 0 local IM_U32_MAX = UINT_MAX -- (0xFFFFFFFF) +-- [Luau] 64-bit limits as doubles: IM_S64_MAX/IM_U64_MAX round up to 2^63/2^64 (values are exact only within +-2^53) +local IM_S64_MIN = -9223372036854775808 -- (-9223372036854775807ll - 1ll) +local IM_S64_MAX = 9223372036854775807 -- (9223372036854775807ll) +local IM_U64_MIN = 0 +local IM_U64_MAX = 18446744073709551615 -- (0xFFFFFFFFFFFFFFFFull) ------------------------------------------------------------------------------- -- [SECTION] Widgets: Text, etc. @@ -786,8 +791,9 @@ function ImGui.ButtonEx(label, size_arg, flags) ImGui.RenderNavCursor(bb, id) ImGui.RenderFrame(bb.Min, bb.Max, col, true, style.FrameRounding) - -- if (g.LogEnabled) - -- LogSetNextTextDecoration("[", "]"); + if g.LogEnabled then + ImGui.LogSetNextTextDecoration("[", "]") + end local text_min, text_max = ButtonEx_text_min, ButtonEx_text_max -- [Luau] scratch: RenderTextClipped() only reads them text_min.x = bb.Min.x + frame_padding.x; text_min.y = bb.Min.y + frame_padding.y text_max.x = bb.Max.x - frame_padding.x; text_max.y = bb.Max.y - frame_padding.y @@ -1369,7 +1375,7 @@ function ImGui.Checkbox(label, v) end if g.LogEnabled then - -- ImGui.LogRenderedText(label_pos, mixed_value and "[~]" or (v and "[x]" or "[ ]")) + ImGui.LogRenderedText(ImVec2(check_bb.Max.x + style.ItemInnerSpacing.x, check_bb.Min.y + style.FramePadding.y), mixed_value and "[~]" or (v and "[x]" or "[ ]")) -- label_pos end if is_visible and label_size.x > 0.0 then @@ -1466,7 +1472,7 @@ function ImGui.RadioButtonEx(label, active) end local label_pos = ImVec2(check_bb.Max.x + style.ItemInnerSpacing.x, check_bb.Min.y + style.FramePadding.y) if g.LogEnabled then - -- ImGui.LogRenderedText(label_pos, active and "(x)" or "( )") + ImGui.LogRenderedText(label_pos, active and "(x)" or "( )") end if label_size.x > 0.0 then ImGui.RenderText(label_pos, label, 1, label_end, false) @@ -1788,7 +1794,7 @@ function ImGui.SeparatorEx(flags, thickness) -- Draw window.DrawList:AddRectFilled(bb.Min, bb.Max, ImGui.GetColorU32(ImGuiCol.Separator)) if g.LogEnabled then - ImGui.LogRenderedText(bb.Min, "--------------------------------") + ImGui.LogRenderedText(bb.Min, "--------------------------------\n") end end @@ -2347,6 +2353,8 @@ local GDataTypeInfo = { ImGuiDataTypeInfo(2, "U16", "%u", "%u"), ImGuiDataTypeInfo(4, "S32", "%d", "%d"), -- ImGuiDataType.S32 ImGuiDataTypeInfo(4, "U32", "%u", "%u"), + ImGuiDataTypeInfo(8, "S64", "%lld", "%lld"), -- ImGuiDataType.S64 + ImGuiDataTypeInfo(8, "U64", "%llu", "%llu"), ImGuiDataTypeInfo(4, "float", "%.3f", "%f"), -- ImGuiDataType.Float ImGuiDataTypeInfo(8, "double", "%f", "%lf"), -- ImGuiDataType.Double ImGuiDataTypeInfo(1, "bool", "%d", "%d"), -- ImGuiDataType.Bool @@ -2359,33 +2367,64 @@ function ImGui.DataTypeGetInfo(data_type) return GDataTypeInfo[data_type + 1] end +-- [Luau] string.format() has no length modifiers (%lld, %I64d...) and formats negative numbers as 64-bit for %u/%x/%X/%o: +-- strip modifiers and re-apply C's integer promotion/two's complement for signed types. +local DataTypeFormatStringCached do +local fmt_info_memo = {} -- format -> { stripped format, is unsigned conversion } +local function GetFormatInfo(format) + local info = fmt_info_memo[format] + if info == nil then + local stripped = string.gsub(string.gsub(format, "(%%[-+ #0']*%d*%.?%d*)[hlLqjzt]+", "%1"), "(%%[-+ #0']*%d*%.?%d*)I64", "%1") + local conv = string.match(stripped, "%%[-+ #0']*%d*%.?%d*([diouxXc])") + info = { stripped, conv == "u" or conv == "x" or conv == "X" or conv == "o" } + fmt_info_memo[format] = info + end + return info +end + +--- Lua-string version of DataTypeFormatString() (memoized), used for display. +--- @param data_type ImGuiDataType +--- @param data number +--- @param format string +--- @return string +function DataTypeFormatStringCached(data_type, data, format) + if data_type == ImGuiDataType.Float or data_type == ImGuiDataType.Double then + return FormatCached(format, data) + end + local info = GetFormatInfo(format) + if data_type == ImGuiDataType.S8 then data = (ImS8)(data) + elseif data_type == ImGuiDataType.U8 then data = (ImU8)(data) + elseif data_type == ImGuiDataType.S16 then data = (ImS16)(data) + elseif data_type == ImGuiDataType.U16 then data = (ImU16)(data) + elseif data_type == ImGuiDataType.S32 then -- (signed values are already stored signed) + elseif data_type == ImGuiDataType.U32 then data = (ImU32)(data) + elseif data_type == ImGuiDataType.S64 or data_type == ImGuiDataType.U64 then + -- (string.format() already prints negative numbers as 64-bit two's complement for %u/%x/%X/%o) + if info[2] then + if data >= 18446744073709551616 then data = -1 end -- (ImU64)-1 rounds to 2^64 in a double: print ULLONG_MAX + elseif data >= 9223372036854775808 then + data = 9223372036854774784 -- largest double below 2^63 (LLONG_MAX isn't representable) + end + return FormatCached(info[1], data) + else + IM_ASSERT(false) + end + if data < 0 and info[2] then data = data + 4294967296 end -- Signedness doesn't matter when pushing integer arguments + return FormatCached(info[1], data) +end +end + --- @param buf char[] --- @param buf_size int --- @param data_type ImGuiDataType --- @param data number --- @param format string +--- @return int function ImGui.DataTypeFormatString(buf, buf_size, data_type, data, format) - local str - if data_type == ImGuiDataType.S32 then - str = ImFormatString(format, (ImS32)(data)) - elseif data_type == ImGuiDataType.U32 then - str = ImFormatString(format, (ImU32)(data)) - elseif data_type == ImGuiDataType.Float then - str = ImFormatString(format, data) - elseif data_type == ImGuiDataType.Double then - str = ImFormatString(format, data) - elseif data_type == ImGuiDataType.S8 then - str = ImFormatString(format, (ImS8)(data)) - elseif data_type == ImGuiDataType.U8 then - str = ImFormatString(format, (ImU8)(data)) - elseif data_type == ImGuiDataType.S16 then - str = ImFormatString(format, (ImS16)(data)) - elseif data_type == ImGuiDataType.U16 then - str = ImFormatString(format, (ImU16)(data)) - else - IM_ASSERT(false) - end - ImStd.ImStrncpy(buf, 1, { string.byte(str, 1, #str) }, 1, ImMin(#str + 1, buf_size)) -- TODO: update this when new ImFormatString is implemented + local str = DataTypeFormatStringCached(data_type, data, format) + local len = ImMin(#str, buf_size - 1) -- ImFormatString(): truncate and return the written length + ImStd.ImStrncpy(buf, 1, { string.byte(str, 1, len) }, 1, len + 1) + return len end --- @param data_type ImGuiDataType @@ -2431,6 +2470,18 @@ function ImGui.DataTypeApplyOp(data_type, op, arg1, arg2) elseif op == 45 then return ImSubClampOverflow(arg1, arg2, IM_U32_MIN, IM_U32_MAX) end + elseif data_type == ImGuiDataType.S64 then + if op == 43 then + return ImAddClampOverflow(arg1, arg2, IM_S64_MIN, IM_S64_MAX) + elseif op == 45 then + return ImSubClampOverflow(arg1, arg2, IM_S64_MIN, IM_S64_MAX) + end + elseif data_type == ImGuiDataType.U64 then + if op == 43 then + return ImAddClampOverflow(arg1, arg2, IM_U64_MIN, IM_U64_MAX) + elseif op == 45 then + return ImSubClampOverflow(arg1, arg2, IM_U64_MIN, IM_U64_MAX) + end elseif data_type == ImGuiDataType.Float then if op == 43 then return arg1 + arg2 @@ -2534,6 +2585,8 @@ function ImGui.DataTypeCompare(data_type, arg1, arg2) elseif data_type == ImGuiDataType.U16 then return DataTypeCompareT((ImU16)(arg1), (ImU16)(arg2)) elseif data_type == ImGuiDataType.S32 then return DataTypeCompareT((ImS32)(arg1), (ImS32)(arg2)) elseif data_type == ImGuiDataType.U32 then return DataTypeCompareT((ImU32)(arg1), (ImU32)(arg2)) + elseif data_type == ImGuiDataType.S64 then return DataTypeCompareT((ImS64)(arg1), (ImS64)(arg2)) + elseif data_type == ImGuiDataType.U64 then return DataTypeCompareT((ImU64)(arg1), (ImU64)(arg2)) elseif data_type == ImGuiDataType.Float then return DataTypeCompareT(arg1, arg2) elseif data_type == ImGuiDataType.Double then return DataTypeCompareT(arg1, arg2) end @@ -2564,6 +2617,8 @@ function ImGui.DataTypeClamp(data_type, data, min, max) elseif data_type == ImGuiDataType.U16 then return DataTypeClampT((ImU16)(data), min and (ImU16)(min), max and (ImU16)(max)) elseif data_type == ImGuiDataType.S32 then return DataTypeClampT((ImS32)(data), min and (ImS32)(min), max and (ImS32)(max)) elseif data_type == ImGuiDataType.U32 then return DataTypeClampT((ImU32)(data), min and (ImU32)(min), max and (ImU32)(max)) + elseif data_type == ImGuiDataType.S64 then return DataTypeClampT((ImS64)(data), min and (ImS64)(min), max and (ImS64)(max)) + elseif data_type == ImGuiDataType.U64 then return DataTypeClampT((ImU64)(data), min and (ImU64)(min), max and (ImU64)(max)) elseif data_type == ImGuiDataType.Float then return DataTypeClampT(data, min, max) elseif data_type == ImGuiDataType.Double then return DataTypeClampT(data, min, max) end @@ -2947,7 +3002,7 @@ function ImGui.InputScalar(label, data_type, data, step, step_fast, format, flag local data_default = (bit32.band(g.NextItemData.HasFlags, ImGuiNextItemDataFlags.HasRefVal) ~= 0) and g.NextItemData.RefVal or g.DataTypeZeroValue - local buf, buf_size = {}, 64 -- TODO: IM_COUNTOF() + local buf, buf_size = {}, 64 -- char buf[64]; IM_COUNTOF(buf) if bit32.band(flags, ImGuiInputTextFlags.DisplayEmptyRefVal) ~= 0 and ImGui.DataTypeCompare(data_type, data, data_default) == 0 then buf[1] = 0 else @@ -3401,6 +3456,10 @@ function ImGui.DragBehavior(id, data_type, v, v_speed, min, max, format, flags) return ImGui.DragBehaviorT(ImS32, ImS32, data_type, v, v_speed, min and min or IM_S32_MIN, max and max or IM_S32_MAX, format, flags) elseif data_type == ImGuiDataType.U32 then return ImGui.DragBehaviorT(ImU32, ImS32, data_type, v, v_speed, min and min or IM_U32_MIN, max and max or IM_U32_MAX, format, flags) + elseif data_type == ImGuiDataType.S64 then + return ImGui.DragBehaviorT(ImS64, ImS64, data_type, v, v_speed, min and min or IM_S64_MIN, max and max or IM_S64_MAX, format, flags) + elseif data_type == ImGuiDataType.U64 then + return ImGui.DragBehaviorT(ImU64, ImS64, data_type, v, v_speed, min and min or IM_U64_MIN, max and max or IM_U64_MAX, format, flags) elseif data_type == ImGuiDataType.Float then return ImGui.DragBehaviorT(float, float, data_type, v, v_speed, min and min or -FLT_MAX, max and max or FLT_MAX, format, flags) elseif data_type == ImGuiDataType.Double then @@ -3553,10 +3612,19 @@ function ImGui.DragScalar(label, data_type, data, v_speed, min, max, format, fla ImGui.MarkItemEdited(id) end - -- TODO: ImGui.DataTypeFormatString() should be used here instead of ImFormatString() - -- Display value using user-provided display format so user can add prefix/suffix/decorations to the value. - ImGui.RenderTextClipped(frame_bb.Min, frame_bb.Max, FormatCached(format, data), nil, nil, DRAG_TEXT_ALIGN) + local is_mixed = bit32.band(g.LastItemData.ItemFlags, ImGuiItemFlags.MixedValue) ~= 0 + local value_buf = DataTypeFormatStringCached(data_type, data, (is_mixed and g.MixedValueLabel ~= nil) and g.MixedValueLabel or format) + if g.LogEnabled then + ImGui.LogSetNextTextDecoration("{", "}") + end + if is_mixed then + ImGui.PushStyleColor(ImGuiCol.Text, g.Style.Colors[ImGuiCol.TextDisabled]) -- ImGuiCol_TextMixedValue + end + ImGui.RenderTextClipped(frame_bb.Min, frame_bb.Max, value_buf, nil, nil, DRAG_TEXT_ALIGN) + if is_mixed then + ImGui.PopStyleColor() + end if label_size.x > 0.0 then ImGui.RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label, 1, label_end, false) @@ -4127,6 +4195,12 @@ function ImGui.SliderBehavior(bb, id, data_type, v, min, max, format, flags, out elseif data_type == ImGuiDataType.U32 then IM_ASSERT(max <= math.floor(IM_U32_MAX / 2)) return ImGui.SliderBehaviorT(ImU32, ImS32, bb, id, data_type, v, min, max, format, flags, out_grab_bb) + elseif data_type == ImGuiDataType.S64 then + IM_ASSERT(min >= IM_S64_MIN / 2 and max <= IM_S64_MAX / 2) + return ImGui.SliderBehaviorT(ImS64, ImS64, bb, id, data_type, v, min, max, format, flags, out_grab_bb) + elseif data_type == ImGuiDataType.U64 then + IM_ASSERT(max <= IM_U64_MAX / 2) + return ImGui.SliderBehaviorT(ImU64, ImS64, bb, id, data_type, v, min, max, format, flags, out_grab_bb) elseif data_type == ImGuiDataType.Float then IM_ASSERT(min >= -FLT_MAX / 2.0 and max <= FLT_MAX / 2.0) return ImGui.SliderBehaviorT(float, float, bb, id, data_type, v, min, max, format, flags, out_grab_bb) @@ -4239,13 +4313,19 @@ function ImGui.SliderScalar(label, data_type, data, min, max, format, flags) window.DrawList:AddRectFilled(grab_bb.Min, grab_bb.Max, ImGui.GetColorU32((g.ActiveId == id) and ImGuiCol.SliderGrabActive or ImGuiCol.SliderGrab), style.GrabRounding) end - -- TODO: ImGui.DataTypeFormatString() should be used here instead of ImFormatString() - -- Display value using user-provided display format so user can add prefix/suffix/decorations to the value. - -- if g.LogEnabled then - -- ImGui.LogSetNextTextDecoration("{", "}") - -- end - ImGui.RenderTextClipped(frame_bb.Min, frame_bb.Max, FormatCached(format, data), nil, nil, DRAG_TEXT_ALIGN) + local is_mixed = bit32.band(g.LastItemData.ItemFlags, ImGuiItemFlags.MixedValue) ~= 0 + local value_buf = DataTypeFormatStringCached(data_type, data, (is_mixed and g.MixedValueLabel ~= nil) and g.MixedValueLabel or format) + if g.LogEnabled then + ImGui.LogSetNextTextDecoration("{", "}") + end + if is_mixed then + ImGui.PushStyleColor(ImGuiCol.Text, g.Style.Colors[ImGuiCol.TextDisabled]) -- ImGuiCol_TextMixedValue + end + ImGui.RenderTextClipped(frame_bb.Min, frame_bb.Max, value_buf, nil, nil, DRAG_TEXT_ALIGN) + if is_mixed then + ImGui.PopStyleColor() + end if label_size.x > 0.0 then ImGui.RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label, 1, label_end, false) @@ -4461,9 +4541,15 @@ function ImGui.VSliderScalar(label, size, data_type, data, min, max, format, fla -- Display value using user-provided display format so user can add prefix/suffix/decorations to the value. -- For the vertical slider we allow centered text to overlap the frame padding - -- local value_buf, value_buf_size = {}, 64 - -- TODO: ImGui.DataTypeFormatString() - ImGui.RenderTextClipped(ImVec2(frame_bb.Min.x, frame_bb.Min.y + style.FramePadding.y), frame_bb.Max, ImFormatString(format, data), nil, nil, ImVec2(0.5, 0.0)) + local is_mixed = bit32.band(g.LastItemData.ItemFlags, ImGuiItemFlags.MixedValue) ~= 0 + local value_buf = DataTypeFormatStringCached(data_type, data, (is_mixed and g.MixedValueLabel ~= nil) and g.MixedValueLabel or format) + if is_mixed then + ImGui.PushStyleColor(ImGuiCol.Text, g.Style.Colors[ImGuiCol.TextDisabled]) -- ImGuiCol_TextMixedValue + end + ImGui.RenderTextClipped(ImVec2(frame_bb.Min.x, frame_bb.Min.y + style.FramePadding.y), frame_bb.Max, value_buf, nil, nil, ImVec2(0.5, 0.0)) + if is_mixed then + ImGui.PopStyleColor() + end if label_size.x > 0.0 then ImGui.RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label, 1, label_end, false) end @@ -6350,6 +6436,12 @@ function ImGui.InputTextEx(label, hint, buf, buf_size, size_arg, flags, callback state.TextSrc = nil end + -- Log as text + if g.LogEnabled and (not is_password or is_displaying_hint) then + ImGui.LogSetNextTextDecoration("{", "}") + ImGui.LogRenderedText(draw_pos, ImGui._ByteArrayToString(buf_display, 1, buf_display_end)) + end + if label_size.x > 0.0 then ImGui.RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label, 1, label_end, false) end @@ -7968,9 +8060,9 @@ function ImGui.TreeNodeBehavior(id, flags, label, label_end) if bit32.band(flags, ImGuiTreeNodeFlags.ClipLabelForTrailingButton) ~= 0 then frame_bb.Max.x = frame_bb.Max.x - (g.FontSize + style.FramePadding.x) end - -- if g.LogEnabled then - -- ImGui.LogSetNextTextDecoration("###", "###") - -- end + if g.LogEnabled then + ImGui.LogSetNextTextDecoration("###", "###") + end else -- Unframed typed for tree nodes if hovered or selected then @@ -7986,9 +8078,9 @@ function ImGui.TreeNodeBehavior(id, flags, label, label_end) elseif not is_leaf then ImGui.RenderArrow(window.DrawList, ImVec2(text_pos.x - text_offset_x + padding_x, text_pos.y + g.FontSize * 0.15), text_col, is_open and ((bit32.band(flags, ImGuiTreeNodeFlags.UpsideDownArrow) ~= 0) and ImGuiDir.Up or ImGuiDir.Down) or ImGuiDir.Right, 0.70) end - -- if g.LogEnabled then - -- ImGui.LogSetNextTextDecoration(">", nil) - -- end + if g.LogEnabled then + ImGui.LogSetNextTextDecoration(">", nil) + end end if draw_tree_lines then @@ -10447,7 +10539,7 @@ function ImGui.BeginMenuEx(label, icon, enabled) ImGui.PushStyleVarX(ImGuiStyleVar.ItemSpacing, style.ItemSpacing.x * 2.0) local text_pos = ImVec2(window.DC.CursorPos.x + offsets.OffsetLabel, pos.y + window.DC.CurrLineTextBaseOffset) pressed = ImGui.Selectable("", menu_is_open, selectable_flags, label_size) - -- TODO: ImGui.LogSetNextTextDecoration("[", "]") + ImGui.LogSetNextTextDecoration("[", "]") ImGui.RenderText(text_pos, label, 1, label_end, false) ImGui.PopStyleVar() window.DC.CursorPos.x = window.DC.CursorPos.x + IM_TRUNC(style.ItemSpacing.x * (-1.0 + 0.5)) -- -1 spacing to compensate the spacing added when Selectable() did a SameLine(). It would also work to call SameLine() ourselves after the PopStyleVar(). @@ -10463,7 +10555,7 @@ function ImGui.BeginMenuEx(label, icon, enabled) local extra_w = ImMax(0.0, ImGui.GetContentRegionAvail().x - min_w) local text_pos = ImVec2(window.DC.CursorPos.x, pos.y + window.DC.CurrLineTextBaseOffset) pressed = ImGui.Selectable("", menu_is_open, bit32.bor(selectable_flags, ImGuiSelectableFlags.SpanAvailWidth), ImVec2(min_w, label_size.y)) - -- ImGui.LogSetNextTextDecoration("", ">") + ImGui.LogSetNextTextDecoration("", ">") ImGui.RenderText(ImVec2(text_pos.x + offsets.OffsetLabel, text_pos.y), label, 1, label_end, false) if icon_w > 0.0 then --- @cast icon string @@ -10713,7 +10805,7 @@ function ImGui.MenuItemEx(label, icon, shortcut, selected, enabled) end if shortcut_w > 0.0 then ImGui.PushStyleColor(ImGuiCol.Text, style.Colors[ImGuiCol.TextDisabled]) - -- ImGui.LogSetNextTextDecoration("(", ")") + ImGui.LogSetNextTextDecoration("(", ")") --- @cast shortcut string ImGui.RenderText(text_pos + ImVec2(offsets.OffsetShortcut + stretch_w, 0.0), shortcut, nil, nil, false) ImGui.PopStyleColor() diff --git a/imstd_minstdio.lua b/imstd_minstdio.lua index 7875626..7f20970 100644 --- a/imstd_minstdio.lua +++ b/imstd_minstdio.lua @@ -3,7 +3,8 @@ -- Supports: -- - %x, %X, %nx, %nX (where n is a number) --- - %d, %nd (where n is a number) +-- - %d, %nd, %u, %nu (where n is a number) +-- - length modifiers h, hh, l, ll, I64 on integers: ll/I64 = 64-bit range (doubles: exact only within +-2^53) -- - %f, %lf (very limited) -- -- Returns items_matched instead of EOF on error @@ -17,6 +18,9 @@ local CHAR_0, CHAR_9 = _byte'0', _byte'9' local CHAR_a, CHAR_A = _byte'a', _byte'A' local CHAR_d = _byte'd' local CHAR_l = _byte'l' +local CHAR_h = _byte'h' +local CHAR_u = _byte'u' +local CHAR_I = _byte'I' local CHAR_f, CHAR_F = _byte'f', _byte'F' local CHAR_x, CHAR_X = _byte'x', _byte'X' @@ -37,10 +41,15 @@ local function hex_digit_to_int(c) end -- we force this behavior by default -local function clamp_if_overflow(spec, val) +local function clamp_if_overflow(spec, val, is_64) if spec == CHAR_d or spec == CHAR_x or spec == CHAR_X then - if val > INT_MAX then return INT_MAX end - if val < INT_MIN then return INT_MIN end + local max = is_64 and 9223372036854775807 or INT_MAX + local min = is_64 and -9223372036854775808 or INT_MIN + if val > max then return max end + if val < min then return min end + elseif spec == CHAR_u then + local max = is_64 and 18446744073709551615 or UINT_MAX + if val > max then return max end end return val @@ -104,22 +113,27 @@ local function sscanf(buffer, buffer_begin, format, result) width = math.huge end + -- length modifiers + local n_l = 0 + while _byte(format, f, f) == CHAR_l or _byte(format, f, f) == CHAR_h do + if _byte(format, f, f) == CHAR_l then n_l = n_l + 1 end + f = f + 1 + end + if _byte(format, f, f) == CHAR_I and string.sub(format, f, f + 2) == "I64" then + n_l = 2 + f = f + 3 + end + local is_64 = n_l >= 2 + local spec = _byte(format, f, f) local base local is_float = false if spec == CHAR_x or spec == CHAR_X then base = 16 - elseif spec == CHAR_d then + elseif spec == CHAR_d or spec == CHAR_u then base = 10 elseif spec == CHAR_f or spec == CHAR_F then - is_float = true - elseif spec == CHAR_l then - f = f + 1 - if _byte(format, f, f) == CHAR_f then - is_float = true -- TODO: distinguish from float? - else - return items_matched - end + is_float = true -- TODO: distinguish %lf from %f? else return items_matched end @@ -197,11 +211,14 @@ local function sscanf(buffer, buffer_begin, format, result) val = val * base + sign * hex_digit_to_int(c) local old_val = val - val = clamp_if_overflow(spec, val) + val = clamp_if_overflow(spec, val, is_64) if old_val ~= val then break end end + if spec == CHAR_u and val < 0 then + val = val + (is_64 and 18446744073709551616 or 4294967296) -- unsigned wrap-around like strtoul() + end end result[assigned + 1] = val diff --git a/tools/test/check_all.sh b/tools/test/check_all.sh index 43ae769..e26c58c 100755 --- a/tools/test/check_all.sh +++ b/tools/test/check_all.sh @@ -14,7 +14,7 @@ CHECKS=( "cached|CACHED OK|$R --main tools/test/scripts/t_cached_window.luau --frames 130" "fixes|FIXES OK|$R --main tools/test/scripts/t_fixes.luau --frames 55" "debugtools|DEBUGTOOLS OK|$R --main tools/test/scripts/t_debugtools.luau --frames 65" -"helpers|HELPERS OK|$R --main tools/test/scripts/t_helpers.luau --frames 35" +"helpers|HELPERS OK|$R --main tools/test/scripts/t_helpers.luau --frames 45" "multiselect|MULTISELECT OK|$R --main tools/test/scripts/t_multiselect.luau --frames 380" "nodemo|NODEMO OK|NO_DEMO=1 $R --main tools/test/scripts/t_nodemo.luau --frames 25" "widgets|OK|$R --main tools/test/scripts/t_widgets.luau --frames 80" diff --git a/tools/test/love/run.sh b/tools/test/love/run.sh index 1160573..2f57bef 100755 --- a/tools/test/love/run.sh +++ b/tools/test/love/run.sh @@ -4,4 +4,4 @@ set -e cd "$(dirname "$0")/../../.." python3 tools/bundle.py --target love >/dev/null nix-shell -p luajit --run "luajit tools/test/love/t_drawhash.lua 150 Widgets,Basic && luajit tools/test/love/t_drawhash.lua 150 all && luajit tools/test/love/t_examples.lua" -echo "expected (Luau, tools/test/scripts/t_drawhash.luau): 154977593 / 338324359" +echo "expected (Luau, tools/test/scripts/t_drawhash.luau): 154977593 / 263656315" diff --git a/tools/test/scripts/t_helpers.luau b/tools/test/scripts/t_helpers.luau index d39d75b..a20cdfd 100644 --- a/tools/test/scripts/t_helpers.luau +++ b/tools/test/scripts/t_helpers.luau @@ -1,5 +1,6 @@ -- Small upstream helpers: ImGuiInputTextState selection API + ReloadUserBuf*, ImGuiInputTextCallbackData:SetSelection, ImDrawList AddImageQuad/PrimQuadUV/ --- CloneOutput, ImDrawData DeIndexAllBuffers/ScaleClipRects, ImBitVector/ImBitArray*, ImGuiPackedDate, ImParseFormatSanitizeForPrinting, drag cancel (ShortcutsForCancel) +-- CloneOutput, ImDrawData DeIndexAllBuffers/ScaleClipRects, ImBitVector/ImBitArray*, ImGuiPackedDate, ImParseFormatSanitizeForPrinting, drag cancel (ShortcutsForCancel), +-- log decorations, ImGuiDataType.S64/U64, BringWindowToDisplayBehind, ImGuiSizeCallbackData local G = require(game:GetService("ReplicatedStorage"):WaitForChild("ImGui")) local ImGui, ImVec2 = G.ImGui, G.ImVec2 ImGui.CreateContext(); G.ImGui_ImplRoblox.Init() @@ -40,6 +41,7 @@ local function cb(data) return 0 end local df, rect_df = 10.0, nil +local s64_v = 2 ^ 40 local f = 0 local function center(r) return (r[1].x + r[2].x) / 2, (r[1].y + r[2].y) / 2 end @@ -218,8 +220,82 @@ game:GetService("RunService").Stepped:Connect(function() check(not string.find(ImGui.SaveIniSettingsToMemory(), "LastUsed", 1, true), "ConfigIniSettingsSaveLastUsedDate = false") io.ConfigIniSettingsSaveLastUsedDate = true pio.Platform_SessionDate = 0 + + -- Log decorations: Selectable/Button/Checkbox/MenuItem shortcut + ImGui.LogToBuffer() + ImGui.Selectable("sel item") + ImGui.Button("btn") + ImGui.Checkbox("chk", true) + ImGui.MenuItem("mi", "Ctrl+M") + local log = g.LogBuffer:c_str() + ImGui.LogFinish() + check(string.find(log, "[sel item]", 1, true) == nil and string.find(log, "sel item", 1, true) ~= nil, "Selectable logs plain label: " .. log) + check(string.find(log, "[ btn ]", 1, true) ~= nil and string.find(log, "[x]", 1, true) ~= nil and string.find(log, "mi ( Ctrl+M )", 1, true) ~= nil, "LogSetNextTextDecoration [ ]: " .. log) + + -- DragScalar S64/U64 (doubles) + DataTypeFormatString + local v64, ch = ImGui.DragScalar("##s64", G.ImGuiDataType.S64, 2 ^ 40, 1.0) + check(v64 == 2 ^ 40 and ch == false, "DragScalar S64 idle") + local b64 = {} + local n = ImGui.DataTypeFormatString(b64, 64, G.ImGuiDataType.S64, -(2 ^ 40), "%lld") + check(G.ImGui._ByteArrayToString(b64, 1, n + 1) == "-1099511627776", "DataTypeFormatString S64") + n = ImGui.DataTypeFormatString(b64, 64, G.ImGuiDataType.U64, 18446744073709551615, "%llu") + check(G.ImGui._ByteArrayToString(b64, 1, n + 1) == "18446744073709551615", "DataTypeFormatString U64 max") + n = ImGui.DataTypeFormatString(b64, 64, G.ImGuiDataType.S32, -5, "%X") + check(G.ImGui._ByteArrayToString(b64, 1, n + 1) == "FFFFFFFB", "DataTypeFormatString S32 hex") + local tb = ImGui.NewTextBuffer("-123456789012", 64) + local r64, c64 = ImGui.DataTypeApplyFromText(tb, G.ImGuiDataType.S64, 0, "%lld") + check(r64 == -123456789012 and c64, "DataTypeApplyFromText S64 " .. tostring(r64)) + check(ImGui.DataTypeApplyOp(G.ImGuiDataType.S64, 43, 2 ^ 62, 2 ^ 62) == 9223372036854775807, "DataTypeApplyOp S64 clamp") + check(G.ImGuiDataType.Float == 8 and G.ImGuiDataType.COUNT == 12 and ImGui.DataTypeGetInfo(G.ImGuiDataType.Float).Name == "float", "ImGuiDataType layout") end + -- DragScalar S64: drag with the mouse + local s64_rect + s64_v = ImGui.DragScalar("##drag_s64", G.ImGuiDataType.S64, s64_v, 1.0) + do local a, b = ImGui.GetItemRectMin(), ImGui.GetItemRectMax(); s64_rect = { ImVec2(a.x, a.y), ImVec2(b.x, b.y) } end + if f == 33 then io:AddMousePosEvent(center(s64_rect)) end + if f == 34 then io:AddMouseButtonEvent(0, true) end + if f == 35 then local x, y = center(s64_rect); io:AddMousePosEvent(x + 30, y) end + if f == 37 then io:AddMouseButtonEvent(0, false); check(s64_v > 2 ^ 40 and s64_v == math.floor(s64_v), "DragScalar S64 drag " .. s64_v) end ImGui.End() + + -- BringWindowToDisplayBehind + if f == 38 then + local g = ImGui.GetCurrentContext() + local wa, wb, wc = ImGui.FindWindowByName("WA"), ImGui.FindWindowByName("WB"), ImGui.FindWindowByName("WC") + local function idx(w) return ImGui.FindWindowDisplayIndex(w) end + ImGui.BringWindowToDisplayFront(wa); ImGui.BringWindowToDisplayFront(wb); ImGui.BringWindowToDisplayFront(wc) + local n0 = g.Windows.Size + ImGui.BringWindowToDisplayBehind(wc, wa) -- move forward-placed window behind: WC WA WB + check(idx(wc) + 1 == idx(wa) and idx(wa) + 1 == idx(wb) and g.Windows.Size == n0, ("BringWindowToDisplayBehind back %d %d %d"):format(idx(wa), idx(wb), idx(wc))) + ImGui.BringWindowToDisplayBehind(wa, wb) -- already directly behind: unchanged + check(idx(wc) + 1 == idx(wa) and idx(wa) + 1 == idx(wb), "BringWindowToDisplayBehind no-op") + ImGui.BringWindowToDisplayBehind(wc, wb) -- WA WC WB + check(idx(wa) + 1 == idx(wc) and idx(wc) + 1 == idx(wb) and g.Windows.Size == n0, ("BringWindowToDisplayBehind fwd %d %d %d"):format(idx(wa), idx(wb), idx(wc))) + end + for _, name in { "WA", "WB", "WC" } do + ImGui.SetNextWindowPos(ImVec2(820, 10)); ImGui.SetNextWindowSize(ImVec2(80, 60)) + ImGui.Begin(name); ImGui.End() + end + + -- Size callback (Step + AspectRatio) + ImGui.SetNextWindowPos(ImVec2(10, 420)) + if f <= 3 then ImGui.SetNextWindowSize(ImVec2(237, 160)) end + ImGui.SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(G.FLT_MAX, G.FLT_MAX), function(data) + local step = data.UserData + check(data.Pos ~= nil and data.CurrentSize ~= nil and not rawequal(data.DesiredSize, data.CurrentSize), "ImGuiSizeCallbackData fields") + data.DesiredSize = ImVec2(math.floor(data.DesiredSize.x / step + 0.5) * step, math.floor(data.DesiredSize.y / step + 0.5) * step) + end, 100.0) + ImGui.Begin("Step"); local step_size = ImGui.GetWindowSize(); ImGui.End() + ImGui.SetNextWindowPos(ImVec2(300, 420)) + if f <= 3 then ImGui.SetNextWindowSize(ImVec2(320, 100)) end + ImGui.SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(G.FLT_MAX, G.FLT_MAX), function(data) + data.DesiredSize.y = math.floor(data.DesiredSize.x / data.UserData) + end, 16 / 9) + ImGui.Begin("Aspect"); local asp_size = ImGui.GetWindowSize(); ImGui.End() + if f == 5 then + check(step_size.x == 200 and step_size.y == 200, ("size callback Step %gx%g"):format(step_size.x, step_size.y)) + check(asp_size.x == 320 and asp_size.y == 180, ("size callback AspectRatio %gx%g"):format(asp_size.x, asp_size.y)) + end ImGui.Render(); G.ImGui_ImplRoblox.RenderDrawData(ImGui.GetDrawData()) - if f == 32 and #failed == 0 then print("HELPERS OK") end + if f == 40 and #failed == 0 then print("HELPERS OK") end end)