#UI_ENHANCEMENT by cg
class: Label
changed:
#doAnimate
#pointerEnter:x:y:
#startAnimation
--- a/Label.st Tue May 17 00:03:28 2016 +0200
+++ b/Label.st Tue May 17 07:47:49 2016 +0200
@@ -23,7 +23,7 @@
!
Object subclass:#AnimatorState
- instanceVariableNames:'timedBlock nextOffset logoShown moveDirection'
+ instanceVariableNames:'timedBlock nextOffset logoShown moveDirection pointerEntered'
classVariableNames:''
poolDictionaries:''
privateIn:Label
@@ -1499,6 +1499,11 @@
self computeLabelOrigin.
^ self.
].
+ (controller notNil and:[controller entered]) ifTrue:[
+ "/ pause animation
+ Processor addTimedBlock:(animatorState timedBlock) after:0.5 seconds.
+ ^ self.
+ ].
offset := animatorState nextOffset max:0.
@@ -1555,6 +1560,8 @@
|timedBlock|
+ self enableEnterLeaveEvents.
+
self stopAnimation.
timedBlock := [ self doAnimate ].
@@ -2142,6 +2149,14 @@
nextOffset := something.
!
+pointerEntered
+ ^ pointerEntered
+!
+
+pointerEntered:something
+ pointerEntered := something.
+!
+
timedBlock
^ timedBlock
!