Skin File Parser
#1
Here is a module you import that creates your interface from a skin.xml file.

The skin.xml file is any file like MyPrograms.xml. The only limitations are, it does not use <include></include> statements and it does NOT default to the references.xml, so just include all settings. It ignores the ones not available to python. Also, the visible logic is single commond only, no | or +. I may look at adding these in the future. The same with animations, they are ignored. Probably can't implement those except for the slide.

The list and fade label can take multiple <label> statements, or you can obviously use your own code. The list allows <label2> and <image>, what happens is a ListItem is created with those and that is added to the list. You don't have to have the same number of <label> and <label2>, but it uses <label> for the count. The fadelabel can mix <info> and <label> statements.

It does use the <onup>... statements, so no need to code those.

The ID's are keys to the control objects. It sets up a dictionary named controls with the controls ID as the key. to access a control. self.controls[ID].setVisible(False) for instance. If you don't need to access the control you can skip the <id>.

I've included a sample script to show what it can do.

Any suggestions will be welcome.

http://www.filefactory.com/get/v3/f2.php?f=6073cb
Reply
#2
Hi!

Didn't test the thing, but i had almost the same idea, since i saw your acuuweather script...

but i'm not a coder...

I 'll test it this evening, when I'm at home...
Reply

Logout Mark Read Team Forum Stats Members Help
Skin File Parser0