Skip to content

Commit

Permalink
Merge origin/tmm-dev into tmm-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksander Morgensterns committed May 22, 2024
2 parents 6c59c76 + 752be5f commit e3524b6
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 5 deletions.
4 changes: 2 additions & 2 deletions source/GM-TE/GMTEEditableTileMap.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ GMTEEditableTileMap >> tileSelectionSet: anObject [

{
#category : #'as yet unclassified',
#'squeak_changestamp' : 'TW 5/22/2024 16:55'
#'squeak_changestamp' : 'TW 5/22/2024 17:18'
}
GMTEEditableTileMap >> updateTileSprite: aTile [

self model selectedTile ifNotNil: [aTile image: (self model selectedTile image scaledToSize: self tileWidth @ self tileHeight)].
self model selectedTile ifNotNil: [aTile updateSprite: (self model selectedTile image)].
]
38 changes: 35 additions & 3 deletions source/GM-TE/GMTEImageMorph.class.st
Original file line number Diff line number Diff line change
@@ -1,31 +1,63 @@
Class {
#name : #GMTEImageMorph,
#superclass : #ImageMorph,
#instVars : [
'fullResolutionSprite'
],
#category : #'GM-TE-Core'
}

{
#category : #'as yet unclassified',
#'squeak_changestamp' : 'Ivo Zilkenat 5/21/2024 19:58'
#'squeak_changestamp' : 'TW 5/22/2024 17:16'
}
GMTEImageMorph >> extent: anExtent [
"override ImageMorph extent functionality. ALWAYS KEEPS RATIO"

"self image: (self image scaledToSize: anExtent)."

self image: (self image scaledToSize: anExtent).
self image: (self fullResolutionSprite scaledToSize: anExtent).

super extent: anExtent
]

{
#category : #accessing,
#'squeak_changestamp' : 'TW 5/22/2024 17:15'
}
GMTEImageMorph >> fullResolutionSprite [

^ fullResolutionSprite
]

{
#category : #accessing,
#'squeak_changestamp' : 'TW 5/22/2024 17:15'
}
GMTEImageMorph >> fullResolutionSprite: anObject [

fullResolutionSprite := anObject.
]

{
#category : #'as yet unclassified',
#'squeak_changestamp' : 'Ivo Zilkenat 5/21/2024 19:43'
#'squeak_changestamp' : 'TW 5/22/2024 17:16'
}
GMTEImageMorph >> setPlaceholderWithExtent: anExtent color: aColor [

| placeholderForm |
placeholderForm := Form extent: anExtent depth: 32.
placeholderForm fillColor: aColor.
self fullResolutionSprite: placeholderForm.
self image: placeholderForm.
]

{
#category : #'as yet unclassified',
#'squeak_changestamp' : 'TW 5/22/2024 17:18'
}
GMTEImageMorph >> updateSprite: anImage [

self fullResolutionSprite: anImage.
self extent: self extent
]

0 comments on commit e3524b6

Please sign in to comment.