@@ -25,10 +25,10 @@ import imgui.ImGui.itemSize
2525import imgui.ImGui.navInitWindow
2626import imgui.ImGui.popClipRect
2727import imgui.ImGui.pushClipRect
28+ import imgui.ImGui.renderArrow
2829import imgui.ImGui.renderFrame
2930import imgui.ImGui.renderNavHighlight
3031import imgui.ImGui.renderTextClipped
31- import imgui.ImGui.renderArrow
3232import imgui.ImGui.scrollbar
3333import imgui.ImGui.setActiveId
3434import imgui.ImGui.setNextWindowSize
@@ -39,14 +39,14 @@ import imgui.internal.*
3939import kotlin.math.floor
4040import kotlin.math.max
4141import kotlin.reflect.KMutableProperty0
42+ import imgui.FocusedFlag as Ff
43+ import imgui.HoveredFlag as Hf
4244import imgui.ItemFlag as If
4345import imgui.WindowFlag as Wf
4446import imgui.internal.ButtonFlag as Bf
4547import imgui.internal.DrawCornerFlag as Dcf
4648import imgui.internal.DrawListFlag as Dlf
4749import imgui.internal.LayoutType as Lt
48- import imgui.FocusedFlag as Ff
49- import imgui.HoveredFlag as Hf
5050
5151
5252/* * (Begin = push window to the stack and start appending to it. End = pop window from the stack.
@@ -373,7 +373,7 @@ interface imgui_window {
373373 val sc = style.mouseCursorScale
374374 val refPos = if (! g.navDisableHighlight && g.navDisableMouseHover) navCalcPreferredMousePos() else Vec2 (io.mousePos)
375375 val rectToAvoid =
376- if (! g.navDisableHighlight && g.navDisableMouseHover && io.configFlags hasnt ConfigFlag .NavMoveMouse )
376+ if (! g.navDisableHighlight && g.navDisableMouseHover && io.configFlags hasnt ConfigFlag .NavEnableSetMousePos )
377377 Rect (refPos.x - 16 , refPos.y - 8 , refPos.x + 16 , refPos.y + 8 )
378378 else
379379 Rect (refPos.x - 16 , refPos.y - 8 , refPos.x + 24 * sc, refPos.y + 24 * sc) // FIXME: Hard-coded based on mouse cursor shape expectation. Exact dimension not very important.
@@ -397,11 +397,10 @@ interface imgui_window {
397397 window.pos put glm.floor(window.posF)
398398
399399 // Default item width. Make it proportional to window size if window manually resizes
400- window.itemWidthDefault =
401- if (window.size.x > 0f && flags hasnt Wf .Tooltip && flags hasnt Wf .AlwaysAutoResize )
402- (window.size.x * 0.65f ).i.f
403- else (g.fontSize * 16f ).i.f
404-
400+ window.itemWidthDefault = when {
401+ window.size.x > 0f && flags hasnt Wf .Tooltip && flags hasnt Wf .AlwaysAutoResize -> window.size.x * 0.65f
402+ else -> g.fontSize * 16f
403+ }.i.f
405404 // Prepare for focus requests
406405 window.focusIdxAllRequestCurrent =
407406 if (window.focusIdxAllRequestNext == Int .MAX_VALUE || window.focusIdxAllCounter == - 1 )
@@ -674,9 +673,9 @@ interface imgui_window {
674673
675674 // Inner clipping rectangle
676675 // Force round operator last to ensure that e.g. (int)(max.x-min.x) in user's render code produce correct result.
677- window.innerClipRect.min.x = floor(0.5f + window.innerRect.min.x + max(0f , floor(window.windowPadding.x* 0.5f - window.windowBorderSize)))
676+ window.innerClipRect.min.x = floor(0.5f + window.innerRect.min.x + max(0f , floor(window.windowPadding.x * 0.5f - window.windowBorderSize)))
678677 window.innerClipRect.min.y = floor(0.5f + window.innerRect.min.y)
679- window.innerClipRect.max.x = floor(0.5f + window.innerRect.max.x - max(0f , floor(window.windowPadding.x* 0.5f - window.windowBorderSize)))
678+ window.innerClipRect.max.x = floor(0.5f + window.innerRect.max.x - max(0f , floor(window.windowPadding.x * 0.5f - window.windowBorderSize)))
680679 window.innerClipRect.max.y = floor(0.5f + window.innerRect.max.y)
681680
682681 /* After begin() we fill the last item / hovered data using the title bar data. Make that a standard behavior
0 commit comments