Skip to content

Commit

Permalink
addedTest1(unfinished)
Browse files Browse the repository at this point in the history
  • Loading branch information
lka committed Jul 1, 2022
1 parent 944f69c commit 2498fdc
Show file tree
Hide file tree
Showing 130 changed files with 498 additions and 194 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
eventHandling
addKeyframe
self updateInformationText: 'Added keyframe.'.
self selectedTreeNode addKeyframe.

self selectedTreeNode isActivated
ifTrue: [
self updateInformationText: 'Added keyframe.'.
self selectedTreeNode addKeyframe.]
ifFalse: [
self updateInformationText: 'Activate property first'.].
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ buildComponents
createPropertyWith: aMorph
^ AnimationsEditorProperty new animationsEditor: self;
targetMorph: aMorph;
title: '' , self propertyList size , ' - ' , aMorph className;
title: '' , (self propertyList size + 1), ' - ' , aMorph className;
yourself.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ initialization
seedProperties
self propertyStartEnd: AnimationsEditorPropertyStartEnd new.
self propertyStartEnd animationsEditor: self.
self propertyList add: self propertyStartEnd.
"self propertyList add: self propertyStartEnd."
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@ accessing
selectedTreeNode: aNode
selectedTreeNode := aNode.
aNode canRenderUI
ifTrue: [self
insertMorph: (aNode buildUIWith: self toolBuilder)
Into: self propertyEditorPanel].
ifTrue: [
(aNode isActivated)
ifTrue: [
self
insertMorph: (aNode buildUIWith: self toolBuilder)
Into: self propertyEditorPanel]
ifFalse: [
self
insertMorph: (aNode buildActivatePanelWith: self toolBuilder) Into: self propertyEditorPanel].].

