NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 15 16 17 18 19 … 93 Next »
Multiple views for a single list

 
  • 0 Vote(s) - 0 Average
Multiple views for a single list
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#11
2011-04-19, 02:59 PM
Help out my clunky brain here... are you talking about doing something that would actually be ideal in my situation, where with the existing code I can define a covers, icon, and list view in a single skin file, but if I wanted a second (different) covers view, I need to split it out into a new skin file? Or are you on about something else entirely Big Grin

Iain
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#12
2011-04-19, 03:18 PM
If practical, I'll make it possible to define multiple different list layouts in the same file. ie, various elements prefixed with some plugin supplied name. I'll only do this if it can do it cleanly, and without breaking the existing skins and names. Otherwise you'll just have to stick with multiple skin files like you have to do today.
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#13
2011-04-19, 04:05 PM
If it helps Ommina, then great, but don't do anything on my account for this.

I think what I'm planning may actually be better off with multiple skins. I'd have one view per skin, but the skin itself would also define whether that view was covers, icons, or list (in a comment tag or something).

Then my plugin could parse the directory for skin files, and work with new ones that it didn't know about at compile time. Once it knows how my total skins there are, then it'll know which one to load next when the user presses "View" and it has to recreate the UiList to switch to the next view (and set the list's mode).

Iain
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,767
Threads: 954
Joined: May 2006
#14
2011-04-20, 11:52 PM
sub Wrote:Yes, you'd need multiple skin files.

You'd do something like:

SkinHelper skinHelper1 = new SkinHelper("myplugin\\skin1.xml");
SkinHelper skinHelper2 = new SkinHelper("myplugin\\skin2.xml");

UIList uiList1 = new UiList(this, "View", "Item", new Hashtable(), skinHelper1, UiList.ViewMode.LIST);
UIList uiList2 = new UiList(this, "View", "Item", new Hashtable(), skinHelper2, UiList.ViewMode.LIST);

In your GetRenderList() method, you can add one or both.

List<UiElement> renderList = new List<UiElement>();
if (showingFirstList)
renderlist.AddRange(uiList1.GetRenderList());
if (showingSecondList)
renderlist.AddRange(uiList2.GetRenderList());
....etc...

Is there a simple way to set focus to one of these other secondary lists or is it all manual monitoring of the keyboard?

Martin
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#15
2011-04-21, 05:52 AM
mvallevand Wrote:Is there a simple way to set focus to one of these other secondary lists or is it all manual monitoring of the keyboard?

I decided to go with simply recreating the list that is inherited from the base class, rather than making multiple list instances. That way, I can have any number of views for it (with my multiple skins) but sub's code can still take care of most of the hard work for it. I think the only extra I've added is the ability for it to remember what item was selected when you toggle the view.

Iain
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#16
2011-04-21, 11:25 AM
mvallevand Wrote:Is there a simple way to set focus to one of these other secondary lists or is it all manual monitoring of the keyboard?
If you're having multiple lists on the screen at one time, then you probably wouldnt use the provided base clase, and would instead create your own screen which monitors whichever of the exit-left/right/up/down UIList callback events were appropriate for your layout, aswell handling the OnClick event for cases where the user has directly clicked on a list.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,767
Threads: 954
Joined: May 2006
#17
2011-04-21, 12:06 PM
Well, I guess that is a no to "simple". What I have been doing is setting base.uiList = uiList1; Is that intrinsically a bad idea?

Martin
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#18
2011-04-22, 08:21 AM
mvallevand Wrote:Well, I guess that is a no to "simple". What I have been doing is setting base.uiList = uiList1; Is that intrinsically a bad idea?

It's what I'm doing. Well, base.uiList = new UiList(...) anyway.

Iain
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#19
2011-04-22, 11:06 PM
mvallevand Wrote:Well, I guess that is a no to "simple". What I have been doing is setting base.uiList = uiList1; Is that intrinsically a bad idea?
Its not something I've explicitly tried. You can probably do it though.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): « Previous 1 2


Possibly Related Threads…
Thread Author Replies Views Last Post
  is there a service?method which returns listings for multiple channels? reven 16 6,793 2022-04-11, 04:30 PM
Last Post: mandai
  Channels List by Channel Group Name scJohn 1 2,729 2018-01-05, 10:45 PM
Last Post: mvallevand
  Channel List (native controller) psycik 2 3,021 2017-06-19, 09:14 AM
Last Post: psycik
  Possible to have another element in details-single.xml Northpole 2 2,188 2014-07-11, 09:51 PM
Last Post: Northpole
  Multiple genres in npvr.db3 bgowland 5 2,811 2013-04-16, 09:53 PM
Last Post: ACTCMS
  List of "IEventNotification" events? reven 8 3,326 2012-11-01, 10:56 PM
Last Post: reven
  Multiple lists like in Search Screen cncb 7 3,216 2012-08-08, 09:11 PM
Last Post: cncb
  Building a list of files in media folders (npvr Music and Videos) bgowland 2 1,847 2012-02-05, 10:29 AM
Last Post: bgowland
  Update NewSyleListPlugin Button list dynamically? psycik 2 1,713 2011-12-22, 12:25 AM
Last Post: mvallevand
  Single row horizontal list in popup? cncb 4 2,151 2011-09-28, 09:48 PM
Last Post: cncb

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

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

Linear Mode
Threaded Mode