Tokanagrammar/tokanagrammar-dev — pull request #90 by matt8541 (2013-04-17 17:26:36+00:00)
Title: Gui2

@oontvoo This one has lots of stuff. You might want to clone GUI2 to see the full functionality setup with the demo before you try merging everything (it plays right out the box!). I've noticed that there have been a couple times where things were missed in the most recently published jar; seeing the demo first might help.

Just a brief overview, Tokanagrammar calls GUI's gameState_initGUI() where, as of now, sets the source to the DemoSource which should have pretty much everything your source has. You can use GUI's setters to put all the data into the game. I also renamed all the DemoToken to SourceToken throughout to make it easier on you. You should be able to use calls to GUI to do anything you need.

The demo uses GCD where a game can actually be played! The compiler button will light up when all tokens are on the LHS; it doesn't compile of course, but you can see that it's given a linked list of tokens that form a source file. I assume you can just hand this to your compiler code. GUI is riddled with TODO's to give you an idea of where the connectivity is.

That's pretty much it. Feel free to add anything you need in GUI. If you need something more from anything else, just let me know and I'll get it done.