Skip to content

Commit 70c51c9

Browse files
committed
Merge origin/tmm-dev into tmm-dev
2 parents 767a578 + 1379602 commit 70c51c9

File tree

1 file changed

+35
-6
lines changed

1 file changed

+35
-6
lines changed

source/GM-TE/GMTEEditor.class.st

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,13 @@ GMTEEditor class >> privateGetEditorTileMapFromFilePath: aFilePath [
128128

129129
{
130130
#category : #squeakutils,
131-
#'squeak_changestamp' : 'jj 6/23/2024 14:06'
131+
#'squeak_changestamp' : 'Alex M 7/9/2024 18:00'
132132
}
133133
GMTEEditor class >> register [
134134
"adds the tile editor to app menu"
135135

136136
"Maybe call this on new?"
137-
TheWorldMenu registerOpenCommand: {'TileMap Editor'. {GMTEEditor. #new}}
137+
TheWorldMenu registerOpenCommand: {'TileMap Editor'. {GMTEEditor. #startup}}
138138
]
139139

140140
{
@@ -146,6 +146,34 @@ GMTEEditor class >> singleLayerActionNames [
146146
^ {'buttonMoveLayerDown' . 'buttonMoveLayerUp' . 'buttonRenameLayer'}
147147
]
148148

149+
{
150+
#category : #startup,
151+
#'squeak_changestamp' : 'Alex M 7/9/2024 17:59'
152+
}
153+
GMTEEditor class >> startup [
154+
155+
(DialogWindow new
156+
title: 'Wizard';
157+
message: 'Open Existing Project?';
158+
createButton: 'Yes' translated value: true;
159+
createCancelButton: 'No' translated value: false;
160+
selectedButtonIndex: 2; "NO"
161+
registerKeyboardShortcuts;
162+
getUserResponseAtHand)
163+
ifTrue: [self new importFromMorph]
164+
ifFalse: [self new]
165+
]
166+
167+
{
168+
#category : #constants,
169+
#'squeak_changestamp' : 'Alex M 7/9/2024 17:33'
170+
}
171+
GMTEEditor class >> startupMinimumExtent [
172+
"minimum extent of the startup wizard"
173+
174+
^ 300@200
175+
]
176+
149177
{
150178
#category : #constants,
151179
#'squeak_changestamp' : 'jj 6/23/2024 17:33'
@@ -270,14 +298,15 @@ GMTEEditor >> backgroundTile [
270298

271299
{
272300
#category : #accessing,
273-
#'squeak_changestamp' : 'TW 6/20/2024 21:40'
301+
#'squeak_changestamp' : 'Alex M 7/9/2024 15:41'
274302
}
275303
GMTEEditor >> backgroundTile: anObject [
276-
277-
backgroundTile := anObject.
278304

305+
(backgroundTile = anObject)
306+
ifTrue: [backgroundTile := GMTETile checkerBoardTile]
307+
ifFalse: [backgroundTile := anObject].
279308
"TODO: keep this here? TileMap must know backgorund Tiles"
280-
self tileMap backgroundTiles: anObject
309+
self tileMap backgroundTiles: backgroundTile
281310
]
282311

283312
{

0 commit comments

Comments
 (0)