@@ -450,13 +450,13 @@ GMTEEditor >> brushButtons: anObject [
450
450
451
451
{
452
452
#category : #building ,
453
- #' squeak_changestamp' : ' mcjj 7/11 /2024 16:15 '
453
+ #' squeak_changestamp' : ' JS 7/12 /2024 18:20 '
454
454
}
455
455
GMTEEditor >> buildWith: builder [
456
456
" builds the editor with ToolBuilder"
457
457
" called it builder instead of aBuilder since every other implementation does that"
458
458
459
- | newMorph selectedTile panel |
459
+ | newMorph panel |
460
460
" TODO: Build process contains a lot of magic numbers regarding relative/absolute positioning"
461
461
newMorph := builder build: (builder pluggableWindowSpec new
462
462
model: self ;
@@ -485,15 +485,7 @@ GMTEEditor >> buildWith: builder [
485
485
panel := GMTETileContainer withParent: self tileStore.
486
486
self tileStore morph: panel.
487
487
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.
497
489
498
490
self tileViewer
499
491
borderWidth: 2 ;
@@ -1719,6 +1711,24 @@ GMTEEditor >> parseSize: aText [
1719
1711
[^ aText asNumber] on: NumberParserError do: [^ nil ]
1720
1712
]
1721
1713
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
+
1722
1732
{
1723
1733
#category : #accessing ,
1724
1734
#' squeak_changestamp' : ' jj 6/22/2024 21:27'
@@ -1969,7 +1979,7 @@ GMTEEditor >> selectRectangleBrush [
1969
1979
1970
1980
{
1971
1981
#category : #accessing ,
1972
- #' squeak_changestamp' : ' Alex M 7/9 /2024 15:25 '
1982
+ #' squeak_changestamp' : ' JS 7/12 /2024 18:12 '
1973
1983
}
1974
1984
GMTEEditor >> selectTile: anObject [
1975
1985
" selects a tile from the tile store"
@@ -1980,7 +1990,7 @@ GMTEEditor >> selectTile: anObject [
1980
1990
ifFalse: [
1981
1991
self selectedTile: anObject fullResolutionSprite.
1982
1992
self tileMap tileSelectionSet highlightImage: anObject fullResolutionSprite.
1983
- self trayViewer morph submorphs first
1993
+ ( self trayViewer morph submorphNamed: ' selectedTile ' )
1984
1994
visible: true ;
1985
1995
updateSprite: anObject fullResolutionSprite;
1986
1996
extent: 75 @75 ]
0 commit comments