Section 3

Interacting With Cells

The user should be able to click on cells within the LaserGame morph. We will only interact with the Mirror Cells. Mirror Cells can be rotated and pushed within the grid.

Let's look at an enlarged view of a Mirror Cell.

We can think of a click-region within our cell.

The click-region is slightly inside the cell, away from the edges. If a user clicks very close to an edge it will be ignored. They must click within the shaded region for us to process their click.

We can define another click-region even closer to the center.

With the inner region we can do other operations on the cell. We could use one region for picking up cell rotation requests and the other region for cell movement requests. So let's build a structure with 2 internal click regions. We can think of these 2 click regions as the "inside" and "outside" region. For testing purposes, anything that falls outside the "outside" region is to be ignored.

Index Page Next Page

Copyright © 2007, 2008, 2009, 2010 Stephan B Wessels