Skip to content

Commit

Permalink
More descriptive strings for invalid input type values
Browse files Browse the repository at this point in the history
  • Loading branch information
bhperry committed Oct 14, 2023
1 parent f361084 commit 2feb51c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions input.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type Button int
func (b Button) String() string {
name, ok := buttonNames[b]
if !ok {
return "Invalid"
return "InvalidButton"
}
return name
}
Expand Down Expand Up @@ -295,7 +295,7 @@ type Joystick int
func (j Joystick) String() string {
name, ok := joystickNames[j]
if !ok {
return "Invalid"
return "InvalidJoystick"
}
return name
}
Expand Down Expand Up @@ -350,7 +350,7 @@ type GamepadAxis int
func (ga GamepadAxis) String() string {
name, ok := gamepadAxisNames[ga]
if !ok {
return "Invalid"
return "InvalidGamepadAxis"
}
return name
}
Expand Down Expand Up @@ -385,7 +385,7 @@ type GamepadButton int
func (gb GamepadButton) String() string {
name, ok := gamepadButtonNames[gb]
if !ok {
return "Invalid"
return "InvalidGamepadButton"
}
return name
}
Expand Down

0 comments on commit 2feb51c

Please sign in to comment.