@@ -335,8 +335,8 @@ interface imgui_internal {
335335 itemFlags = itemFlagsStack.lastOrNull() ? : If .Default_ .i
336336 }
337337
338- fun setCurrentFont (font : Font ) {
339- assert (font.isLoaded){ " Font Atlas not created. Did you call io.Fonts->GetTexDataAsRGBA32 / GetTexDataAsAlpha8 ?" }
338+ fun setCurrentFont (font : Font ) {
339+ assert (font.isLoaded) { " Font Atlas not created. Did you call io.Fonts->GetTexDataAsRGBA32 / GetTexDataAsAlpha8 ?" }
340340 assert (font.scale > 0f )
341341 g.font = font
342342 g.fontBaseSize = io.fontGlobalScale * g.font.fontSize * g.font.scale
@@ -2261,7 +2261,7 @@ interface imgui_internal {
22612261 inputTextCalcTextSizeW(text, p, textSelectedEnd, it, stopOnNewLine = true ).also { p = it() }
22622262 }
22632263 // So we can see selected empty lines
2264- if (rectSize.x <= 0f ) rectSize.x = (g.font.getCharAdvance_ssaaaaaaa (' ' ) * 0.5f ).i.f
2264+ if (rectSize.x <= 0f ) rectSize.x = (g.font.getCharAdvance_ssaaaaaaaa (' ' ) * 0.5f ).i.f
22652265 val rect = Rect (rectPos + Vec2 (0f , bgOffYUp - g.fontSize), rectPos + Vec2 (rectSize.x, bgOffYDn))
22662266 val clipRect_ = Rect (clipRect)
22672267 rect.clipWith(clipRect_)
@@ -2442,9 +2442,10 @@ interface imgui_internal {
24422442 g.scalarAsInputTextId = g.activeId
24432443 setHoveredId(id)
24442444 }
2445- return if (textValueChanged)
2446- dataTypeApplyOpFromText(buf, g.inputTextState.initialText, dataType, data)
2447- else false
2445+ return when {
2446+ textValueChanged -> dataTypeApplyOpFromText(buf, g.inputTextState.initialText, dataType, data)
2447+ else -> false
2448+ }
24482449 }
24492450
24502451 /* * Note: only access 3 floats if ColorEditFlag.NoAlpha flag is set. */
@@ -2811,17 +2812,17 @@ interface imgui_internal {
28112812
28122813 // Modal windows prevents cursor from hovering behind them.
28132814 val modalWindow = frontMostModalRootWindow
2814- if (modalWindow != null )
2815- if (g.hoveredRootWindow?.isChildOf(modalWindow) == false )
2815+ if (modalWindow != null )
2816+ if (g.hoveredRootWindow?.isChildOf(modalWindow) == false )
28162817 nullate()
28172818 // Disabled mouse?
28182819 if (io.configFlags has ConfigFlag .NoMouse )
28192820 nullate()
28202821
28212822 // We track click ownership. When clicked outside of a window the click is owned by the application and won't report hovering nor request capture even while dragging over our windows afterward.
2822- var mouseEarliestButtonDown = - 1
2823+ var mouseEarliestButtonDown = - 1
28232824 var mouseAnyDown = false
2824- for (i in io.mouseDown.indices) {
2825+ for (i in io.mouseDown.indices) {
28252826 if (io.mouseClicked[i])
28262827 io.mouseDownOwned[i] = g.hoveredWindow != null || g.openPopupStack.isNotEmpty()
28272828 mouseAnyDown = mouseAnyDown || io.mouseDown[i]
@@ -2852,7 +2853,7 @@ interface imgui_internal {
28522853 io.wantCaptureKeyboard = true
28532854
28542855 // Update io.WantTextInput flag, this is to allow systems without a keyboard (e.g. mobile, hand-held) to show a software keyboard if possible
2855- io.wantTextInput = if (g.wantTextInputNextFrame != - 1 ) g.wantTextInputNextFrame != 0 else false
2856+ io.wantTextInput = if (g.wantTextInputNextFrame != - 1 ) g.wantTextInputNextFrame != 0 else false
28562857 }
28572858
28582859 /* * Parse display precision back from the display format string */
0 commit comments