mirror of
https://github.com/clockworkpi/LauncherGoDev.git
synced 2026-09-06 13:34:36 +02:00
test KeyDown event
This commit is contained in:
13
main.go
13
main.go
@@ -61,16 +61,15 @@ func run() int {
|
||||
if ev.Type == event.KEYDOWN {
|
||||
fmt.Println(ev)
|
||||
if ev.Data["Key"] == "Q" {
|
||||
main_screen.OnExitCb()
|
||||
return 0
|
||||
}
|
||||
if ev.Data["Key"] == "Escape" {
|
||||
return 0
|
||||
}
|
||||
if ev.Data["Key"] == "T" {
|
||||
}else if ev.Data["Key"] == "D" {
|
||||
time.Delay(1000)
|
||||
}
|
||||
if ev.Data["Key"] == "P" {
|
||||
}else if ev.Data["Key"] == "P" {
|
||||
event.Post(event.RUNEVT,"GODEBUG=cgocheck=0 sucks") // just id and string, simpify the stuff
|
||||
|
||||
}else {
|
||||
main_screen.KeyDown(ev)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user