aNode isStartEnd
ifFalse: [self switchTimelineToMorphWith: aNode].
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"class" : {
"open" : "FH 8/1/2021 18:50" },
"open" : "ob 6/20/2022 20:28" },
"instance" : {
"addKeyframe" : "mjs 7/31/2021 17:11",
"addKeyframe" : "NR 6/26/2022 15:41",
"addPropertiesToImageMorphOn:" : "FH 8/1/2021 18:47",
"addPropertiesToMorphOn:" : "FH 8/1/2021 18:47",
"addPropertiesToMorphOn:" : "NR 6/26/2022 14:09",
"addPropertiesToTextMorphOn:" : "FH 8/1/2021 18:47",
"addSelectedMorphFor:" : "LW 7/31/2021 12:50",
"addSubPropertiesOn:" : "FH 8/1/2021 18:48",
Expand All @@ -22,14 +22,14 @@
"buildResetButtonWith:" : "FH 8/1/2021 18:43",
"buildSaveButtonWith:" : "FH 8/1/2021 18:44",
"buildTimeline:" : "FH 8/1/2021 18:44",
"buildWith:" : "FH 8/1/2021 18:44",
"buildWith:" : "ob 6/20/2022 20:40",
"collectAllEmptyPanels" : "FH 8/1/2021 18:44",
"collectInformationBar" : "FH 8/1/2021 18:44",
"collectPropertyTreeMorph" : "FH 8/1/2021 18:44",
"createColorPropertyOn:" : "FH 8/1/2021 18:45",
"createImageSourcePropertyOn:" : "LW 7/26/2021 16:42",
"createPositionPropertyOn:" : "LW 7/26/2021 16:43",
"createPropertyWith:" : "FH 8/1/2021 18:46",
"createPropertyWith:" : "Noel Bastubbe 6/22/2022 12:14",
"createRotationPropertyOn:" : "LW 7/26/2021 16:43",
"createSizePropertyOn:" : "LW 7/26/2021 16:43",
"createTextPropertyOn:" : "LW 7/26/2021 16:44",
Expand All @@ -46,7 +46,7 @@
"informationBar:" : "DM 7/8/2020 15:03",
"informationBarText" : "FH 8/1/2021 18:49",
"informationBarText:" : "FH 8/1/2021 18:50",
"initialize" : "FH 8/1/2021 18:49",
"initialize" : "NR 6/26/2022 15:00",
"initializeJsonHandler" : "FH 8/1/2021 18:49",
"initializePropertyEditorPanel" : "FH 8/1/2021 18:49",
"insertMorph:Into:" : "FH 8/1/2021 18:46",
Expand All @@ -71,10 +71,10 @@
"resetTargetMorph" : "FH 8/1/2021 18:48",
"saveAnimations" : "FH 8/1/2021 18:48",
"savedAnimationText" : "mjs 7/31/2021 15:08",
"seedProperties" : "Noel Bastubbe 6/14/2022 15:28",
"seedProperties" : "Noel Bastubbe 6/22/2022 11:27",
"selectMorphByHand" : "FH 8/1/2021 18:49",
"selectedTreeNode" : "JIZ 5/27/2020 15:31",
"selectedTreeNode:" : "FH 8/1/2021 18:27",
"selectedTreeNode:" : "ob 6/26/2022 19:02",
"switchTimelineToMorphWith:" : "FH 8/1/2021 18:49",
"timeline" : "FH 8/1/2021 18:27",
"timeline:" : "FH 8/1/2021 18:27",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
initialization
on: anAnimationsEditorTrack withPosition: aPoint withFrame: aFrame withValue: aValue withAnimationsEditor: anAnimationsEditor
^ self basicNew track: anAnimationsEditorTrack;
frame: aFrame;
value: aValue;
initialize;
setCenteredPosition: aPoint;
animationsEditor: anAnimationsEditor;
yourself.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
animationsEditor: anObject
animationsEditor := anObject
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
animationsEditor
^ animationsEditor
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
as yet unclassified
handlesMouseDown: anEvent
^ true
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
as yet unclassified
mouseDown: anEvent
anEvent redButtonPressed
ifTrue: [
self setValueAndFrame.
self animationsEditor selectedTreeNode: self selectProperty.
].
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
as yet unclassified
selectProperty
|targetMorph property parentProperty propertyList|
"targetMorph := self animationsEditor propertyList second."
parentProperty := self track property parentProperty title.
propertyList := self animationsEditor propertyList.
targetMorph := propertyList detect: [:each | parentProperty match: each title].


targetMorph hasSubproperties
ifTrue: [property := targetMorph subproperties detect: [:each| self track property asString match: each asString]].
^property


Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
as yet unclassified
setValueAndFrame
|property selectedFrame selectedValue|
property := self selectProperty.
selectedFrame:= self frame.
selectedValue := property targetValues at: self frame.
self track property currentValue: selectedValue.
self track property targetFrame: selectedFrame.
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
{
"class" : {
"on:withPosition:withFrame:withValue:" : "FH 8/1/2021 19:05" },
"on:withPosition:withFrame:withValue:" : "FH 8/1/2021 19:05",
"on:withPosition:withFrame:withValue:withAnimationsEditor:" : "SG 6/17/2022 15:45" },
"instance" : {
"animationsEditor" : "SG 6/17/2022 15:43",
"animationsEditor:" : "SG 6/17/2022 15:43",
"frame" : "mjs 7/31/2021 15:46",
"frame:" : "mjs 7/31/2021 15:46",
"handlesMouseDown:" : "SG 6/17/2022 14:57",
"initialize" : "mjs 7/31/2021 15:45",
"mouseDown:" : "SG 6/25/2022 16:11",
"selectProperty" : "SG 6/27/2022 19:17",
"setCenteredPosition:" : "FH 8/1/2021 19:04",
"setValueAndFrame" : "SG 6/25/2022 16:10",
"track" : "mjs 7/31/2021 15:46",
"track:" : "mjs 7/31/2021 15:46",
"value:" : "mjs 7/31/2021 15:46" } }
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"instvars" : [
"track",
"frame",
"value" ],
"value",
"animationsEditor" ],
"name" : "AnimationsEditorKeyframe",
"pools" : [
],
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
accessing
animationDuration

