Skip to content

Commit

Permalink
added start screen (GMTEEditor startup) and put it into GMTEEditor re…
Browse files Browse the repository at this point in the history
…gister
  • Loading branch information
Aleksander Morgensterns committed Jul 9, 2024
1 parent f0483ef commit 1379602
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions source/GM-TE/GMTEEditor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ GMTEEditor class >> privateGetEditorTileMapFromFilePath: aFilePath [

{
#category : #squeakutils,
#'squeak_changestamp' : 'jj 6/23/2024 14:06'
#'squeak_changestamp' : 'Alex M 7/9/2024 18:00'
}
GMTEEditor class >> register [
"adds the tile editor to app menu"

"Maybe call this on new?"
TheWorldMenu registerOpenCommand: {'TileMap Editor'. {GMTEEditor. #new}}
TheWorldMenu registerOpenCommand: {'TileMap Editor'. {GMTEEditor. #startup}}
]

{
Expand All @@ -127,6 +127,34 @@ GMTEEditor class >> singleLayerActionNames [
^ {'buttonMoveLayerDown' . 'buttonMoveLayerUp' . 'buttonRenameLayer'}
]

{
#category : #startup,
#'squeak_changestamp' : 'Alex M 7/9/2024 17:59'
}
GMTEEditor class >> startup [

(DialogWindow new
title: 'Wizard';
message: 'Open Existing Project?';
createButton: 'Yes' translated value: true;
createCancelButton: 'No' translated value: false;
selectedButtonIndex: 2; "NO"
registerKeyboardShortcuts;
getUserResponseAtHand)
ifTrue: [self new importFromMorph]
ifFalse: [self new]
]

{
#category : #constants,
#'squeak_changestamp' : 'Alex M 7/9/2024 17:33'
}
GMTEEditor class >> startupMinimumExtent [
"minimum extent of the startup wizard"

^ 300@200
]

{
#category : #constants,
#'squeak_changestamp' : 'jj 6/23/2024 17:33'
Expand Down

0 comments on commit 1379602

Please sign in to comment.