Add 'zero' event

Close #3263
This commit is contained in:
Junegunn Choi committed 2023-04-26 15:13:08 +09:00
1 parent 65dd2bb429
commit cf95e44cb4
6 files changed
+49 -7

No files matched your search

+10
View File
@@ -94,6 +94,7 @@ const (
Load
Focus
One
Zero
AltBS
@@ -283,6 +284,15 @@ type Event struct {
MouseEvent *MouseEvent
}
func (e Event) Is(types ...EventType) bool {
for _, t := range types {
if e.Type == t {
return true
}
}
return false
}
type MouseEvent struct {
Y int
X int