@@ -113,7 +113,7 @@ GMTEEditorTileMap >> model: anObject [
113
113
114
114
{
115
115
#category : #' event handling' ,
116
- #' squeak_changestamp' : ' Valentin Teutschbein 7/9 /2024 21:46 '
116
+ #' squeak_changestamp' : ' Valentin Teutschbein 7/10 /2024 13:07 '
117
117
}
118
118
GMTEEditorTileMap >> mouseDown: anEvent [
119
119
" Implements placement of tiles"
@@ -125,14 +125,14 @@ GMTEEditorTileMap >> mouseDown: anEvent [
125
125
selectedIndex := self tileIndexFromPosition: anEvent position.
126
126
self model brush firstMatrixIndex: selectedIndex.
127
127
selectedCoordinates := self model brush executeWithMatrixIndex: selectedIndex andLayer: (self tileMatrixStack layer: activeLayer).
128
- " self updateTiles: selectedCoordinates inLayer: activeLayer FromEvent: anEvent. "
128
+ anEvent yellowButtonPressed ifTrue: [ self tileSelectionSet highlightImage: nil ].
129
129
130
130
^ true
131
131
]
132
132
133
133
{
134
134
#category : #' event handling' ,
135
- #' squeak_changestamp' : ' Valentin Teutschbein 7/9 /2024 22:02 '
135
+ #' squeak_changestamp' : ' Valentin Teutschbein 7/10 /2024 13:06 '
136
136
}
137
137
GMTEEditorTileMap >> mouseMove: anEvent [
138
138
" Implements highlighting of tiles when hovering"
@@ -145,17 +145,16 @@ GMTEEditorTileMap >> mouseMove: anEvent [
145
145
(anEvent redButtonPressed or : [anEvent yellowButtonPressed]) ifFalse: [self model brush resetOutputSet].
146
146
self tileSelectionSet clearAllHighlightings.
147
147
148
- selectedCoordinates ifNil: [
149
- ^ nil ].
148
+ selectedCoordinates ifNil: [^ nil ].
150
149
151
- (selectedCoordinates select: [:c | (self tileMatrixStack layer: activeLayer) inBounds: c]) do: [:c |
152
- hoveredTileHighlighting := self highlightingTileFromIndex: c .
150
+ (selectedCoordinates select: [:c | (self tileMatrixStack layer: activeLayer) inBounds: c]) do: [:t |
151
+ hoveredTileHighlighting := self highlightingTileFromIndex: t .
153
152
hoveredTileHighlighting ifNotNil: [self tileSelectionSet highlightTile: hoveredTileHighlighting]].
154
153
]
155
154
156
155
{
157
156
#category : #' event handling' ,
158
- #' squeak_changestamp' : ' Valentin Teutschbein 7/9 /2024 22:13 '
157
+ #' squeak_changestamp' : ' Valentin Teutschbein 7/10 /2024 13:11 '
159
158
}
160
159
GMTEEditorTileMap >> mouseUp: anEvent [
161
160
@@ -165,7 +164,8 @@ GMTEEditorTileMap >> mouseUp: anEvent [
165
164
activeLayer := self model selectedLayers anyOne.
166
165
self updateTiles: (indicesToAdd asCollection) inLayer: activeLayer FromEvent: anEvent.
167
166
self model brush resetOutputSet.
168
- (self previousTileStates size > 0 ) ifTrue: [self saveTileEditChanges]
167
+ (self previousTileStates size > 0 ) ifTrue: [self saveTileEditChanges].
168
+ self tileSelectionSet highlightImage: (self model selectedTile).
169
169
]
170
170
171
171
{
0 commit comments