aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2025-08-26 18:14:28 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2025-08-26 18:14:28 +0200
commit7580ff84ca18afecc3aaed52fd075fcdd25ee102 (patch)
tree9aa3e44e7bcb8db9fc0e8081dbbbc655dafeafdf
parentf1353ebaf7f55367fcda17bc1b9ae85d23916b40 (diff)
downloadmuhqs-game-7580ff84ca18afecc3aaed52fd075fcdd25ee102.tar.gz
muhqs-game-7580ff84ca18afecc3aaed52fd075fcdd25ee102.zip
Revert "consider scale when detecting selected card in cardGrid"
This reverts commit 62edf951ac1cffa608f650203026b4d642ce4bc3.
-rw-r--r--go/ui/cardGrid.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/go/ui/cardGrid.go b/go/ui/cardGrid.go
index f7e64e7e..a474abe4 100644
--- a/go/ui/cardGrid.go
+++ b/go/ui/cardGrid.go
@@ -131,8 +131,7 @@ func (w *CardGrid) FindObjectAt(_x, _y int) any {
return nil
}
- x := int(float64(_x-w.X-w.xOffset)/w.scale)
- y := int(float64(_y-w.Y-w.yOffset)/w.scale)
+ x, y := _x-w.X-w.xOffset, _y-w.Y-w.yOffset
gridBounds := w.grid.Bounds()
if x > gridBounds.Dx() || y > gridBounds.Dy() {