NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 88 89 90 91 92 93 Next »
IInfoPanel  getPanelName()

 
  • 0 Vote(s) - 0 Average
IInfoPanel  getPanelName()
CodeMonkey
Offline

Senior Member

Posts: 389
Threads: 86
Joined: Apr 2004
#1
2004-08-23, 01:18 PM
For the weather plugin for example, I assume this method should return the string "weather".  Is this correct?  How can I find this information out?  For the Blue skin, main menu skin.xml file, the only 'panel' reference is:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"><SpecialElement name="Panel" panelName="comics" visible="false" loc="500,100" size="180,80"/> [/QUOTE]

even though I do have the weather plugin enabled.

Also, is there a reason to make the returned image 180X80 as suggested in the code? I was thinking of putting the current weather icon and current temp in the panel, but 180X80 seems a little small for that. Is there a maximum size it can be?
-CodeMonkey
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,729
Threads: 767
Joined: Nov 2003
#2
2004-08-23, 05:38 PM
The panel name is the returned from the plugin's IInfoPanel.getPanelName() method.

It can be any size you like. I can see a potential problem looming around this though. If everyone returns different size panels it good look a bit ugly. I suppose if at least they use a similar aspect ratio it should be ok. The first person to implement one (you), probably gets to set the standard for size which others should follow.
CodeMonkey
Offline

Senior Member

Posts: 389
Threads: 86
Joined: Apr 2004
#3
2004-08-23, 06:49 PM
[b Wrote:Quote[/b] (sub @ Aug. 23 2004,08:38)]The panel name is the returned from the plugin's IInfoPanel.getPanelName() method.
What, if any, is the significance of this panel name? I saw that 'comics' had a panel name assigned in the skin.xml. Is there any relation between this panel name and what gets returned by IInfoPanel.getPanelName() ?
-CodeMonkey
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,729
Threads: 767
Joined: Nov 2003
#4
2004-08-23, 07:03 PM
When it first loads up the plugins, it adds them to a hash table keyed by the value returned by the plugins IInfoPanel.getPanelName() implementation.

When its rendering the main menu, 'Panel SpecialElements' listed in the skin.xml. For each panel name in the skin.xml it checks if it has a plugin plan with that name. If does, it will render it.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,729
Threads: 767
Joined: Nov 2003
#5
2004-08-23, 07:04 PM
The name basically connects the plugin with the location it is supposed to be drawn (listed in skin.xml).
CodeMonkey
Offline

Senior Member

Posts: 389
Threads: 86
Joined: Apr 2004
#6
2004-08-23, 09:11 PM
OK, so then if I add a &quot;weather&quot; panel, I should add a appropriate panel element in skin.xml named &quot;weather&quot; such as<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"><SpecialElement name="Panel" panelName="weather" visible="true" loc="500,100" size="180,80"/> [/QUOTE]

where 'size' is whatever size I end up with.  Wouldn't 'loc'ation be relative based on the dynamic menu? What would I put in the the 'loc' field?
-CodeMonkey
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,729
Threads: 767
Joined: Nov 2003
#7
2004-08-23, 09:17 PM
loc is used to position the panel image on the main menu. It is a fixed location.

size is how big the panel will be. It doesnt have to be the same size as the image returned from your plugin, but be aware resizing may have undesireable effects.
CodeMonkey
Offline

Senior Member

Posts: 389
Threads: 86
Joined: Apr 2004
#8
2004-08-24, 01:33 PM
Ohhhhhh. I assumed the panel would be drawn next to the menu item for the plugin. Now I understand. Thanks.
-CodeMonkey
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  IInfoPanel renderpanel() Huw 12 4,610 2004-11-03, 12:48 PM
Last Post: Huw
  anyone got a sample IInfoPanel plugin? reven 0 1,550 2004-11-01, 07:35 PM
Last Post: reven

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

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

Linear Mode
Threaded Mode