Skip to content

Commit

Permalink
nums as int iotas
Browse files Browse the repository at this point in the history
  • Loading branch information
bhperry committed Oct 13, 2023
1 parent f265504 commit 34b47dc
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions input.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ const (
MouseButton8

// Last iota
numMouseButtons
NumMouseButtons = int(numMouseButtons)
// NOTE: These will be unexported in the future when Window is move to the pixel package.
NumMouseButtons int = iota

// Aliases
MouseButtonLeft = MouseButton1
Expand All @@ -34,7 +34,7 @@ const (

const (
// List of all keyboard buttons.
KeyUnknown Button = iota + numMouseButtons
KeyUnknown Button = iota + Button(NumMouseButtons)
KeySpace
KeyApostrophe
KeyComma
Expand Down Expand Up @@ -157,8 +157,8 @@ const (
KeyMenu

// Last iota
numKeys
NumKeys = int(numKeys)
// NOTE: These will be unexported in the future when Window is move to the pixel package.
NumKeys int = iota
)

var buttonNames = map[Button]string{
Expand Down Expand Up @@ -325,8 +325,8 @@ const (
Joystick16

// Last iota
numJoysticks
NumJoysticks = int(numJoysticks)
// NOTE: These will be unexported in the future when Window is move to the pixel package.
NumJoysticks int = iota
)

var joystickNames = map[Joystick]string{
Expand Down Expand Up @@ -369,9 +369,9 @@ const (
AxisLeftTrigger
AxisRightTrigger

// Last iota
numAxes
NumAxes = int(numAxes)
// Last iota.
// NOTE: These will be unexported in the future when Window is move to the pixel package.
NumAxes int = iota
)

var gamepadAxisNames = map[GamepadAxis]string{
Expand Down

0 comments on commit 34b47dc

Please sign in to comment.