PDA

View Full Version : Skins to support weather plugin



CodeMonkey
2004-04-19, 01:20 AM
For a skin to support weather, you need to create a 'weather' subdir and make sure the following buttons are there:

Current
Map
Forecast
Main Menu

Weather button for the main menu.

Get the file names from the blue skin.

You don't need to worry about weather icons, they are skin-neutral.

gplasky
2004-04-19, 11:55 AM
Issues with plugins for MCE like skin:

Need some help with the following issues:

1. Weather and Shutdown buttons on Main Menu appear to be hard coded somewhere. They appear in their own size which cuts off the buttons I have and they have their own text. I need to be able to define the button like in the main menu folder just like I have done with the other buttons in there. (Or possibly their main menu buttons can reside in their respective folders-I just need to be able to create the graphic and the text and put the button graphic somewhere. Maybe it's own folder would be better.)
2. Weather button on main menu-I am getting an exception error when I choose or click on this button. Here it is:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** 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 ag.c()
at ag.a(String A_0)
at ag.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)

Shutdown button works fine (but see#1 for my issue) and I have completed that for my skin. Can you give me some help or ideas where to start?

Gerry

CodeMonkey
2004-04-19, 12:06 PM
If you can put your modified skin somewhere I can get it, I will run with it tonight and see what the exception is. I'm guessing its missing a button file, but when I start up with the MCE skin I don't even get a weather button on the main menu now.

gplasky
2004-04-19, 01:17 PM
Grab it here

MCE like with Weather and Shutdown (http://home.comcast.net/~gplasky223900mi/MCE_like.exe)

The shutdown plugin doesn't throw an exception so that may help in troubleshooting. But both the main menu buttons seem hard defined and I need a way to replace those with mine. Possibly place the button in it's folder and use a skins.xml file to use it. Just thinking out loud. Or just maybe make standard programming for all plugins that it's main menu button is contained in the plugin's skin folder.

Gerry

CodeMonkey
2004-04-19, 03:00 PM
Personally, I like your second option of having the buttons defined in the plugins skin folder. But sub will decide. http://gbpvr.com/iB_html/non-cgi/emoticons/smile.gif

Before I forget, you can get rid of the unknown.png file. It actually is for the weather icons. Sub, you can remove it as well from the blue skin.

Thanks for the updated skin, I will fire it up tonight.

sub
2004-04-19, 05:50 PM
Gerry, I see what is going on. I'll fix it.

CodeMonkey
2004-04-19, 05:59 PM
Sub, you will fix the button looking funny or the exception or both? http://gbpvr.com/iB_html/non-cgi/emoticons/smile.gif

sub
2004-04-19, 06:00 PM
Both hopefully. I dont know whats causing the exception yet.

CodeMonkey
2004-04-20, 12:48 AM
Sub, I set breakpoints at the start of WeatherTask() and at the start of render(). It got to WeatherTask and I was able to step through and it completed successfully. When I pressed the weather button, it never got to render() and just exited.

This is the only thing that looked unusual in the output pane:

The thread 'Shoutcast Async Download thread' (0xf54) has exited with code 0 (0x0).

That could have happened due to the shutdown. I never saw an exception running it in the debugger though, it just exited.

CodeMonkey
2004-04-20, 09:41 AM
Up

sub
2004-04-20, 05:44 PM
I dont know why this happening. Sorry.

CodeMonkey
2004-04-21, 01:36 AM
I have a thought. For the MCE skin whenever your press one of the standard buttons, a graphic is drawn on the right of the screen prior to that screen being displayed. I noticed that the weather button does not display this before it crashes. Is this what is null and trying to be displayed? Where are those graphics located?

Update, thats *exactly* what it is. Start gbpvr and don't click on weather, but scroll down to it via the arrow keys. When you get to the weather button it crashes immediately, before you even select it. It is the display graphic I believe.

gplasky
2004-04-21, 09:03 AM
Brilliant CodeMonkey. That was the cause of the exception error. The shutdown plugin had a task.png in there so I hadn't noticed it. Thanks. One problem is solved.

Now just need to figure out why the graphical buttons show up cutoff for the add ons. Thanks. Sorry I didn't catch that one.

Gerry

CodeMonkey
2004-04-21, 12:08 PM
Gerry, no problem. I put a task.png in that directory and weather comes up fine now. Need to shrink the buttons a tad to make them fit though http://gbpvr.com/iB_html/non-cgi/emoticons/smile.gif

Sub, you will probably want to change it so that if task.png does not exist for a skin, don't display anything.

gplasky
2004-04-21, 03:40 PM
I need to understand why the weather and shutdown add-ins buttons show up like that. And why the text shows up on those buttons. All the other buttons are the same size and they show up fine. I really don't want to have to resize all my buttons just so the weather and shutdown buttons show up as the same size. What is defining that size? Can it be in the skins.xml so if I have to change it I can? What are my options?

Gerry

sub
2004-04-21, 05:02 PM
It'll be fixed in the next release, it was a case of unfortunate hardcoding - I've presented my wrists for slapping...

gplasky
2004-04-21, 08:15 PM
you're allowed one mistake..........just one. http://gbpvr.com/iB_html/non-cgi/emoticons/biggrin.gif

Gerry

CodeMonkey
2004-04-22, 12:15 PM
Gerry: I like using your skin. When can I get a version that has the smaller weather (current, map etc.) buttons? http://gbpvr.com/iB_html/non-cgi/emoticons/smile.gif

gplasky
2004-04-22, 02:52 PM
Let me see what I have tonight. I'll be gone for the weekend so I'll try to get something available before Friday.

Gerry

gplasky
2004-04-22, 10:26 PM
CodeMonkey
Try this

MCE like skin with Weather & Shutdown buttons (http://home.comcast.net/~gplasky223900mi/MCE_like.exe)

Keep in mind the buttons on the main screen will not look good until sub releases next version with the fix. Both the weather screen and shutdown screen is updated for this skin. I also included a weather and shutdown button in the main menu folder that just might work when the fix is made.

CodeMonkey-a request:
Please look at and consider some use of the skins.xml to define some of your screen elements. I have no way of removing the black surround window which would look better for my skin. Also notice even though I reduced both the heighth and width of the buttons, the buttons still appear to sit on top of each others.
Options for black window:
Notice in some of sub's screen it is actully a part of the background. Easy for me to change. Or notice in the shutdown plugin in the skins.xml a window is defined. Either one of these would help me.
Options for buttons:
Notice in Main Menu skins.xml buttons sizes and spaces are defined. Doing it like this would also help me and future skins.

I know there is work involved to make these changes but please consider it for this and future skins. Maybe if an agreement could be reached as far as what elements to define in the .xml file and what is defined in the plugin then it would ease the development of additional skins. Just a thought.

Gerry

CodeMonkey
2004-04-22, 11:46 PM
Thanks.

I will start implementing the xml stuff.

gplasky
2004-04-23, 01:03 AM
Thank you. Looking forward to it.

Gerry

Dai
2004-04-23, 08:22 AM
I've been reworking the skinning for my diskspace plugin and have been thinking that I ought to put more stuff in the skin.xml file. I thought about putting any text which is displayed on the screen in this file so that localised language versions could be produced simply by updating the skin file. What do poeple think of this idea.

Dai

CodeMonkey
2004-04-23, 11:43 AM
Quote[/b] (Dai @ April 23 2004,03:22)]I've been reworking the skinning for my diskspace plugin and have been thinking that I ought to put more stuff in the skin.xml file. I thought about putting any text which is displayed on the screen in this file so that localised language versions could be produced simply by updating the skin file. What do poeple think of this idea.

Dai
Take a look at the shutdown plugin code. That's what he did.