Implement GUI in declarative language

Bug #886930 reported by aspidites on 2011-11-06
This bug affects 1 person
Affects Status Importance Assigned to Milestone

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 as a reference, along with a quick mock up of what the screen might look like if it were implemented in JSON.

aspidites (aspidites) wrote :
aspidites (aspidites) wrote :
aspidites (aspidites) wrote :

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.

Changed in ultimate-smash-friends:
importance: Undecided → Wishlist
milestone: none → 0.1.2
tshirtman (gabriel-pettier) wrote :

As said on IRC, it's an interresting idea, back in the days, all screens where done in xml, but it was confusing and not powerful enought, so we went to full python again, now code has been cleaned up, and widget system have been hardened, so it may be possible to build a better system based on xml or json, if somebody want to try this, and see if even the more complex screens can either be implemented like this, or simplified to be, it would be interresting. I won't be the one to do it, or not soon, though.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers