-
Notifications
You must be signed in to change notification settings - Fork 2
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
Aleksander Morgensterns
committed
Jul 2, 2024
1 parent
bef9bd4
commit c4bb99e
Showing
4 changed files
with
158 additions
and
15 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
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,117 @@ | ||
Class { | ||
#name : #GMTETilemapSizeCommand, | ||
#superclass : #GMTECommand, | ||
#instVars : [ | ||
'editor', | ||
'method', | ||
'prevSize', | ||
'newSize', | ||
'savedTiles' | ||
], | ||
#category : #'GM-TE-CommandProcessor' | ||
} | ||
|
||
{ | ||
#category : #'as yet unclassified', | ||
#'squeak_changestamp' : 'Alex M 7/1/2024 18:39' | ||
} | ||
GMTETilemapSizeCommand class >> prevValue: aNumber1 newValue: aNumber2 method: aSymbol editor: anEditor [ | ||
|
||
^ (self new) | ||
|
||
prevSize: aNumber1; | ||
newSize: aNumber2; | ||
method: aSymbol; | ||
editor: anEditor | ||
] | ||
|
||
{ | ||
#category : #execution, | ||
#'squeak_changestamp' : 'Alex M 7/1/2024 18:52' | ||
} | ||
GMTETilemapSizeCommand >> do [ | ||
|
||
self editor perform: self method with: self newSize. | ||
self restoreTiles | ||
] | ||
|
||
{ | ||
#category : #accessing, | ||
#'squeak_changestamp' : 'Alex M 7/1/2024 18:00' | ||
} | ||
GMTETilemapSizeCommand >> editor [ | ||
^ editor | ||
] | ||
|
||
{ | ||
#category : #accessing, | ||
#'squeak_changestamp' : 'Alex M 7/1/2024 18:00' | ||
} | ||
GMTETilemapSizeCommand >> editor: anObject [ | ||
editor := anObject | ||
] | ||
|
||
{ | ||
#category : #accessing, | ||
#'squeak_changestamp' : 'Alex M 7/1/2024 18:48' | ||
} | ||
GMTETilemapSizeCommand >> method [ | ||
^ method | ||
] | ||
|
||
{ | ||
#category : #accessing, | ||
#'squeak_changestamp' : 'Alex M 7/1/2024 18:48' | ||
} | ||
GMTETilemapSizeCommand >> method: anObject [ | ||
method := anObject | ||
] | ||
|
||
{ | ||
#category : #accessing, | ||
#'squeak_changestamp' : 'Alex M 7/1/2024 18:16' | ||
} | ||
GMTETilemapSizeCommand >> newSize [ | ||
^ newSize | ||
] | ||
|
||
{ | ||
#category : #accessing, | ||
#'squeak_changestamp' : 'Alex M 7/1/2024 18:16' | ||
} | ||
GMTETilemapSizeCommand >> newSize: anObject [ | ||
newSize := anObject | ||
] | ||
|
||
{ | ||
#category : #accessing, | ||
#'squeak_changestamp' : 'Alex M 7/1/2024 18:16' | ||
} | ||
GMTETilemapSizeCommand >> prevSize [ | ||
^ prevSize | ||
] | ||
|
||
{ | ||
#category : #accessing, | ||
#'squeak_changestamp' : 'Alex M 7/1/2024 18:16' | ||
} | ||
GMTETilemapSizeCommand >> prevSize: anObject [ | ||
prevSize := anObject | ||
] | ||
|
||
{ | ||
#category : #execution, | ||
#'squeak_changestamp' : 'Alex M 7/1/2024 18:23' | ||
} | ||
GMTETilemapSizeCommand >> restoreTiles [ | ||
] | ||
|
||
{ | ||
#category : #execution, | ||
#'squeak_changestamp' : 'Alex M 7/1/2024 18:52' | ||
} | ||
GMTETilemapSizeCommand >> undo [ | ||
|
||
self editor perform: self method with: self prevSize. | ||
self restoreTiles | ||
] |