NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 16 17 18 19 20 … 93 Next »
Vertical SubMenu

 
  • 0 Vote(s) - 0 Average
Vertical SubMenu
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#1
2011-03-01, 08:36 AM
Sub, you were kind enough in the past to post the source for nPVR's main menu that allowed me to develop the SubMenu plugin. I think your menu has had vertical layout support for a while now, but you've obviously made it more explicit in the latest version. Is there any chance you could repost the latest code so I could see how to port it over to SubMenu and/or give me some hints on what I need to do.

It's equally possible that the original code *did* support vertical menus and I've broken something along the way, so if that was the case, please let me know too Big Grin

Thanks

Iain
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#2
2011-03-01, 04:07 PM
The code is pretty ugly, but I'll try to tidy it up a bit some time in the next week so I can post it for you.

Just to be clear though, its an different menu class entirely, not vertical and horizontal in the same menu. You wouldnt be able to override the default horizontal/vertical menu plugin classes used, but an individual skin can be set to use your custom menu class though (which would always be in whatever orientation that menu plugin used).
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#3
2011-03-01, 05:39 PM
Ok, thanks for the clarification. There's no rush for it though, I barely have 15 mins a day to mess around with this stuff in between changing my baby's nappies, trying to keep him entertained, etc... Smile

Personally, I've grown quite accustomed to the horizontal layout now, but folks have asked for vertical support so it would be nice to try and get it working.

Iain
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#4
2011-03-12, 05:04 PM
Hi sub,

I'm trying to update SubMenu so that it works with 2.0.3, but I need a little help understanding what you've changed.

Previously, the code went looking for Menu\Menu.xml for the skin, but you've changed that now to be Menu\Horizontal.xml and Menu\Vertical.xml. No problems there; I've got the plugin looking at the <PreferredMenuStyle> config setting to decide which one to load (even though it doesn't support the vertical one yet).

The bit that's tripping me up though is how to get NPVR to actually *use* SubMenu. The original instructions said to edit Global.xml and add <MenuType>SubMenu</MenuType> but is that still how to do it, because NPVR doesn't want to use it? It still adds a "SubMenu" entry to its own menu, and you can get into it that way, but I can't see how to make SubMenu the default menu?

Thanks

Iain
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#5
2011-03-12, 05:24 PM
I've attached an example vertical menu.

If you leave your menu skin file called menu\menu.xml, then your should still be able to set <MenuType> in global.xml and it'll load whatever plugin class you've named. If you'd renamed the skin file to horizonal.xml or vertical.xml, then it might have forced the use of the built in menu classes.
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#6
2011-03-12, 06:34 PM
sub Wrote:I've attached an example vertical menu.

If you leave your menu skin file called menu\menu.xml, then your should still be able to set <MenuType> in global.xml and it'll load whatever plugin class you've named. If you'd renamed the skin file to horizonal.xml or vertical.xml, then it might have forced the use of the built in menu classes.

Thanks sub, that should be a massive help!

Before today's fix-attempt, SubMenu was just looking for Menu.xml but was throwing an exception because it no longer exists in the default skin. I don't actually provide a skin for SubMenu; it's just supposed to use (and be compatible with) the existing one. Perhaps I need to rethink this strategy?

Iain
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#7
2011-03-12, 06:48 PM
Quote:Perhaps I need to rethink this strategy?
Yep, probably. I guess you could look at the default skin's horizontal.xml if you wanted.
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#8
2011-03-12, 06:59 PM
I'm not too fussed about the vertical side of things yet, I'm just trying to get it working horizontally (again), but I just can't get it to *be* the default main menu. NPVR is always using either AeonLike.cs (assuming it's still called that) or Vertical.cs depending on the choice made in settings.

Skin\Default\Menu contains Horizontal.xml and Vertical.xml (after a clean install).
Skin\Default\Global.xml is edited to contain <MenuType>SubMenu</MenuType>

Result: SubMenu appears on your menu rather than being the menu :confused:

Iain
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#9
2011-03-12, 07:06 PM
It's confusing because you're trying to do this with the default skin. It wasnt intended that developers would use custom menus with default skin.

As I mentioned above, your skin will need to be use the old menu\menu.xml name for the skin menu, not the new horizontal.xml/vertical.xml. If files with these these new names are found, then it uses the built in classes for using horizontal.xml/vertical.xml.
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#10
2011-03-12, 07:53 PM
Ah right, now I'm with you. Renaming horizontal.xml/vertical.xml to horizontal.xml.old/vertical.xml.old makes it work.

That's a lot of fiddly stuff for the user to do (along with editing global.xml too) so I'm going to have to make the plugin do some of this for them ideally.

Thanks for your help (and vertical.cs also).

Iain
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  <DrawText> vertical alignment support? McBainUK 5 2,772 2006-08-26, 11:24 PM
Last Post: sub
  TvGuide Skin Bug - Vertical Blending Digital712 8 3,145 2006-08-09, 08:51 PM
Last Post: Digital712

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

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

Linear Mode
Threaded Mode