comp380team3/PuzzlePathDimension — pull request #35 by Twisol (2013-04-15 04:13:14+00:00)
Title: Menu architecture, part two

Hello again! This is a fairly large pull request, but there's some exciting stuff going on here(IMHO). :smiley: I'll break it down below.

### Major changes
* I removed the MenuScreen class. MenuScreen embodied a single kind of menu, but as happened in LevelSelectScreen and others, some of the fundamental behavior of MenuScreen had to be overridden. That's a sure sign that inheritance isn't the way to go.
* I added two template classes: MenuTemplate and DetailsTemplate. MenuTemplate more or less does what MenuScreen did, but additionally decoupled from the GameScreen machinery. DetailsTemplate provides a unified way of creating screens with textual information and some navigational buttons.
* Finally, I overhauled the way that transitions and animations are applied. This patch includes a GraphicsCursor representing the active effects to be applied to anything being drawn. To make the effects system extensible and generalizable, an IEffect interface has been introduced.
* The existing pulsate, transition, and fade effects have been factored out into new IEffect implementations. More effects can be defined as desired.

### Issues
* Text in the DetailsTemplate will be centered, rather than left-justified as it was before. This doesn't appear to be a breaking issue, as all affected screens look fine either way. However, we may want to add an ljust/center/rjust property to the menu item classes so that this may be configured.

### Future work
* Effects can easily be chained together. An EffectGroup should be created that implements IEffect, combining multiple effects together to produce a single effect. This is useful because every consumer of IEffect need only deal with a single IEffect. No template or screen needs to explicitly deal with lists of effects.
* Currently, each template deals directly with the effects of its children. In addition, effects are instantiated every frame (in Draw), which is not especially efficient. These effects should be factored out and provided by an external caller.