Skip to content

Commit 4a35958

Browse files
author
Ivo Zilkenat
committed
Readded mouseLeave
1 parent c73751a commit 4a35958

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

source/GM-TE/GMTEEditorTileMap.class.st

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,15 @@ GMTEEditorTileMap >> handlesMouseMove: anEvent [
8080
^ true
8181
]
8282

83+
{
84+
#category : #'event handling',
85+
#'squeak_changestamp' : 'Ivo Zilkenat 7/11/2024 17:14'
86+
}
87+
GMTEEditorTileMap >> handlesMouseOver: anEvent [
88+
89+
^ true
90+
]
91+
8392
{
8493
#category : #initialization,
8594
#'squeak_changestamp' : 'Alex M 6/28/2024 20:24'
@@ -131,7 +140,18 @@ GMTEEditorTileMap >> mouseDown: anEvent [
131140

132141
{
133142
#category : #'event handling',
134-
#'squeak_changestamp' : 'JS 7/11/2024 14:01'
143+
#'squeak_changestamp' : 'Ivo Zilkenat 7/11/2024 17:18'
144+
}
145+
GMTEEditorTileMap >> mouseLeave: anEvent [
146+
147+
self tileSelectionSet clearAllHighlightings.
148+
149+
^ true
150+
]
151+
152+
{
153+
#category : #'event handling',
154+
#'squeak_changestamp' : 'Ivo Zilkenat 7/11/2024 17:01'
135155
}
136156
GMTEEditorTileMap >> mouseMove: anEvent [
137157
"Implements highlighting of tiles when hovering"
@@ -146,9 +166,10 @@ GMTEEditorTileMap >> mouseMove: anEvent [
146166

147167
selectedCoordinates ifNil: [^ nil].
148168

149-
(selectedCoordinates select: [:c | (self tileMatrixStack layer: activeLayer) inBounds: c]) do: [:t|
150-
hoveredTileHighlighting := self highlightingTileFromIndex: t.
151-
hoveredTileHighlighting ifNotNil: [self tileSelectionSet highlightTile: hoveredTileHighlighting]]
169+
(selectedCoordinates select: [:c |
170+
(self tileMatrixStack layer: activeLayer) inBounds: c]) do: [:t |
171+
hoveredTileHighlighting := self highlightingTileFromIndex: t.
172+
hoveredTileHighlighting ifNotNil: [self tileSelectionSet highlightTile: hoveredTileHighlighting]]
152173
]
153174

154175
{

0 commit comments

Comments
 (0)