PDA

View Full Version : Skin creation - task.png problems



tieke
2004-07-31, 10:27 AM
Hi all, have just found GBPVR, which is such a great application it has caused me to send off for a Hauppage-250 to go with my MVP.

While waiting for it to arrive, I'm just setting up a skin using "Flat-Blue" as a base in order to make the various screens easier to read on my 29" TV from across the room. I'm slowly getting there, except I have problems with getting the task images to show for three of the plugins I have installed (cartoons, picture and disk space) although it works fine with the weather plugin.

ie. I have set the Special Element TaskImage to visible in my main menu skin.xml, and have created 250x180 icons for all the menu options, which all work perfectly until you hit one of those three plugins, at which point the MVP just crashes, or, more informatively the internal GBPVR gives the following exception text:

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
* at System.Drawing.Graphics.DrawImage(Image image, Int32 x, Int32 y, Int32 width, Int32 height)
* at bv.d()
* at bv.a(String A_0)
* at bv.a(Message& A_0)
* at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
* at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
* at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

etc

I have placed task.png images into the appropriate three directories - whereabouts do I have to go to let GBPVR know this?

thanks,

Simon

ps. I'm also looking for where I go to update the TaskDescriptions - basically I want to change the Search Guide description to "Search...for your favourite shows" rather than "...you favourite shows".

sub
2004-07-31, 06:14 PM
The reason its crashing is because GB-PVR was expecting all plugins would return a task image when requested, but to cut corners (because they were never view with any current skin) these plugins aren't returning a picture. I've just made a change a few days ago to make sure this doesnt cause a crash. This'll be in the next release.

The reason GB-PVR was asking the plugin (even internal ones like Video Library etc) for the image instead of looking for a file it itself, was so that the plugins could generate dynamic image if required. This might be useful for update the user about the status of some etc.

sub
2004-07-31, 06:15 PM
BTW, fixed the typo. Thanks for pointing it out.

tieke
2004-08-01, 12:32 AM
Cool - I'll carry on playing around then, and just leave those plugins disabled for now. Thanks again for a great programme. (and I must say, as someone else who lives in Wellington, it was a nice change to have some default settings preconfigured correctly http://gbpvr.com/iB_html/non-cgi/emoticons/wink.gif ).

tieke
2004-08-21, 05:55 AM
I may be missing something, but I have downloaded the latest version, which does fix the task-image crashing problems, but despite task.png images being in the relevant folders I still can't get the task-images displayed in the diskspace, pictures, comics or news-feeds plugins (had a small hiccup with the jukebox task image as well - displayed a few error messages the first time, but has since displayed the image correctly).

Is there something I should do to enable the task images to display for these plugins?

sub
2004-08-21, 06:30 AM
It currently working as I meant it to. GB-PVR asks the plugin if it has a task image. The plugin can return an image 'if it wants to' and GB-PVR will display it. What you're seeing these extra plugins are not returning a task image. Not all of the plugins were written by me, and many of them dont return a task image.

That said, I know this answer doesn't help what you are trying to do, so I've added one more piece of logic to GB-PVR: If the plugin doesn't return an image, check if there is a task.png in the plugins skin subdirectory and use it if present. This is not how I'd intended things to function, but probably wont hurt things as none of the current plugins dynamically generate their task image to date.

sub
2004-08-21, 06:31 AM
This will be included in the next release.

tieke
2004-08-21, 07:00 AM
Cool. That should do it. Would it be helpful for me to send you the task images I am using for you to include them in your blue skin for testing purposes?

sub
2004-08-21, 07:07 AM
Yeah, send them over. I'd love to take a look.