NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 81 82 83 84 85 … 93 Next »
Weather plugin

 
  • 0 Vote(s) - 0 Average
Weather plugin
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#1
2004-12-05, 01:42 PM
does the original developer mind if i edit and fix a few of the little bugs etc in the weather plugin, like fixing if at main menu press down goes to the top, will draw a screen and text like "downloading weather info please wait" and not just wait until its downloaded it before it displays anything, and make it more skinnable, i just want to know if i can post my changes and possible update the wiki with my edit (ill take no credit, i dont care, just want to fix a few things).
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#2
2004-12-05, 03:03 PM
im trying to edit the weather plugin source, but each time i try to use the plugin helper i get a null exception ie
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">getNamedImage()
getNamedFont()
getNamedFontBrush()
[/QUOTE]
they all come back null, ive done a test like
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">node = common.GetSkin().SelectSingleNode("/settings/TextStyles/TextStyle @name=\"ButtonText\"]");
if(node != null)
{
fntButtonText = skinHelper.getNamedFont("ButtonText");
bshButtonText = skinHelper.getNamedFontBrush("ButtonText");
AlignButtonText = CommonClass.GetStringFormat(node);
}
[/QUOTE]
so the node does exist, and is correct in the skin file, anyone got any ideas what could be wrong? ive set a reference to the gbpvr public dll in the plugins dir (build :1.0.1795.36204)

also im setting up the skin helper in the activate method
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if(skinHelper == null)
{
// setup skin helper
XmlDocument document = new XmlDocument();
document.Load(PluginHelperFactory.getPluginHelper().GetSkinRootDirectory() + getSkinSubdirectory() + "\\Skin.xml");
skinHelper = new SkinHelper(document, PluginHelperFactory.getPluginHelper().GetSkinRootDirectory() + getSkinSubdirectory());
}
[/QUOTE]
CodeMonkey
Offline

Senior Member

Posts: 389
Threads: 86
Joined: Apr 2004
#3
2004-12-06, 02:08 PM
Sub was the original developer, and I enhanced it.  Someone else added the multiple locations feature.  So feel free to enhance it further.

I'm not sure what is wrong with the skin handler.
I'd probably step through and make sure that document isn't NULL during that 3 step process to create skinHelper. And make sure that the Skin.xml file (note the upper case S) really does exist where the app is looking for it.

Good luck!
-CodeMonkey
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#4
2004-12-07, 09:17 PM
ok ive pretty much finished updating the weather plugin, a large portion of it is skinnable now, and you dont have to use those button images, you can use the compositeimage method, which is nice. ive skinned it like sub has done, well mostly. theres just one thing i cant get quite right and thats that antialias.
using this code
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
// create the opaque background picture
Graphics.FromImage(compositeScreenImage).DrawImage(backgroundImage, 0,0);

// get graphics for drawing screen
Graphics g = Graphics.FromImage(foregroundImage);
g.SmoothingMode = SmoothingMode.AntiAlias; [/QUOTE]
and then use g.drawString() or g dot anything, the stuff drawn with g never dissappears each time the screen is repainted these items are visible (so if change from forecast to map, you can see the forecast still). using this code to draw to the screen
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Graphics.FromImage(compositeScreenImage).DrawString()[/QUOTE]
removes it each time the screen is repainted, but its not antialiased, so if you draw a black rounded rectangle its solid, not transparent. so whats the trick to get this to work?
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#5
2004-12-09, 05:55 AM
ok ive finished updating the weather plugin, well its ready to be tested, mostly i want a few skin developers to test it, to see if everything is good to go.
attached is the new plugin.
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#6
2004-12-09, 06:02 AM
and heres the source. i had to add another reply since only one attachment per message.

most people wont really notice a difference, it will now display a message &quot;please wait while downloading ...&quot; and it can be translated,heres what you need to add in the language.xml file
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> <translate originalText="Main Menu" translatedText=""/>
<translate originalText="Current" translatedText=""/>
<translate originalText="Forecast" translatedText=""/>
<translate originalText="Map" translatedText=""/>
<translate originalText="Sorry - unable to retrieve information" translatedText=""/>[/QUOTE]
CodeMonkey
Offline

Senior Member

Posts: 389
Threads: 86
Joined: Apr 2004
#7
2004-12-09, 02:51 PM
Nice.  I meant to do that but never did [Image: smile.gif]  I will try it tonight.

I dont see this string in your translation post above ...

&quot;please wait while downloading&quot;

Should it be there?



-CodeMonkey
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#8
2004-12-09, 07:53 PM
that is a composite image, so its handled in the skin.xml, i just figured if skin developers want to show a popup message, or a simple graphic (clock or something) instead of a plain string this would be better.  since im using a popup image.

im not sure if sub translates the composite images text thou, if he doesnt people can just manually translate it in the skin.xml file.



sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,717
Threads: 767
Joined: Nov 2003
#9
2004-12-09, 07:56 PM
Yes, I automatically translate all text in a composite image.
CodeMonkey
Offline

Senior Member

Posts: 389
Threads: 86
Joined: Apr 2004
#10
2004-12-10, 11:38 PM
Works fine for me reven!
-CodeMonkey
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (4): 1 2 3 4 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  PIP plugin for Kodi sgilani 2 2,895 2022-10-17, 12:44 AM
Last Post: sgilani
  New Systems Plugin kirschey 10 3,394 2020-11-14, 08:01 PM
Last Post: sub
  VIdeo playback from plugin mvallevand 5 3,492 2015-08-06, 10:43 PM
Last Post: sub
  Attention Sub: Open TV / Custom Data Grabber plugin Benoire 2 2,922 2014-11-14, 02:05 AM
Last Post: Benoire
  API docs to help with plugin development? McBainUK 3 2,788 2013-06-08, 06:14 PM
Last Post: sub
  Refreshing TV Guide Data (after System plugin EPG update) imilne 13 6,142 2013-03-24, 08:03 PM
Last Post: imilne
  sabnzbd plugin to show processed files Wakalaka 1 1,966 2013-03-12, 06:48 AM
Last Post: psycik
  Plugin problems with started from the command line mvallevand 11 5,021 2012-08-12, 07:56 PM
Last Post: sub
  Get NextPVR data directory from outside a plugin McBainUK 3 2,259 2012-02-11, 05:42 PM
Last Post: mvallevand
  Weather Plugin imilne 0 1,445 2012-01-15, 08:33 PM
Last Post: imilne

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode