How to wrap a morph into a window in Pharo v3

593 views Asked by At

I have built a game GUI made of morphs, all of them embeded into a rectangle morph. I want to wrap this rectangle morph into a window. How can i do this? I looked inside Spec but found nothing useful.

2

There are 2 answers

0
Sean DeNigris On BEST ANSWER

There a few ways, depending on your use case, but the easiest way is to send #openInWindow to your morph.

0
Stephan Eggermont On

If you take a look at what #openInWindow does, you'll get to

Morph>>openInWindowLabeled: aString inWorld: aWorld

where you can see how a SystemWindow is created and the morph is added to it. You might want to replace it by a StandardWindow if you need theming.