^ self timeline endTime - self timeline startTime.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
as yet unclassified
initialization
initialize
super initialize.
self
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
as yet unclassified
constants
lineWidth
^3.
^ 3.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
accessing
movingLine: anObject
movingLine := anObject
movingLine := anObject.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
accessing
movingLine
^ movingLine
^ movingLine.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
accessing
positionY: anObject
positionY := anObject
positionY := anObject.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
accessing
positionY
^ positionY
^ positionY.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
accessing
setMovingSpeedPerHundredMilliseconds

self speed: (self timeline width - (self startMargin) - (self endMargin)) / self animationDuration * 100.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
accessing
speed: anObject
speed := anObject
speed := anObject.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
accessing
speed
^ speed
^ speed.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
as yet unclassified
stepping and presenter
step
| endPositionX|

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
as yet unclassified
stepping and presenter
stepTime
^100.
^ 100.
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
"animationDuration" : "ob 6/9/2022 21:31",
"initialize" : "ob 6/9/2022 21:29",
"lineWidth" : "ob 6/9/2022 20:18",
"movingLine" : "6/17/2022 14:09:28",
"movingLine:" : "6/17/2022 14:09:28",
"positionY" : "ob 6/9/2022 21:26",
"positionY:" : "ob 6/9/2022 21:26",
"setMovingSpeedPerHundredMilliseconds" : "ob 6/9/2022 21:31",
"speed" : "ob 6/9/2022 20:26",
"speed:" : "ob 6/9/2022 20:26",
"step" : "ob 6/9/2022 20:45",
"stepTime" : "ob 6/9/2022 20:15" } }
"stepTime" : "Noel Bastubbe 6/22/2022 12:27" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
propertyActivation
activateProperty
self animationsEditor selectedTreeNode isActivated: true.
self animationsEditor selectedTreeNode: self.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
buildComponents
buildActivateFrameWith: aBuilder
^ aBuilder pluggableButtonSpec new model: self;
label: 'Activate property';
enabled: true;
action: #activateProperty;
frame: (LayoutFrame new topFraction: 0;
bottomFraction: 0.1;
leftFraction: 0;
rightFraction: 1;
yourself);
yourself.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
buildComponents
buildActivatePanelWith: aBuilder
| aPluggablePanelSpec |

aPluggablePanelSpec := aBuilder pluggablePanelSpec new
model: self;
frame: (LayoutFrame new
topFraction: 0.1;
bottomFraction: 0.9;
leftFraction: 0.1;
rightFraction: 0.8;
yourself);
children: {self buildActivateFrameWith: aBuilder.
};
yourself.

^ aBuilder build: aPluggablePanelSpec.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
buildComponents
buildDeactivateFrameWith: aBuilder
^ aBuilder pluggableButtonSpec new model: self;
label: 'Deactivate property';
enabled: true;
action: #deactivateProperty;
frame: (LayoutFrame new topFraction: 0;
bottomFraction: 0.1;
leftFraction: 0;
rightFraction: 1;
yourself);
yourself.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
buildComponents
buildStartPanelWith: aBuilder
| aPluggablePanelSpec |

aPluggablePanelSpec := aBuilder pluggablePanelSpec new
model: self;
frame: (LayoutFrame new
topFraction: 0.1;
bottomFraction: 0.9;
leftFraction: 0.1;
rightFraction: 0.8;
yourself);
children: {self buildActivateFrameWith: aBuilder.};
yourself.

^ aBuilder build: aPluggablePanelSpec.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
propertyActivation
deactivateProperty
self animationsEditor selectedTreeNode isActivated: false.
self animationsEditor selectedTreeNode: self.
self animationsEditor selectedTreeNode deleteAllKeyframes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
propertyActivation
deleteAllKeyframes
self targetValues copy keysDo: [:key| (key = 0) ifFalse: [self targetValues removeKey: key].].
self changed: #deleteKeyframes.

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
initialization
initialize
super initialize.
self isActivated: false.
self addStartFrame.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
isActivated: aBoolean
isActivated := aBoolean.
Loading

0 comments on commit 2498fdc

Please sign in to comment.