Skip to content

Commit 476462c

Browse files
committed
fixed Interactive with Hue wheel bug
1 parent a3b9e47 commit 476462c

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

imgui.ini

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
[Window][Debug##Default]
2-
Pos=60.0,60.0
3-
Size=400,400
4-
Collapsed=0
5-
61
[Window][ImGui Demo]
72
Pos=650.0,20.0
83
Size=550,680
94
Collapsed=0
105

6+
[Window][Debug##Default]
7+
Pos=60.0,60.0
8+
Size=400,400
9+
Collapsed=0
10+

src/main/kotlin/imgui/imgui/inputs.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ interface imgui_inputs {
126126
return Vec2()
127127
}
128128

129-
fun resetMouseDragDelta(button: Int = 0) = io.mouseClickedPos.get(button).put(io.mousePos) // NB: We don't need to reset g.io.MouseDragMaxDistanceSqr
129+
// fun resetMouseDragDelta(button: Int = 0) = io.mouseClickedPos[button].put(io.mousePos) // NB: We don't need to reset g.io.MouseDragMaxDistanceSqr
130130

131131
var mouseCursor
132132
/** Get desired cursor type, reset in newFrame(), this is updated during the frame. valid before render().

src/main/kotlin/imgui/imgui/main.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ interface imgui_main {
453453
mouseClickedTime[i] = -Float.MAX_VALUE // so the third click isn't turned into a double-click
454454
} else
455455
mouseClickedTime[i] = g.time
456-
mouseClickedPos[i] = mousePos
456+
mouseClickedPos[i] put mousePos
457457
mouseDragMaxDistanceAbs[i] put 0f
458458
mouseDragMaxDistanceSqr[i] = 0f
459459
} else if (mouseDown[i]) {
@@ -801,7 +801,7 @@ interface imgui_main {
801801
adjustDelta *= 10f
802802
}
803803
if (g.activeIdSource == InputSource.Nav) {
804-
val decimalPrecision = when (dataType) {
804+
val decimalPrecision = when (dataType) {
805805
DataType.Float, DataType.Double -> parseFormatPrecision(format, 3)
806806
else -> 0
807807
}
@@ -890,7 +890,7 @@ interface imgui_main {
890890
adjustDelta *= 10f
891891
}
892892
if (g.activeIdSource == InputSource.Nav) {
893-
val decimalPrecision = when (dataType) {
893+
val decimalPrecision = when (dataType) {
894894
DataType.Float, DataType.Double -> parseFormatPrecision(format, 3)
895895
else -> 0
896896
}

0 commit comments

Comments
 (0)