diff --git a/common/src/main/kotlin/fr/username404/snowygui/ClickGui.kt b/common/src/main/kotlin/fr/username404/snowygui/ClickGui.kt index 304eb94..fdbb081 100644 --- a/common/src/main/kotlin/fr/username404/snowygui/ClickGui.kt +++ b/common/src/main/kotlin/fr/username404/snowygui/ClickGui.kt @@ -16,8 +16,9 @@ object ClickGui: SnowyScreen() { components.forEach { if (((d >= it.x) && (d <= (it.x + it.width))) and ((e >= it.y) && (e <= (it.y + it.height))) and !GuiDragging) { GuiDragging = true - it.x = d + (d - (it.x + it.width)) - it.y = e + (e - (it.y + it.height)) + Snowy.logs.info("$d, $e") + it.x = d.minus(f) + (d - (it.x + it.width)) + it.y = e.minus(g) + (e - (it.y + it.height)) } else GuiDragging = false } }