Implement GUI in declarative language
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ultimate-smash-friends |
New
|
Wishlist
|
Unassigned |
Bug Description
Currently, if we wish to implement another screen, we must do so by creating a python module that subclasses Screen, adds a bunch of widgets, and reimplements the __init__ and callback methods. While this is perfectly fine for programmers, for people interested in the design aspect of USF, however, this may be a bit overwhelming.
I propose that a declarative interface to the screen and related widgets modules be created that will allow designers to create new screens by writing either XML(typical) or JSON (my personal recommendation) files. I might have suggested YAML, except that this would add a dependency to USF, which I would like to avoid.
I've included the original main_screen.py as a reference, along with a quick mock up of what the screen might look like if it were implemented in JSON.
I just noticed that not only is the JSON version a few lines smaller, the resulting file is less than 1/4 the size of the python version.