NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
1 2 3 4 5 … 93 Next »
Plugins and NPVR. Where do we start?

 
  • 0 Vote(s) - 0 Average
Plugins and NPVR. Where do we start?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,772
Threads: 769
Joined: Nov 2003
#41
2011-08-04, 02:15 AM
Apparently the skin I posted yesterday had a 'PopupButtons' element defined, which wasnt used, and only serves to help confusing developers. I've attached another version which removes it. I cant really remember why it was there originally, but it's no longer used. It was probably just some hang over from the early days of NextPVR last year.

This SomePopup initialises a button list using the "PopupLeftButtonNormal"/"PopupLeftButtonSelected" element names.

Code:
// setup some fake buttons
            List<string> buttonNames = new List<string>();
            buttonNames.Add("Test 1");
            ...
            buttonNames.Add("Close");

            // construct button list
            buttonList = new UiButtonList("PopupLeftButtonNormal", "PopupLeftButtonSelected", buttonNames, skinHelper, this);

It'll first look in the popup.xml for the definition of "PopupLeftButtonNormal"/"PopupLeftButtonSelected". Since they're not defined there, it'll fall back to looking for them in global.xml - which is used to define common stuff, giving a consistent look and feel for colors/fonts/positioning of elements.

So... if you wanted your popup to have a button list, with buttons to be placed in a different location to other popups, then you could define overridden definitions in the popup.xml (stopping it from using the common definition in global.xml), or give them a different name and define them in popup.xml.

Regarding the placement - the UiButtonList controls use the location from the 'PopupLeftButtonNormal' definition, then add the vertical button size and spacing make a vertical list of buttons. The spacing can be tweaked in the skin files.

Hopefully that helps. Ask for more details if you need them though.
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#42
2011-08-06, 04:20 PM
Ok, I'm starting to get it Smile. But, I'm trying to add a list to a popup like that in the "FindAll.xml" popup. I have copied the ListView, ListItemNormal, and ListItemSelected elements to my XML and I create the ui list in my code like so:

Code:
MyList = new UiList( this, "ListView", "ListItemNormal", new Hashtable(), skinHelper, UiList.ViewMode.LIST);

However, nothing shows up when I add list items. I'm not sure what the "backgroundElement" argument is supposed to be and I don't see where you specify the selected item element. Is there an additional ui element I need to create in the code?

Thanks again.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,772
Threads: 769
Joined: Nov 2003
#43
2011-08-06, 05:55 PM
The BackgroundElement is the definition of popup background in the skin xml. It might just be a black rectangle with rounded corners, or it might have some static text on it, etc. For example, when you click ok on a show in the TV Guide it pops up a background that has a show name and description as part of the background element. In this type of scenario the hashtable passed in when the create popup would include parameters like "@title" and "@description" or anything else you'd like to use in your background element's definition in the skin xml.

To get your UiList to show up, you'd need to override a couple of things like GetRenderList() and NeedsRendering() to add UIList to the render list. I've attached my findall popup code to give you an example.
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#44
2011-08-09, 03:39 PM
Thanks for the example. The code creates a UiList with "View" and "Item" elements in the constructor but the skin .xml only has "ListView", "ListItemNormal", and "ListItemSelected". Sorry, I still don't see how these elements get associated with the UiList? Does it automatically prepend "List" and append "Normal" and "Selected" to the strings to find matches in the skin?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,772
Threads: 769
Joined: Nov 2003
#45
2011-08-09, 06:18 PM
cncb Wrote:Thanks for the example. The code creates a UiList with "View" and "Item" elements in the constructor but the skin .xml only has "ListView", "ListItemNormal", and "ListItemSelected". Sorry, I still don't see how these elements get associated with the UiList? Does it automatically prepend "List" and append "Normal" and "Selected" to the strings to find matches in the skin?
Quote:uiList = new UiList(this, "View", "Item", new Hashtable(), skinHelper, UiList.ViewMode.LIST);
The "View" part of this is used by prepending the view name to find the background name for each view. ie ListView CoversView IconView. The "Item" is only used in the Covers/Icon view to determine the skin element name (by prefixing the view name), ie CoversItem and IconItem.

For the List view, it always uses ListItemNormal/ListItemSelected, due to historic reason and not changed for fear of breaking other users skins and plugins. (There is a way to define more than one set per skin file if need be (since I needed this recently to support the Search screen which has three lists)
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#46
2011-09-11, 03:35 PM
I didn't want to create another thread for what is essentially a yes/no question:

Is IRecorder.StopAllStreams() only called when the recording service is shutting down?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,772
Threads: 769
Joined: Nov 2003
#47
2011-09-11, 05:07 PM
Quote:Is IRecorder.StopAllStreams() only called when the recording service is shutting down?
Yes.
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#48
2011-09-11, 05:49 PM
Awesome. Thanks.
jamhandman
Offline

Junior Member

Posts: 35
Threads: 4
Joined: Aug 2012
#49
2012-08-20, 06:57 PM
Looking to get started with some code development here, is the first post here still relevant?
I just started using Next PVR as Windows Media Center failed me (kept crashing with my Cable QAM signal).

I work mostly in C# all day, so I hope to make some contribution to this project. Smile Thanks!.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,772
Threads: 769
Joined: Nov 2003
#50
2012-08-20, 07:19 PM
Yes, these posts are still relevant. Take a look at those as a first step. We're pretty friendly here. If you've got questions or general want advice on how to go about doing something, then just ask. We'll point in the right direction.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (9): « Previous 1 … 3 4 5 6 7 … 9 Next »
Jump to page 


Possibly Related Threads…
Thread Author Replies Views Last Post
  API channel.stream.start mvallevand 2 1,430 2023-05-07, 09:40 PM
Last Post: mvallevand
  Way to tell programmatically if channel load in from NPVR has finished... gdogg371 3 2,430 2021-03-11, 03:59 PM
Last Post: mvallevand
  Test/Development environment for npvr.db3 scJohn 10 4,487 2020-09-04, 09:14 PM
Last Post: scJohn
  How to extract M3U8 and get matching XMLTV guide data from NPVR almightyj 0 3,520 2018-10-23, 07:24 AM
Last Post: almightyj
  ios app to control npvr ui idea jnbooker15 4 3,676 2015-09-21, 10:19 PM
Last Post: sub
  ios app to control npvr ui idea jnbooker15 0 2,516 2015-09-21, 06:39 PM
Last Post: jnbooker15
  I want to start developing plugins...but how? OrenShapir 6 4,139 2014-11-18, 10:38 PM
Last Post: mvallevand
  Couple of questions about hacking npvr.db3 drmargarit 6 4,322 2014-09-08, 02:22 AM
Last Post: sub
  Absolute newbie trying to realize an idea - where to start? Oopsjoppe 13 5,742 2013-11-11, 05:33 PM
Last Post: Oopsjoppe
  high res (256x256+) npvr icon? reven 15 5,969 2013-09-01, 05:13 AM
Last Post: psycik

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

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

Linear Mode
Threaded Mode