2022-07-07 21:53:14 +00:00
|
|
|
package etk
|
|
|
|
|
|
|
|
import "github.com/hajimehoshi/ebiten/v2"
|
|
|
|
|
2023-10-29 06:04:32 +00:00
|
|
|
// Shortcuts represents a keyboard shortcut configuration.
|
2022-07-07 21:53:14 +00:00
|
|
|
type Shortcuts struct {
|
|
|
|
ConfirmKeyboard []ebiten.Key
|
|
|
|
ConfirmMouse []ebiten.MouseButton
|
|
|
|
ConfirmGamepad []ebiten.GamepadButton
|
2024-01-22 00:18:31 +00:00
|
|
|
|
|
|
|
// A sentinel rune value may be set for the confirm and back actions.
|
|
|
|
// This allows working around on-screen keyboard issues on Android.
|
|
|
|
ConfirmRune rune
|
|
|
|
BackRune rune
|
2022-07-07 21:53:14 +00:00
|
|
|
}
|
|
|
|
|
2023-10-29 06:04:32 +00:00
|
|
|
// Bindings is the current keyboard shortcut configuration.
|
2022-07-07 21:53:14 +00:00
|
|
|
var Bindings = &Shortcuts{
|
|
|
|
ConfirmKeyboard: []ebiten.Key{ebiten.KeyEnter, ebiten.KeyKPEnter},
|
2024-01-11 20:19:14 +00:00
|
|
|
ConfirmMouse: []ebiten.MouseButton{ebiten.MouseButtonLeft, ebiten.MouseButtonRight},
|
2022-07-07 21:53:14 +00:00
|
|
|
ConfirmGamepad: []ebiten.GamepadButton{ebiten.GamepadButton0},
|
|
|
|
}
|