Replies: 1 comment 1 reply
-
Problem: large space of event types avail on every widget
.On(gi.MouseButtonEvent, func(e gi.Event) {
if e.Button() == mouse.Left && e.Action() == mouse.Press { // issue: these accessors are event specific....
...
}
})
with specific signatures:
.OnMouseButton(func(e gi.MouseEvent) {
// now have direct access to MouseEvent fields.. and methods..
})
|
Beta Was this translation helpful? Give feedback.
-
Key features:
Alternative 1: One mega signal that blasts everything to everyone
Alternative 2: Specific signals for each type of signal -- NO args
Alternative 3: Better version of 1 with signal put up front
Alternative 4: Type safe direct methods (Revision of 2)
Beta Was this translation helpful? Give feedback.
All reactions