Skip to content

Commit 2c4cc87

Browse files
committed
Merge origin/tmm-dev into tmm-dev
2 parents d5b700c + 9912c2b commit 2c4cc87

File tree

2 files changed

+23
-34
lines changed

2 files changed

+23
-34
lines changed

source/GM-TE/GMTEEditor.class.st

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -450,13 +450,13 @@ GMTEEditor >> brushButtons: anObject [
450450

451451
{
452452
#category : #building,
453-
#'squeak_changestamp' : 'mcjj 7/11/2024 16:15'
453+
#'squeak_changestamp' : 'JS 7/12/2024 18:20'
454454
}
455455
GMTEEditor >> buildWith: builder [
456456
"builds the editor with ToolBuilder"
457457
"called it builder instead of aBuilder since every other implementation does that"
458458

459-
| newMorph selectedTile panel |
459+
| newMorph panel |
460460
"TODO: Build process contains a lot of magic numbers regarding relative/absolute positioning"
461461
newMorph := builder build: (builder pluggableWindowSpec new
462462
model: self;
@@ -485,15 +485,7 @@ GMTEEditor >> buildWith: builder [
485485
panel := GMTETileContainer withParent: self tileStore.
486486
self tileStore morph: panel.
487487

488-
selectedTile := GMTETileSelector new
489-
visible: false;
490-
model:self;
491-
yourself.
492-
493-
"TODO: Work in progress."
494-
self trayViewer morph: GMTETileTray new.
495-
self trayViewer morph
496-
addMorph: selectedTile.
488+
self placeSelectedTileIntoTileTray.
497489

498490
self tileViewer
499491
borderWidth: 2;
@@ -1719,6 +1711,24 @@ GMTEEditor >> parseSize: aText [
17191711
[^ aText asNumber] on: NumberParserError do: [^ nil]
17201712
]
17211713

1714+
{
1715+
#category : #building,
1716+
#'squeak_changestamp' : 'JS 7/12/2024 18:20'
1717+
}
1718+
GMTEEditor >> placeSelectedTileIntoTileTray [
1719+
1720+
| selectedTile |
1721+
selectedTile := GMTETileSelector new
1722+
visible: false;
1723+
name: 'selectedTile';
1724+
model: self;
1725+
yourself.
1726+
1727+
self trayViewer morph
1728+
color: Color transparent;
1729+
addMorph: selectedTile
1730+
]
1731+
17221732
{
17231733
#category : #accessing,
17241734
#'squeak_changestamp' : 'jj 6/22/2024 21:27'
@@ -1969,7 +1979,7 @@ GMTEEditor >> selectRectangleBrush [
19691979

19701980
{
19711981
#category : #accessing,
1972-
#'squeak_changestamp' : 'Alex M 7/9/2024 15:25'
1982+
#'squeak_changestamp' : 'JS 7/12/2024 18:12'
19731983
}
19741984
GMTEEditor >> selectTile: anObject [
19751985
"selects a tile from the tile store"
@@ -1980,7 +1990,7 @@ GMTEEditor >> selectTile: anObject [
19801990
ifFalse: [
19811991
self selectedTile: anObject fullResolutionSprite.
19821992
self tileMap tileSelectionSet highlightImage: anObject fullResolutionSprite.
1983-
self trayViewer morph submorphs first
1993+
(self trayViewer morph submorphNamed: 'selectedTile')
19841994
visible: true;
19851995
updateSprite: anObject fullResolutionSprite;
19861996
extent: 75@75]

source/GM-TE/GMTETileTray.class.st

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)