-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
69 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
Class { | ||
#name : #SBFlashDecorator, | ||
#superclass : #SBBlockDecorator, | ||
#instVars : [ | ||
'endTime' | ||
], | ||
#category : #'Sandblocks-Core' | ||
} | ||
|
||
{ #category : #'as yet unclassified' } | ||
SBFlashDecorator >> attached: aMorph [ | ||
|
||
super attached: aMorph. | ||
endTime := Time millisecondClock + self duration | ||
] | ||
|
||
{ #category : #'as yet unclassified' } | ||
SBFlashDecorator >> color [ | ||
|
||
^ (Color r: 1 g: 1 b: 0.0) alpha: (endTime - Time millisecondClock / self duration) asFloat | ||
] | ||
|
||
{ #category : #'as yet unclassified' } | ||
SBFlashDecorator >> duration [ | ||
|
||
^ 400 | ||
] | ||
|
||
{ #category : #'as yet unclassified' } | ||
SBFlashDecorator >> postDrawOn: aCanvas [ | ||
|
||
self color alpha. | ||
aCanvas frameRectangle: self morph bounds width: 4 color: self color | ||
] | ||
|
||
{ #category : #'as yet unclassified' } | ||
SBFlashDecorator >> step [ | ||
|
||
Time millisecondClock > endTime ifTrue: [self detach]. | ||
self morph changed | ||
] | ||
|
||
{ #category : #'as yet unclassified' } | ||
SBFlashDecorator >> stepTime [ | ||
|
||
^ 0 | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters