[Cuis-dev] Mixing BitBlt and Vector PlacedMorphs

Tommy Pettersson ptp at lysator.liu.se
Wed Feb 16 15:15:29 PST 2022


This is from a fresh pull of all repos.
- cogspur/squeak 5.0-202003021730
- Cuis6.0-5031.image
- New changesets up to 5067-HelpMenu...
- Load all TrueType Fonts
- Open File List, pick Spacewar!.pck.st from TheCuisBook repo, and Install Package

I tested a bit more. Turns out that I *can* make the game
active by stepping to its window with ctrl-tab. Then I can
play the game as usual, and it's as fast as usual. And if
the pointer leaves, the game pauses.

But I can't unpause or make the game active by clicking on
the SpaceWar morph with the mouse. All mouse clicks goes
right throught the SpaceWar morph, opening the world menu or
the haloes for the world morph, or interacting with the
window I have beneth the game. Clicking the icon for the
game in the taskbar also doesn't work.

This is exactly what happens if I just subclass the
PlacedMorph and add `requiresVectorCanvas ^false`, and some
other stuff that I don't fully understand yet about extent
and bounds and things. That's why I was trying to figure out
if I had just missed to add something that catches events in
the morphs area, since they seem to fall through the morph,
but I quickly realised that I know too little about the
workings of morphs to solve this.

If I change all requiresVectorCanvas to return true in all
the game's morphs, activating and moving the game morph with
the mouse works again, as well as the taskbar. But the
rendering becomes really really slow, bacause I have not
installed the vector graphics plugin.

________________
On Wed, Feb 16, 2022 at 09:22:25PM +0100, Hilaire Fernandes via Cuis-dev wrote:
Strange.

On my workstation, with Cuis6 with latest updates and Vector graphics, 
the keys are responding. It is rendered with VectorGraphics although it 
should not. Could it just be too slow on your workstation?

Le 16/02/2022 à 20:15, Tommy Pettersson via Cuis-dev a écrit :
>> When the mouse is moved away of the game play, the game is set on pause.
>> You must move the mouse cursor into the game play, then you can use the keys
> I know. It works perfectly without the vector graphics. With
> vector graphics loaded, the game starts in stepping mode,
> but does not respond to key or mouse, or even mouse leave,
> so it never pauses.


More information about the Cuis-dev mailing list