Posts: 501
Joined: Nov 2007
Reputation:
3
I'm trying to wade through the XBMC code and find that which is responsible for the interaction between the skin xml files and the underlying GUI system.
Not having much luck finding it so far since the project is unfamiliar to me. I'm going to keep digging, but I thought i'd post this in case anyone could possibly point me in the right direction a little faster.
Posts: 501
Joined: Nov 2007
Reputation:
3
To be more specific (sorry only woke up a bit ago), I wanted to look into the possibility of adding some new code so you could do a boolean on whether a thumbnail is wide or tall. I think this would be helpful for skins since you could then have two image controls set up for the frame, and then just us a conditional visibility on them to display the right one.
I used to do computer programming in a past life, so if someone could point me in the right direction I could take it from there.
Posts: 26,215
Joined: Oct 2003
Reputation:
187
It won't be easy.
You'd have to:
1. Add a #define to GUIInfoManager.h, and code to translate the string and so on to GUIInfoManager.cpp.
2. Add code to GetItemBool() (or GetItemMultiBool or whatever it is) that would need to grab the listitem, grab it's thumb and then call a function in CGUIImage to extract the aspect ratio (you will either need to add this, or use width/height) and return appropriately.
The problem with this is it's only going to work once the thumb image has been allocated which occurs on first render. Thus, it won't kick in until after the image has been rendered, so there may be a "flicker" switching states. If you had a delay anim on the thumb rendering of one frame (say just 1ms will be fine) that may overcome it.
IMO a better route is rewriting the thumb caching code so that we know whether it's wide or normal in advance, but I have no time to do that.
Cheers,
Jonathan