@@ -373,7 +373,7 @@ GMTEEditor >> brushButtons: anObject [
373
373
374
374
{
375
375
#category : #building ,
376
- #' squeak_changestamp' : ' mcjj 7/10 /2024 16:51 '
376
+ #' squeak_changestamp' : ' TW 7/9 /2024 18:15 '
377
377
}
378
378
GMTEEditor >> buildWith: builder [
379
379
" builds the editor with ToolBuilder"
@@ -393,7 +393,7 @@ GMTEEditor >> buildWith: builder [
393
393
self createInspectorSpecWithBuilder: builder};
394
394
closeAction: #onClose ;
395
395
minimumExtent: GMTEEditor editorMinimumExtent).
396
-
396
+
397
397
self commandBar: (newMorph submorphNamed: ' command bar' ).
398
398
" self commandBar vResizing: #rigid."
399
399
self tileStore: (newMorph submorphNamed: ' tile store' ).
@@ -422,8 +422,7 @@ GMTEEditor >> buildWith: builder [
422
422
423
423
self
424
424
initializeDefaultTileMapMatrix;
425
- associatedMorph: newMorph;
426
- setupInputHandlingFor: newMorph.
425
+ associatedMorph: newMorph.
427
426
428
427
^ newMorph
429
428
]
@@ -968,15 +967,6 @@ GMTEEditor >> disableSingleLayerButtons [
968
967
GMTEEditor singleLayerActionNames do: [:aString | (self associatedMorph submorphNamed: aString) enabled: false ]
969
968
]
970
969
971
- {
972
- #category : #' input handling' ,
973
- #' squeak_changestamp' : ' mcjj 7/10/2024 16:47'
974
- }
975
- GMTEEditor >> dropKeyboardFocus: anEvent [
976
-
977
- anEvent hand releaseKeyboardFocus: self associatedMorph
978
- ]
979
-
980
970
{
981
971
#category : #' as yet unclassified' ,
982
972
#' squeak_changestamp' : ' TW 6/25/2024 17:51'
@@ -1106,15 +1096,6 @@ GMTEEditor >> getGridWidthAsString [
1106
1096
^ self getGridWidth asString
1107
1097
]
1108
1098
1109
- {
1110
- #category : #' input handling' ,
1111
- #' squeak_changestamp' : ' mcjj 7/10/2024 16:46'
1112
- }
1113
- GMTEEditor >> getKeyboardFocus: anEvent [
1114
-
1115
- anEvent hand newKeyboardFocus: self associatedMorph
1116
- ]
1117
-
1118
1099
{
1119
1100
#category : #' layer manipulation' ,
1120
1101
#' squeak_changestamp' : ' TW 6/23/2024 21:50'
@@ -1182,18 +1163,6 @@ GMTEEditor >> getTileRatioAsString [
1182
1163
^ self getTileRatio asString
1183
1164
]
1184
1165
1185
- {
1186
- #category : #' input handling' ,
1187
- #' squeak_changestamp' : ' mcjj 7/10/2024 16:49'
1188
- }
1189
- GMTEEditor >> handleKeyStroke: anEvent [
1190
-
1191
- | keyValue |
1192
- keyValue := anEvent key.
1193
- Transcript show: keyValue
1194
- " keyValue = $A"
1195
- ]
1196
-
1197
1166
{
1198
1167
#category : #' menu button functions' ,
1199
1168
#' squeak_changestamp' : ' TW 6/23/2024 20:09'
@@ -1518,15 +1487,14 @@ GMTEEditor >> moveLayerUp [
1518
1487
1519
1488
{
1520
1489
#category : #building ,
1521
- #' squeak_changestamp' : ' Alex M 6/28 /2024 21:27 '
1490
+ #' squeak_changestamp' : ' Alex M 7/11 /2024 00:34 '
1522
1491
}
1523
1492
GMTEEditor >> onClose [
1524
1493
" asks the user whether they want to save their progress"
1525
1494
1526
- " self savedSinceModified
1495
+ self savedSinceModified
1527
1496
ifFalse: [(PopUpMenu confirm: ' Save before closing?' )
1528
- ifTrue: [self exportAsMorph]]"
1529
- " COMMENTED FOR EASIER DEBUGGING"
1497
+ ifTrue: [self exportAsMorph]]
1530
1498
]
1531
1499
1532
1500
{
@@ -1646,13 +1614,15 @@ GMTEEditor >> ratio: anObject [
1646
1614
1647
1615
{
1648
1616
#category : #' command processing' ,
1649
- #' squeak_changestamp' : ' TW 7/2 /2024 17:47 '
1617
+ #' squeak_changestamp' : ' Alex M 7/10 /2024 14:17 '
1650
1618
}
1651
1619
GMTEEditor >> redo [
1652
1620
1653
1621
(self currentCommand < self commands size)
1654
1622
ifTrue: [
1655
- self currentCommand: self currentCommand + 1 .
1623
+ self
1624
+ savedSinceModified: false ;
1625
+ currentCommand: self currentCommand + 1 .
1656
1626
(self commands at: self currentCommand) do.
1657
1627
self savedSinceModified: false ]
1658
1628
]
@@ -2016,20 +1986,6 @@ GMTEEditor >> settingsMenu [
2016
1986
builder open: aMenuSpec
2017
1987
]
2018
1988
2019
- {
2020
- #category : #' input handling' ,
2021
- #' squeak_changestamp' : ' mcjj 7/10/2024 16:49'
2022
- }
2023
- GMTEEditor >> setupInputHandlingFor: aMorph [
2024
-
2025
- aMorph
2026
- on: #mouseMove send: #getKeyboardFocus: to: self ;
2027
- on: #mouseLeave send: #dropKeyboardFocus: to: self ;
2028
- on: #keyStroke send: #handleKeyStroke: to: self .
2029
-
2030
- aMorph eventHandler wantsEveryMouseMove: true
2031
- ]
2032
-
2033
1989
{
2034
1990
#category : #' layer manipulation' ,
2035
1991
#' squeak_changestamp' : ' jj 6/22/2024 21:43'
@@ -2176,14 +2132,16 @@ GMTEEditor >> trayViewer: anObject [
2176
2132
2177
2133
{
2178
2134
#category : #' command processing' ,
2179
- #' squeak_changestamp' : ' Alex M 7/10/2024 03:49 '
2135
+ #' squeak_changestamp' : ' Alex M 7/10/2024 14:17 '
2180
2136
}
2181
2137
GMTEEditor >> undo [
2182
2138
2183
2139
self flag: ' DO THIS USING TILEMAP FUNCTIONS' .
2184
2140
(self currentCommand > 1 )
2185
2141
ifTrue: [(self commands at: self currentCommand) undo.
2186
- self currentCommand: self currentCommand - 1 .
2142
+ self
2143
+ savedSinceModified: false ;
2144
+ currentCommand: self currentCommand - 1 .
2187
2145
({GMTETilemapSizeCommand . GMTEDeleteLayersCommand } includes: (self commands at: self currentCommand + 1 ) class )
2188
2146
ifTrue: [self redoAllCommandsUntil: self currentCommand].
2189
2147
self savedSinceModified: false ]
0 commit comments