NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 22 23 24 25 26 … 93 Next »
Interface BaseButtonListUiTask, but more...

 
  • 0 Vote(s) - 0 Average
Interface BaseButtonListUiTask, but more...
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#11
2007-10-14, 05:25 PM
sub Wrote:Just to add further info, I use a differnet approach to solving the problem whurlston describes. Instead of downloading the images from the external site while constructing the list I set the image parameter to "this" and implement the UiList.GetImage() call back. This method is then called to delay loaded these images. They only requested when they're made visible for the first time.
Good to know. I was building separate array lists so that I could keep the new releases and top 100 and not have to reload the images. I will definitely look into UiList.GetImage()

There are probably a lot of changes like this that I could make to my code. Smile
sjbirk
Offline

Member

Posts: 65
Threads: 14
Joined: Jan 2005
#12
2007-10-14, 06:49 PM
setPopup()

whurlston, i used your setPopup() suggestion and i am having an issue; the spawn the thread to build the list after setting the popup value. the issue occurs when the thread is complete, it does not kill the popup window on its own even though i have setPopup(null); at the end of the method called within the thread. i have to press a key and the popup window clears, and my new list appears. have you ever encountered this?
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,522
Threads: 141
Joined: Dec 2006
#13
2007-10-14, 06:51 PM
sjbirk Wrote:setPopup()

whurlston, i used your setPopup() suggestion and i am having an issue; the spawn the thread to build the list after setting the popup value. the issue occurs when the thread is complete, it does not kill the popup window on its own even though i have setPopup(null); at the end of the method called within the thread. i have to press a key and the popup window clears, and my new list appears. have you ever encountered this?
You probably need to tell the main thread to render.
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#14
2007-10-15, 12:11 AM
I haven't seen that issue yet but I have not tested it quite thoroughly yet.
sjbirk
Offline

Member

Posts: 65
Threads: 14
Joined: Jan 2005
#15
2007-11-12, 09:25 PM
JavaWiz Wrote:You probably need to tell the main thread to render.

what is the best way to have the main thread re-render?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#16
2007-11-12, 09:54 PM
If you plugin is active, then needsRendering() will be called regularly from the main thread. If you return true, then main thread will then call GetRenderList().
McBainUK
Offline

Posting Freak

Posts: 4,711
Threads: 429
Joined: Sep 2005
#17
2009-03-26, 10:18 AM
sub Wrote:Is your problem because you're loading images from disk for putting in the list? If so, you can look into the UiList.GetImage() call back which allows these images to be delay loaded until they actually need to be displayed on the screen.
Can anyone post a code example of how to use this from a BaseButtonListUiTask based plugin? I can't even find the GetImage callback anywhere!
Wiki profile
My Projects
Programs Plugin [SIZE=2](retired)
| Volume OSD Plugin (retired) | Documentation Wiki (retired)
[/SIZE]
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#18
2009-03-26, 04:41 PM
I dont have a sample for you, but the basic idea is that your class needs to implement the "SkinHelper2.GetImageCallback" interface:

Code:
public class VideoLibraryTask : BaseButtonListUiTask, SkinHelper2.GetImageCallback
{
...

  public Image GetImage(Hashtable parameters, string name, int width, int height)
  {
...
  }
}

Then when you're adding your items to the list, you can add a parameter that is used for the callback:
Code:
UiList.Item item = new UiList.Item();
                    item.AddProperty("@name", readableName);
                    item.AddProperty("@fileName", readableName);
                    item.AddProperty("@path", currentDirectory + "\\" + readableName);
                    item.AddProperty("@thumbnail", this); // callback to get thumbnail image

In the skin files, if you tell it to draw "@thumbnail" it'll then call the GetImage() method on your class, passing in the hashmap of parameters it was associated with. In the GetImage() method you could then do stuff like get the "@path" variable from the parameters, load an image file, resize it etc, then return your image. You can also do more sophisticated stuff in that callback, like correcting the aspect ratio, or dynamically generating a graphic etc.
McBainUK
Offline

Posting Freak

Posts: 4,711
Threads: 429
Joined: Sep 2005
#19
2009-03-30, 12:33 PM
Thanks sub. No example needed, that's more than enough info to go on.

Are the any docs/forum posts/general guidance on the ISettings interface?
Wiki profile
My Projects
Programs Plugin [SIZE=2](retired)
| Volume OSD Plugin (retired) | Documentation Wiki (retired)
[/SIZE]
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#20
2009-03-30, 05:13 PM
McBainUK Wrote:Are the any docs/forum posts/general guidance on the ISettings interface?
Its not really used at this stage, so not worth implementing it in a plugin.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (3): « Previous 1 2 3 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Plugins and interface questions from a C# rookie mvallevand 11 4,214 2008-08-26, 03:20 PM
Last Post: McBainUK
  Any chance to add a second list to BaseButtonListUiTask ? lupus11 9 2,591 2008-01-02, 09:07 PM
Last Post: lupus11
  v1.x BaseButtonListUiTask plugin/skin question DronnyBoyd 20 5,632 2007-09-18, 11:44 AM
Last Post: sub
  TaskImages in BaseButtonListUiTask McBainUK 2 1,548 2007-09-12, 11:17 AM
Last Post: McBainUK
  Developer API or Web Interface question jdonth 2 1,571 2007-07-15, 02:18 PM
Last Post: jdonth
  Recordings made via the Web Admin interface are at the wrong resolution! mmatheny 9 3,126 2006-08-04, 06:34 PM
Last Post: HtV
  Drawing an interface boohiss 2 1,874 2006-07-31, 08:20 PM
Last Post: boohiss
  Interface to allow a plugin to show itself over the top of a playing video McBainUK 3 1,914 2006-02-22, 11:07 PM
Last Post: McBainUK
  GBPVRUIElements - skinnable user interface widget libary McBainUK 14 4,840 2006-02-15, 10:12 AM
Last Post: dottore
  Web Interface and IIS paulcaley 7 3,279 2004-11-12, 06:26 PM
Last Post: Huw

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

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

Linear Mode
Threaded Mode