View Full Version : Some skinning questions
i've done some basic skinning to rearrange some buttons, change the size of the albums covers, etc. now i want to understand how the controls actually work so i can play around and make some more modifications.
images and hyperlinks make sense to me. what i dont fully understand are the other controls. so i have these questions that i hope either you skin guru's or the godly dev's can answer :)
do buttons (that are not hyperlinks) get their actions based off their label field? if so, how do the ones in home.xml work for the shutdown, reboot, etc controls? they have a blank label.
how do the automated label controls work? and how are they differentiated from each other if there are more than one on a page? (an example of such a page is the dialogvideoinfo.xml)
in the musicoverlay.xml is there anyway to get access to the song title, artist info, etc without the use of a fadelabel? i would like for the information to be displayed individually as seperate static labels.
is there anyway the albums listcontrol from mymusicalbums.xml be applied to listcontrols in other pages? i kind of want to convert a thumbpanel into more of a listcontrol. the thumbpanel is nice, but you cant read any of the video titles or album names because the text field is so tiny. and the listcontrol has nice long text fields, but dont display icons (and if they did, they would be really tiny.)
and finally what is the musicvisualization.xml file used for?
bobrooney_78
2004-06-06, 17:18
do buttons (that are not hyperlinks) get their actions based off their label field? *
>> they geht their actions based on their "hyperlink" or "id" field
in the musicoverlay.xml is there anyway to get access to the song title, artist info, etc without the use of a fadelabel?
>> i think no.
is there anyway the albums listcontrol from mymusicalbums.xml be applied to listcontrols in other pages? *i kind of want to convert a thumbpanel into more of a listcontrol. *the thumbpanel is nice, but you cant read any of the video titles or album names because the text field is so tiny. *and the listcontrol has nice long text fields, but dont display icons (and if they did, they would be really tiny.)
>> yeah, an enhanced listcontrol with thumbs would be great - but i think at the moment it isn't possible.
bob
thanks for info. skinning.txt doc doesnt really explain the whole id tag concept. (other than saying "this should be unique within this file"). i thought it was only to mark each control so the onup, ondown, onleft, onright tags can determine what control gets focus next.
so, if the id tag is controlling the action of the control, then shouldnt each "action" have a unique id? i'd expect the "number of files" control to have the same id in each xml, but thats not the case.
and if the action id's are specific within each windowid, is there a list somewhere that maps them out?
bobrooney_78
2004-06-06, 19:25
so, if the id tag is controlling the action of the control, then shouldnt each "action" have a unique id? *i'd expect the "number of files" control to have the same id in each xml, but thats not the case.
i asked me the same questions for some time, i ended up playing around with existing skins - trial & error.
the answer lies in the c-source code, there is no other documentation beside the skinning.txt
i've been doing the same thing, but it doesnt make sense. *its like something is missing. *there should be some tag in the control which ties the control to an action.
edit... i've been looking through the source code and found them...
here's an example from xbmc/xbmc/guiwindowmusicsongs.cpp. these correspond to the control id's in mymusicsongs.xml.
#define control_btnviewasicons 2
#define control_btnsortby 3
#define control_btnsortasc 4
#define control_btntype 6
#define control_btnplaylists 7
#define control_btnscan 9
#define control_btnrec 10
#define control_labelfiles 12
#define control_list 50
#define control_thumbs 51
if you ask me, this is the wrong approach. why have define the controls per window. why not have a single controls.h file that defines all the control actions and then include it in each window.cpp. controls that are not valid for a given window would just be ignored.
now that i know how the actions coorespond to the control ids, i'm going to parse through all the window.cpp files and put together a skinning guide which'll outline all the special actions per window, and what their id's need to be to access them.
but, i cant checkout from anon cvs. i've been getting a message that its locked by jwmulder since last night. can someone with rights check if a lockfile got stuck or something ?
cvs should work now again?
oh, was cvs offline on purpose cuz of the dell legal issues?
edit: nevermind... anon cvs is working now.
Hullebulle
2004-06-22, 16:31
oh, was cvs offline on purpose cuz of the dell legal issues?
edit: nevermind... anon cvs is working now.
no. it was down due some sf issues i guess. nothing to do with dell.
kraqh3d: did you ever create that guide?
damn, i knew someone was going to ask that. sorry but i didnt. i got side tracked by some other projects at home. i'll see what i can do to get it done soon.
done (sorta). *i wrote a script which cross-references the gui*cpp files to the skin xml files and produces a report like this:
------------------------------------------------------------------------------------------
-------------------
window id = 10000
------------------------------------------------------------------------------------------
-------------------
xml = home.xml
cpp = guiwindowhome.cpp
------------------------------------------------------------------------------------------
-------------------
control_btn_shutdown * * * * * * * 10 * button * * * * * * *powerdown button
control_btn_dashboard * * * * * * *11 * button * * * * * * *dashboard button
control_btn_reboot * * * * * * * * 12 * button * * * * * * *reboot button
control_btn_credits * * * * * * * *13 * button * * * * * * *credits button
control_btn_online * * * * * * * * 14 * button * * * * * * *online gaming button
------------------------------------------------------------------------------------------
-------------------
the columns are:
1) control name, as defined in the cpp file. *(problem is i miss a few because not all are #define'd)
2) control id, as based on the #define in cpp file
3) control type, pulled from the appropiate skin xml file
4) control description, pulled from the appropiate skin.xml file
todo: find the missing controls which (to the best of my knowledge) are all label types which arent #define'd so the getid functions are called by a number.
gamester, where should i place this doc? *(i'll also share the perl script which produces the output. *it uses xml::simple)
edit, hmm the output got mangled a bit in here. oh well. u get the idea
jmarshall
2004-07-15, 19:27
hi kragh3d.
i agree heartily with what you have described with regards to the id's. they should, ofcourse, be unique throughout the application. in fact, one should be able to choose which buttons go on which screens, allowing far more versatile gui development. (for instance, skinners could then completely redo the layout for settings if they wanted to).
unfortunately, this would require a fair amount of reorganisation of the code. i intend to do this when i return from my hiatus (gotta finish my thesis first!). i plan to:
1. make all control id's unique.
2. make some of the controls independent of the windows they're defined in. for instance, all the settings controls to start with. that should allow skinners the ability to redo at least this section (ie move controls to different windows etc. etc.) to make it possibly more consistent.
after those, i plan to
3. allow skinners to define new windows without needing code changes. this will require quite a bit work, and i'll only do it if i see some serious benefit in it. it
if anyone has any comments on the above, please reply.
note that it won't be done for at least 2 weeks (and possibly longer)!
cheers,
jonathan
bobrooney_78
2004-07-15, 20:47
1. *make all control id's unique.
2. *make some of the controls independent of the windows they're defined in. *for instance, all the settings controls to start with. *that should allow skinners the ability to redo at least this section (ie move controls to different windows etc. etc.) to make it possibly more consistent.
after those, i plan to
3. *allow skinners to define new windows without needing code changes. *this will require quite a bit work, and i'll only do it if i see some serious benefit in it. *it
sounds great!!! :)
wmv or avi-support for the gui would be cool, too. ;)
jmarshall
2004-07-15, 23:33
i'm certainly not going to avi/wmv movie support for the gui controls. animated gif is already there.
perhaps a decent, alternative animated format may be added if it's open sourced. suggestions are welcome.
that will be really great!!
using any kind of control in any window will let the skinner be free to make a completly new xbmc, not only in the look but also in the functionality.
take all the time that you need but, please, make this become a realty.
cheers. :bowdown:
jmarshall
2004-07-16, 00:35
not to put a dampener on your enthusiasm, but i will only implement stuff in code that makes sense and will be useable.
don't expect complete free-range, but any sensible suggestions will be taken into account.
in fact, one should be able to choose which buttons go on which screens, allowing far more versatile gui development.
i would love to see this in xbmc or maybe a feature to allow skinners to define actions (along with their corresponding ids) in a separate xml file. i'm not much of a coder but i've included an example xml to clarify what i meant below:
<action>
<id>1</id>
<description>link to my videos</description>
<type>hyperlink</type>
<function>myvideos</function>
</action>
<action>
<id>2</id>
<description>power cycle xbox</description>
<type>command</type>
<function>restart</function>
</action>
<action>
<id>3</id>
<description>run python script</description>
<type>script</type>
<function>q:\scripts\xbmc.py</function>
</action>
the types available and most of the functions would have to be defined and handled within the code, but this method would allow skinners to apply any defined action to a control that supported it.
i don't know if it is feasible, but i would love to have the ability to add custom items to references.xml.
it would make things much easier. :)
jmarshall
2004-07-16, 12:41
keep in mind that a skinning app is on the horizon.
manually editting .xml files may soon be a thing of the past.
and that will mean more skins for the greatest xbox dash/application ever developed.
:thumbsup:
jmarshall, that sounds great. i'll help if i can. tho, im currently in the midst of updating the music database code to support files that are tagged with more than one genre (and tagged with id3v1 numeric values).
its not finished yet tho its mostly working. i got sent on a business trip and wont be back for a few more days.