#UI_ENHANCEMENT by cg
authorClaus Gittinger <cg@exept.de>
Tue, 17 May 2016 07:47:49 +0200
changeset 5755 76a6cb14852f
parent 5753 d8465881eb1f
child 5756 8bf39c14ecda
#UI_ENHANCEMENT by cg class: Label changed: #doAnimate #pointerEnter:x:y: #startAnimation
Label.st
--- 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
 !