NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 32 33 34 35 36 … 93 Next »
How to use Icon view?

 
  • 0 Vote(s) - 0 Average
How to use Icon view?
bgowland
Offline

Posting Freak

West Yorkshire, UK
Posts: 4,583
Threads: 384
Joined: Dec 2004
#1
2008-04-24, 12:38 AM
Can someone point me at some example code for using UiList.ViewMode.MODE_ICON please? How to set the image and accompanying text, skin requirements etc.

I think I got the skin side of things OK but not sure what I should be doing with the image and accompanying text. I currently just get my button list without any icons.

Cheers,
Brian
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#2
2008-04-24, 12:49 AM
Code:
        <CompositeImage name="IconViewNormalItem" size="17,24">
            <DrawCommonImage name="IconViewNormalItemBackground"/>
            <DrawImage filename="@thumbnail" loc="5,5" size="90,70"/>
            <DrawText text="@fileName" loc="0,75" size="100,23" textStyle="IconViewItems" align="Center" valign="Center"/>
        </CompositeImage>
If you have icon view items like this, when you add your items to the list, you can set @thumbnail to an Image object loaded with Image.FromFile(), and the @fileName to a string.

UiList.Item item = new UiList.Item();
item.AddProperty("@name", Image.FromFile(filename));
item.AddProperty("@fileName", "some file name.mp3");
bgowland
Offline

Posting Freak

West Yorkshire, UK
Posts: 4,583
Threads: 384
Joined: Dec 2004
#3
2008-04-24, 01:14 AM
Thanks - it was my skin.xml after all. I'd copied the IconView sections from the MusicLibrary skin.xml so as with your example, DrawText was expecting "@filename" - I was simply using "@name" in my code.

Everything is in line now and I now have a brightly filled screen of icons. Smile

Cheers,
Brian
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Skin - view further into the future, scale the guide Vitenka 5 3,228 2014-11-26, 07:28 PM
Last Post: Vitenka
  high res (256x256+) npvr icon? reven 15 5,771 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