[squeak-dev] FIGURED IT OUT: was Re: Roassal3 question for the morphic pros to get majority of Roassal3 examples working properly. How to center a RSBalloonMorph in the world?
Marcel Taeumel
marcel.taeumel at hpi.de
Wed Oct 28 09:24:16 UTC 2020
Hi Timothy.
> How do I get a RSBalloonMorph to open up inside the extents of The World?
morph bounds: (morph bounds translatedToBeWithin: self currentWorld bounds).
morph openInWorld.
Best,
Marcel
Am 27.10.2020 19:20:40 schrieb gettimothy via Squeak-dev <squeak-dev at lists.squeakfoundation.org>:
Hi Folks,
I found the Morph >> position: aPoint method
and then I modified the RSCanvas >> open method to set position:10 at 10.
I also to the liberty to make the size 1000 at 1000 .
cheers,
t
---- On Tue, 27 Oct 2020 08:20:35 -0400 gettimothy <gettimothy at zoho.com> wrote ----
Hi Folks,
TL;DR;
How do I get a RSBalloonMorph to open up inside the extents of The World? If we fix this, then the majority of Roassal3 examples are working examples.
For Roassal3
MCHttpRepository
location: 'http://www.squeaksource.com/Roassal3 [http://www.squeaksource.com/Roassal3]'
user: ''
password: ''
I have a class named RSExampleDoits which has class side methods that allow easy access to the various examples a healthy majority of which are "semi-working".
For example:
rsBasicAnimationExamples
"working"
"semi working"
"the viewport for these is off-World on open."
RSBasicAnimationExamples new example01Basic open.
RSBasicAnimationExamples new example02Sequential open.
RSBasicAnimationExamples new example03Ramp open.
RSBasicAnimationExamples new example05LoopEvent open.
RSBasicAnimationExamples new example06Parallel open.
"not working"
RSBasicAnimationExamples new example04DashAnimation open.
RSBasicAnimationExamples new example07CornerRadius open.
The basic problem is that the example shows up mostly off-screen in the World off to the right and must be pulled in by the mouse to see it.
the 'open' and 'createMorph' send are to RSCanvas
ProtoObject #()
Object #()
RSObject #()
RSObjectWithProperty #('announcer' 'properties')
RSCanvas #('shapes' 'fixedShapes' 'camera' 'animations' 'extent' 'color' 'morph' 'clearBackground' 'showRectangles' 'nodes' 'edges')
open
| window |
self createMorph.
window := morph openInWindow.
window extent: 500 at 500.
morph privateOwner: window.
^ window
createMorph
"Create a Morph that contains myself."
Smalltalk at: #AthensCanvas
ifPresent: [morph := RSAthensMorph new renderer: RSAthensRenderer new; yourself]
ifAbsent: [morph := RSBalloonMorph new renderer: RSBalloonRenderer new; yourself]. <<---THIS IS CALLED.
morph canvas: self.
^ morph
your insights are much appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20201028/061a5dbe/attachment.html>
More information about the Squeak-dev
mailing list
|