mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/ui: stop panicking at Key.String
This commit is contained in:
parent
8e1bd4eaba
commit
e6346c01d2
@ -493,7 +493,7 @@ func (k Key) String() string {
|
||||
{{range $index, $name := .UIKeyNames}}case Key{{$name}}:
|
||||
return {{$name | printf "Key%s" | printf "%q"}}
|
||||
{{end}}}
|
||||
panic(fmt.Sprintf("ui: invalid key: %d", k))
|
||||
return fmt.Sprintf("Key(%d)", k)
|
||||
}
|
||||
`
|
||||
|
||||
|
@ -348,5 +348,5 @@ func (k Key) String() string {
|
||||
case KeyTab:
|
||||
return "KeyTab"
|
||||
}
|
||||
panic(fmt.Sprintf("ui: invalid key: %d", k))
|
||||
return fmt.Sprintf("Key(%d)", k)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user