You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/src/main/kotlin/imgui/api/windowScrolling.kt
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ interface windowScrolling {
41
41
/** center_x_ratio: 0.0f left of last item, 0.5f horizontal center of last item, 1.0f right of last item.
42
42
*
43
43
* adjust scrolling amount to make current cursor position visible. center_x_ratio=0.0: left, 0.5: center, 1.0: right. When using to make a "default/current item" visible, consider using SetItemDefaultFocus() instead. */
44
-
funsetScrollHereX(centerXRatio:Float) {
44
+
funsetScrollHereX(centerXRatio:Float = 0.5f) {
45
45
val window = g.currentWindow!!
46
46
val spacingX = window.windowPadding.x max style.itemSpacing.x
47
47
val targetPosX = lerp(g.lastItemData.rect.min.x - spacingX, g.lastItemData.rect.max.x + spacingX, centerXRatio)
@@ -64,7 +64,7 @@ interface windowScrolling {
64
64
window.scrollTargetEdgeSnapDist.y =0f max (window.windowPadding.y - spacingY)
0 commit comments