[qwaq] Add hover listener to button

Forgot about this (very useful for tooltips etc).
This commit is contained in:
Bill Currie 2020-03-19 13:57:10 +09:00
parent bd3884f6fa
commit db39f7ed3e
2 changed files with 7 additions and 0 deletions

View file

@ -15,6 +15,7 @@
ListenerGroup *onClick; ListenerGroup *onClick;
ListenerGroup *onDrag; ListenerGroup *onDrag;
ListenerGroup *onAuto; ListenerGroup *onAuto;
ListenerGroup *onHover;
} }
-initWithPos: (Point) pos releasedIcon: (DrawBuffer *) released -initWithPos: (Point) pos releasedIcon: (DrawBuffer *) released
pressedIcon: (DrawBuffer *) pressed; pressedIcon: (DrawBuffer *) pressed;
@ -23,6 +24,7 @@
-(ListenerGroup *) onClick; -(ListenerGroup *) onClick;
-(ListenerGroup *) onDrag; -(ListenerGroup *) onDrag;
-(ListenerGroup *) onAuto; -(ListenerGroup *) onAuto;
-(ListenerGroup *) onHover;
@end @end
#endif//__qwaq_button_h #endif//__qwaq_button_h

View file

@ -17,6 +17,7 @@
onClick = [[ListenerGroup alloc] init]; onClick = [[ListenerGroup alloc] init];
onDrag = [[ListenerGroup alloc] init]; onDrag = [[ListenerGroup alloc] init];
onAuto = [[ListenerGroup alloc] init]; onAuto = [[ListenerGroup alloc] init];
onHover = [[ListenerGroup alloc] init];
return self; return self;
} }
@ -88,4 +89,8 @@
return onAuto; return onAuto;
} }
-(ListenerGroup *) onHover
{
return onHover;
}
@end @end