FlixelCommunity/flixel — pull request #160 by greysondn (2013-03-07 20:32:12+00:00)
Title: Fix issue 157: Largest portion completed

It's a little messy, but most of the duplicate code has been refactored into a parent class, FlxToolbar.

I did not try to change the constructor or refactor the code beyond a single trio of functions that were quite recurring in Adam's code. The documentation is probably not perfect, either - sorry, I only get to write in between coding breaks.

Nevertheless, this works as submitted and begins the process of fixing the code duplication and mess. Someone will have to pick up where I've left off in regards to this if there is more that is wanted to be done (fixed variables people wanted extracted for more robustness; I'd personally be tickled to see it use FlxButton or a simpler construct for the buttons and checking, etc)