Add proper and reliable (i hope) support for modifier keys
This commit is contained in:
@@ -34,7 +34,7 @@ func main () {
|
||||
if err != nil { panic(err) }
|
||||
}
|
||||
|
||||
func onPress (button stone.Button) {
|
||||
func onPress (button stone.Button, modifiers stone.Modifiers) {
|
||||
if button == stone.MouseButtonLeft {
|
||||
mousePressed = true
|
||||
application.SetRune(0, 0, '+')
|
||||
|
||||
@@ -32,7 +32,7 @@ func main () {
|
||||
if err != nil { panic(err) }
|
||||
}
|
||||
|
||||
func onPress (button stone.Button) {
|
||||
func onPress (button stone.Button, modifiers stone.Modifiers) {
|
||||
println("press", button)
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ func drawCaret () {
|
||||
application.SetColor(caretX, caretY, stone.ColorDim)
|
||||
}
|
||||
|
||||
func onPress (button stone.Button) {
|
||||
func onPress (button stone.Button, modifiers stone.Modifiers) {
|
||||
width, height := application.Size()
|
||||
|
||||
if button == stone.KeyEnter {
|
||||
|
||||
Reference in New Issue
Block a user