Skip to content

Commit

Permalink
feat(game): Make horizontal mouse scrolls move by 2
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Jul 15, 2024
1 parent 6ef745e commit c311f9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/game/game.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,11 @@ func (g *Game) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
case tea.MouseButtonWheelUp:
g.y = max(g.y-1, 0)
case tea.MouseButtonWheelLeft:
g.x = max(g.x-1, 0)
g.x = max(g.x-2, 0)
case tea.MouseButtonWheelDown:
g.y = min(g.y+1, g.BoardH()-g.viewH)
case tea.MouseButtonWheelRight:
g.x = min(g.x+1, g.BoardW()-g.viewW)
g.x = min(g.x+2, g.BoardW()-g.viewW)
}
}
case tea.KeyMsg:
Expand Down

0 comments on commit c311f9f

Please sign in to comment.