NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 41 42 43 44 45 … 93 Next »
BaseButtonUiListTask - Extra elements

 
  • 0 Vote(s) - 0 Average
BaseButtonUiListTask - Extra elements
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#1
2007-08-18, 05:05 AM
me again.

If I wanted a filled in rectangle at the bottom of every list item, do you think I could do this with the default UI classes, or for that will I need to get in to drawing all the list elements my self?

This is the effect I'm going for - the lines underneth the title which show the progress through the recording.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,671
Threads: 767
Joined: Nov 2003
#2
2007-08-18, 05:52 AM
psycik Wrote:If I wanted a filled in rectangle at the bottom of every list item, do you think I could do this with the default UI classes, or for that will I need to get in to drawing all the list elements my self?
You could do it with the built in stuff.

Make your class also implement the SkinHelper2.GetImagaCallback interface. ie ...

[COLOR=#2b91af]
Code:
[/COLOR][/SIZE][SIZE=2]public Image GetImage([/SIZE][SIZE=2][COLOR=#2b91af]Hashtable[/COLOR][/SIZE][SIZE=2] parameters, [/SIZE][SIZE=2][COLOR=#0000ff]string[/COLOR][/SIZE][SIZE=2] name, [/SIZE][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][SIZE=2] width, [/SIZE][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][SIZE=2] height)[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2]       ... allocate and draw an image of the specified size with percentage of the width being used for a bar graph[/SIZE]
       return image
[SIZE=2]}


The when you populating your UiList.Item objects, add the call back...

Code:
[/SIZE]
[SIZE=2]UiList.Item item = new UiList.Item();[/SIZE]
item.AddProperty("@recordingName", readableName);
[b]item.AddProperty("@percentageGraph", this);[/b]
itemList.Add(item)
[SIZE=2]

Then in the skin file composite images for each of the list elements, add a <DrawImage filename="@percentageGraph".../>. When this list item is drawn, the callback will be called for you to draw the custom graph.

If you need a bit more to go on, let me know.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,671
Threads: 767
Joined: Nov 2003
#3
2007-08-18, 05:54 AM
Bet you thought I was going to tell you that you'd need to draw it all yourself? Big Grin
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#4
2007-08-18, 06:03 AM
Yeah I did Big Grin

Or I could just go to the wishlist forum Big Grin and ask you for it!!

So if I get the code working do you want it??
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,671
Threads: 767
Joined: Nov 2003
#5
2007-08-18, 06:06 AM
I know the method I described above works fine. I do it in lots of places. For photo library etc, though my primary reason was performance, since this call only happens when a item is about to be displayed - instead of having to load images for every file prior to populating the list. Using this method allowed me only load the images for those that are on the screen.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Extra overriding #EXT-X-KEY wishlist mvallevand 4 377 2025-01-08, 05:56 PM
Last Post: sub
  Extra Events jcole998 1 1,447 2021-03-08, 02:48 PM
Last Post: mvallevand
  List of Skin Elements ACTCMS 7 3,096 2010-12-22, 12:06 AM
Last Post: ACTCMS
  List control skin elements McBainUK 1 1,723 2010-09-01, 06:17 AM
Last Post: sub
  Positioning of elements in skins (...and some other questions) ShiningDragon 13 4,291 2010-07-22, 06:42 PM
Last Post: ShiningDragon
  Plugins and MVP / PCH - are there extra requirements? Ommina 43 13,022 2009-12-09, 02:28 AM
Last Post: mvallevand
  Preventing 'layered' elements? bgowland 3 1,708 2008-05-10, 07:33 PM
Last Post: bgowland
  GBPVR UI Elements pop-up boohiss 5 2,300 2006-08-19, 04:11 AM
Last Post: boohiss
  GBPVR UI Elements lists boohiss 4 2,262 2006-08-07, 01:07 PM
Last Post: boohiss
  gbpvr ui elements dll McBainUK 1 1,418 2006-01-09, 09:57 PM
Last Post: McBainUK

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

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

Linear Mode
Threaded Mode