Skip to content

Commit

Permalink
texturen für executecontrols
Browse files Browse the repository at this point in the history
  • Loading branch information
Das-Killer committed Jun 23, 2024
1 parent 6768d25 commit d1a50b9
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 42 deletions.
69 changes: 45 additions & 24 deletions .squot-materialize
Original file line number Diff line number Diff line change
@@ -1,64 +1,85 @@
[
SquotImageMapper {
#path : FSAbsolutePath [
'assets',
'Cloverleaf.png'
],
#encoding : Class [ #PNGReadWriter ]
},
SquotImageMapper {
#path : FSAbsolutePath [
'assets',
'play.png'
],
#encoding : @4
},
SquotTonelMapper {
#package : MCPackage {
#name : 'BaselineOfSqueakKara'
#name : 'SqueakKara-Tests'
},
#path : FSAbsolutePath [
'src'
]
},
SquotTonelMapper {
#package : MCPackage {
#name : 'SqueakKara-Core'
},
#path : @4
SquotImageMapper {
#path : FSAbsolutePath [
'assets',
'stop.png'
],
#encoding : @4
},
SquotImageMapper {
#path : FSAbsolutePath [
'assets',
'Kara-FacingUp.png'
],
#encoding : @4
},
SquotTonelMapper {
#package : MCPackage {
#name : 'SqueakKara-Tests'
#name : 'SqueakKara-Core'
},
#path : @4
#path : @9
},
SquotImageMapper {
#path : FSAbsolutePath [
'assets',
'Trunk.png'
'pause.png'
],
#encoding : Class [ #PNGReadWriter ]
#encoding : @4
},
SquotImageMapper {
#path : FSAbsolutePath [
'assets',
'Cloverleaf.png'
'Trunk.png'
],
#encoding : Class [ #PNGReadWriter ]
#encoding : @4
},
SquotImageMapper {
#path : FSAbsolutePath [
'assets',
'Kara-FacingUp.png'
'Kara-FacingLeft.png'
],
#encoding : Class [ #PNGReadWriter ]
#encoding : @4
},
SquotTonelMapper {
#package : MCPackage {
#name : 'BaselineOfSqueakKara'
},
#path : @9
},
SquotImageMapper {
#path : FSAbsolutePath [
'assets',
'Kara-FacingRight.png'
],
#encoding : Class [ #PNGReadWriter ]
#encoding : @4
},
SquotImageMapper {
#path : FSAbsolutePath [
'assets',
'Kara-FacingDown.png'
],
#encoding : Class [ #PNGReadWriter ]
},
SquotImageMapper {
#path : FSAbsolutePath [
'assets',
'Kara-FacingLeft.png'
],
#encoding : Class [ #PNGReadWriter ]
#encoding : @4
}
]
]
Binary file added assets/pause.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/play.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/stop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 13 additions & 16 deletions src/SqueakKara-Core/SKExecuteControls.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@ Class {

{
#category : #widgets,
#'squeak_changestamp' : 'EB 6/22/2024 15:05'
#'squeak_changestamp' : 'EB 6/23/2024 19:42'
}
SKExecuteControls >> actionRun [
|dict label texture|
|dict texture|
dict := Dictionary new.
dict at: #terminated put:[self environment run. label := 'pause'. texture := self pauseTextureFilename].
dict at: #suspended put:[self environment resume. label := 'pause'. texture := self pauseTextureFilename].
dict at: #running put:[self environment pause. label := 'resume'. texture := self runTextureFilename].
dict at: #terminated put:[self environment run. texture := self pauseTextureFilename].
dict at: #suspended put:[self environment resume. texture := self pauseTextureFilename].
dict at: #running put:[self environment pause. texture := self runTextureFilename].
(dict at: self environment executerState) value.
self buttonRun label: label.
self buttonRunSetTexture: texture.
]

Expand Down Expand Up @@ -70,25 +69,23 @@ SKExecuteControls >> addWidgetCentered: aWidget atXPosition: aXValue [

{
#category : #widgets,
#'squeak_changestamp' : 'EB 6/22/2024 15:00'
#'squeak_changestamp' : 'EB 6/23/2024 19:41'
}
SKExecuteControls >> buildButtonRun [

^IconicButton new
label: 'run';
target: self;
actionSelector: #actionRun;
color: Color lightGray.
]

{
#category : #widgets,
#'squeak_changestamp' : 'EB 6/22/2024 15:00'
#'squeak_changestamp' : 'EB 6/23/2024 19:42'
}
SKExecuteControls >> buildButtonStop [

^ IconicButton new
label: 'stop';
target: self;
actionSelector: #actionStop;
color: Color lightGray
Expand Down Expand Up @@ -218,20 +215,20 @@ SKExecuteControls >> initialize [

{
#category : #texture,
#'squeak_changestamp' : 'EB 6/22/2024 15:02'
#'squeak_changestamp' : 'EB 6/23/2024 19:40'
}
SKExecuteControls >> pauseTextureFilename [

^'Trunk.png'
^'pause.png'
]

{
#category : #texture,
#'squeak_changestamp' : 'EB 6/22/2024 14:55'
#'squeak_changestamp' : 'EB 6/23/2024 19:40'
}
SKExecuteControls >> runTextureFilename [

^'Trunk.png'
^'play.png'
]

{
Expand Down Expand Up @@ -262,11 +259,11 @@ SKExecuteControls >> sliderSpeedValueChanged: aValue [

{
#category : #texture,
#'squeak_changestamp' : 'EB 6/22/2024 15:02'
#'squeak_changestamp' : 'EB 6/23/2024 19:40'
}
SKExecuteControls >> stopTextureFilename [

^'Trunk.png'
^'stop.png'
]

{
Expand Down
4 changes: 2 additions & 2 deletions src/SqueakKara-Core/SKExecuter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ SKExecuter >> executeBlock: aBlock [

{
#category : #initialization,
#'squeak_changestamp' : 'EB 6/22/2024 15:07'
#'squeak_changestamp' : 'EB 6/22/2024 14:13'
}
SKExecuter >> initialize [

self kara: SKKaraDecorator new.
self kara executer: self.
self compiler: Compiler new.
self speed: 25.
self speed: 5.
self state: #terminated.
^self
]
Expand Down

0 comments on commit d1a50b9

Please sign in to comment.