Skip to content

Commit

Permalink
Merge pull request #73 from hpi-swa-teaching/feature/clickableKeyframes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ol-Ba committed Jun 27, 2022
2 parents bf1eb7d + e35aa6e commit 41ffbda
Show file tree
Hide file tree
Showing 118 changed files with 300 additions and 363 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
eventHandling
addKeyframe

self selectedTreeNode isActivated
ifTrue: [
self updateInformationText: 'Added keyframe.'.
self selectedTreeNode addKeyframe.]
ifFalse: [
self updateInformationText: 'Activate property first'.].
self updateInformationText: 'Added keyframe.'.
self selectedTreeNode addKeyframe.
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 + 1), ' - ' , aMorph className;
title: '' , self propertyList size , ' - ' , 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,15 +2,8 @@ accessing
selectedTreeNode: aNode
selectedTreeNode := aNode.
aNode canRenderUI
ifTrue: [
(aNode isActivated)
ifTrue: [
self
insertMorph: (aNode buildUIWith: self toolBuilder)
Into: self propertyEditorPanel]
ifFalse: [
self
insertMorph: (aNode buildActivatePanelWith: self toolBuilder) Into: self propertyEditorPanel].].

ifTrue: [self
insertMorph: (aNode buildUIWith: 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" : "ob 6/20/2022 20:28" },
"open" : "FH 8/1/2021 18:50" },
"instance" : {
"addKeyframe" : "NR 6/26/2022 15:41",
"addKeyframe" : "mjs 7/31/2021 17:11",
"addPropertiesToImageMorphOn:" : "FH 8/1/2021 18:47",
"addPropertiesToMorphOn:" : "NR 6/26/2022 14:09",
"addPropertiesToMorphOn:" : "FH 8/1/2021 18:47",
"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:" : "ob 6/20/2022 20:40",
"buildWith:" : "FH 8/1/2021 18:44",
"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:" : "Noel Bastubbe 6/22/2022 12:14",
"createPropertyWith:" : "FH 8/1/2021 18:46",
"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" : "NR 6/26/2022 15:00",
"initialize" : "FH 8/1/2021 18:49",
"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/22/2022 11:27",
"seedProperties" : "Noel Bastubbe 6/14/2022 15:28",
"selectMorphByHand" : "FH 8/1/2021 18:49",
"selectedTreeNode" : "JIZ 5/27/2020 15:31",
"selectedTreeNode:" : "ob 6/26/2022 19:02",
"selectedTreeNode:" : "FH 8/1/2021 18:27",
"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
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
as yet unclassified
addMovingLine
| line |
"self movingLine: (self addLineFrom: 105@25 to: 105@125)."

line := LineMorph
from: 105@25
to: 105@125
color: Color black
width: self lineWidth.
self movingLine: line.
self addMorph: line.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
accessing
animationDuration

^ self timeline endTime - self timeline startTime.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
initialization
as yet unclassified
initialize
super initialize.
self
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
constants
as yet unclassified
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,3 +1,4 @@
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 @@
stepping and presenter
as yet unclassified
step
| endPositionX|

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
stepping and presenter
as yet unclassified
stepTime
^ 100.
^100.
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@
"on:withPosition:withExtent:" : "ob 6/9/2022 21:39",
"on:withPositionY:withExtent:" : "ob 6/9/2022 21:40" },
"instance" : {
"animationDuration" : "Noel Bastubbe 6/22/2022 12:25",
"addMovingLine" : " 6/17/2022 14:09:28",
"animationDuration" : "ob 6/9/2022 21:31",
"initialize" : "ob 6/9/2022 21:29",
"lineWidth" : "Noel Bastubbe 6/22/2022 12:27",
"movingLine" : "Noel Bastubbe 6/22/2022 12:25",
"movingLine:" : "Noel Bastubbe 6/22/2022 12:26",
"positionY" : "Noel Bastubbe 6/22/2022 12:26",
"positionY:" : "Noel Bastubbe 6/22/2022 12:26",
"setMovingSpeedPerHundredMilliseconds" : "Noel Bastubbe 6/22/2022 12:26",
"speed" : "Noel Bastubbe 6/22/2022 12:26",
"speed:" : "Noel Bastubbe 6/22/2022 12:26",
"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" : "Noel Bastubbe 6/22/2022 12:27" } }
"stepTime" : "ob 6/9/2022 20:15" } }

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 41ffbda

Please sign in to comment.