Skip to content

Commit

Permalink
Little quality of lives
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeAtHPI committed Dec 11, 2023
1 parent bc079cc commit 27014ac
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
6 changes: 6 additions & 0 deletions packages/Sandblocks-Babylonian/SBExploriants.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ SBExploriants >> binding: aString for: block class: aClass ifPresent: aBlock [
^ nil
]

{ #category : #ui }
SBExploriants >> buildView [

self addMorphBack: (self activeBlock hResizing: #shrinkWrap)
]

{ #category : #testing }
SBExploriants >> cacheType: aClass for: aBlock [
]
Expand Down
11 changes: 4 additions & 7 deletions packages/Sandblocks-Babylonian/SBInputBroadcaster.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,8 @@ SBInputBroadcaster >> filterEvent: anEvent for: aMorph [
| localTarget newEvent delta |
localTarget := self translatedPositionOf: anEvent from: aMorph to: aListener.
delta := localTarget - anEvent position.
newEvent := anEvent copy.

newEvent translateBy: delta.
anEvent isDropEvent ifTrue: [newEvent translateTo: localTarget].

newEvent := anEvent copy translateBy: delta.

(self needsHandHandling: newEvent)
ifTrue: [
self simulateGlobalHand: (self stateHands at: i)
Expand Down Expand Up @@ -149,9 +146,9 @@ SBInputBroadcaster >> mouseEnter: anEvent [
{ #category : #events }
SBInputBroadcaster >> needsHandHandling: anEvent [

"rechte maustaste im sbeditor ausschließen?"
^ anEvent isMouse
and: [anEvent isMouseDown or: [anEvent isMouseUp]]
and: [(SBPreferences rightClickContextMenu and: [anEvent yellowButtonPressed]) not]
]

{ #category : #accessing }
Expand All @@ -178,7 +175,7 @@ SBInputBroadcaster >> simulateGlobalHand: aHand for: anEvent in: aMorph pos: aPo
setHand: aHand.
aHand handleEvent: anEvent.

aMorph owner ifNotNil: [:theOwner | theOwner removeMorph: aHand].
aHand delete.
]

{ #category : #accessing }
Expand Down

0 comments on commit 27014ac

Please sign in to comment.