28 lines
336 B
Go
28 lines
336 B
Go
|
package kibodo
|
||
|
|
||
|
import (
|
||
|
"github.com/hajimehoshi/ebiten/v2"
|
||
|
)
|
||
|
|
||
|
type Key struct {
|
||
|
LowerLabel string
|
||
|
UpperLabel string
|
||
|
LowerInput *Input
|
||
|
UpperInput *Input
|
||
|
|
||
|
x, y int
|
||
|
w, h int
|
||
|
}
|
||
|
|
||
|
type Input struct {
|
||
|
Rune rune
|
||
|
Key ebiten.Key
|
||
|
}
|
||
|
|
||
|
func (i *Input) String() string {
|
||
|
if i.Rune > 0 {
|
||
|
return string(i.Rune)
|
||
|
}
|
||
|
return i.Key.String()
|
||
|
}
|