341
« on: September 22, 2008, 06:57:50 pm »
I lost the thread where this came up with before and I explained a bit about how XBMC's skinning engine is designed with a fall-through system that could be applied for supporting multiple platforms. The way their system works is you would have a folder structure like:
SkinName
-NTSC
--Any replacement skin files that won't scale properly
-PAL
--All main skin files here
-720p
--Any replacement skin files that won't scale properly
-1080i
--Any replacement skin files that won't scale properly
-Images
--Theme 1
---All images for theme 1 here
--Theme 2
---All images for theme 2 here
When a skin is loaded at PAL resolution, all the skin files are loaded from the PAL folder and used to display the skin.
When a skin is loaded for any other resolution for example, 720p, all skin files are grabbed from the PAL folder and any files that needed to be tweaked to scale properly to 720p are loaded from the 720p folder. So if you have a home.xml file in the PAL folder and not one in the 720p folder then home.xml is used and scaled to 720p from the PAL folder. If you have a system.xml file in both the PAL and the 720p folder then the one from the 720p folder is used.
This fall-through system could be used to support different or tweaked skins on different devices without the need to recreate the entire skin. Obviously some things should be designed to display on a TV, some on web pads w/touch screens, and some on smaller handheld devices like PDA's.
They also have a "theming" system in place that allows you to use the same skin files, but load images from different folders. What this means is you can have, for example, the same skin, but in different colors. This way a skin can be revamped to match your room better fairly quickly and with minimal effort by simply changing some color pallettes in photoshop.
It also allows the skinner to declare variables and call them using different routines so you can create skin-specific settings as well. When used properly a skinner has the option to let the user decide which screen they want to see. These settings could also aid with supporting multiple devices since obviously some PDA devices are touch screen, some aren't, some phones have full qwerty keyboards and some do not. There are several variables that can be accounted for using a system like this.
The architecture is what I feel really needs some discussion since I do not know everything about LMCE, but have been around and dug into XBMC code enough to know and understand how it works. My understanding on LMCE is that everything is exposed through device codes, and the entire system is controllable through these device codes. If that is correct then the XBMC skinning engine works quite similarly. They expose control of their software through action codes. So for example you could have an action code like mediaplayer.play or mediaplayer.skipforward. Those are then applied to a button or any other control in the XBMC skinning engine. I'd be interested to know more about what ideas you guys have as far as whether LMCE could be controlled in a similar manner. Again, my understanding is that this is very close to how LMCE works already.
There is another piece of the XBMC skinning engine that is very interesting, and that is the animations that can be done, a skinner can create a flashlike animated menu with as little as 10 incredibly simple lines in an xml file. Animations can be fades, slides, etc, and vectors can be applied to these animations for more advanced skinners.
They also expose a plethora of visibility conditions ranging from basic button.hasfocus() to any of the action codes available. There is literally no end to the possible combinations that can be used.
That said, this is a very brief introduction to what can be done with their engine. I personally would like to see some interest in integrating XBMC into LMCE and letting it handle media organization, playback, etc., but I realize that is likely a HUGE undertaking and one that would likely require a cooperative effort from several people.
I do agree that the current HADesigner is capable, but even with all the screencasts and the amount of work Thom has put in trying to help people understand it, the system is just too difficult for people to get their heads around.
Again, I did talk with JMarshall (wrote almost all of the skinning engine for XBMC), and he said if anyone from LMCE is interested to have them get ahold of him, he can be found on the boards at xbmc.org, or on #xbmc on EFNet. I'd like to hear what ideas you guys have to apply the features of XBMC's skinning engine to LMCE.
Just one more thing I'd like to point out is there are literally dozens of people who have a sound understanding of the xml based skinning system from the old underground xbox scene, most of these guys are still around and actively creating skins, and new ones are popping up all the time. Those users could very well show interest in applying their talents to LMCE as well if it were as simple as what they're used to. I've seen at least 5 LMCE users skinning XBMC in recent months so they are out there.