Page 5 of 6 FirstFirst ... 3456 LastLast
Results 41 to 50 of 58

Thread: Plugins and NPVR. Where do we start?

  1. #41
    Join Date
    Nov 2003
    Location
    NextPVR HQ, Wellington, New Zealand
    Posts
    76,554
    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.

  2. #42
    Join Date
    Aug 2011
    Location
    Virginia, USA
    Posts
    491
    Ok, I'm starting to get it . 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.

  3. #43
    Join Date
    Nov 2003
    Location
    NextPVR HQ, Wellington, New Zealand
    Posts
    76,554
    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.

  4. #44
    Join Date
    Aug 2011
    Location
    Virginia, USA
    Posts
    491
    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?

  5. #45
    Join Date
    Nov 2003
    Location
    NextPVR HQ, Wellington, New Zealand
    Posts
    76,554
    Quote Originally Posted by cncb View Post
    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?
    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)

  6. #46
    Join Date
    Nov 2006
    Location
    Louisville, KY, USA
    Posts
    7,719
    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?

  7. #47
    Join Date
    Nov 2003
    Location
    NextPVR HQ, Wellington, New Zealand
    Posts
    76,554
    Is IRecorder.StopAllStreams() only called when the recording service is shutting down?
    Yes.

  8. #48
    Join Date
    Nov 2006
    Location
    Louisville, KY, USA
    Posts
    7,719
    Awesome. Thanks.

  9. #49
    Join Date
    Aug 2012
    Location
    White Plains, NY
    Posts
    20
    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. Thanks!.

  10. #50
    Join Date
    Nov 2003
    Location
    NextPVR HQ, Wellington, New Zealand
    Posts
    76,554
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •