diff options
Diffstat (limited to 'go/ui/mapView.go')
| -rw-r--r-- | go/ui/mapView.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/go/ui/mapView.go b/go/ui/mapView.go index c292d526..43ea0f01 100644 --- a/go/ui/mapView.go +++ b/go/ui/mapView.go @@ -173,6 +173,10 @@ func (vw *MapView) FindObjectAt(x_px, y_px int) interface{} { x := x_px / TILE_WIDTH y := y_px / TILE_HEIGHT + if x < 0 || y < 0 { + return nil + } + // TODO: detect if a permanent or the containing tile was selected for _, u := range vw.gameState.Permanents { pos := u.GetTile().Position |
