NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 28 29 30 31 32 … 93 Next »
GBPVRX2.Popups.PopupBase - GetBackgroundArgs()

 
  • 0 Vote(s) - 0 Average
GBPVRX2.Popups.PopupBase - GetBackgroundArgs()
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#1
2008-10-30, 07:42 AM
Not sure if you'll get time to answer this.

But I have a class that has GBPVRX2.Popups.PopupBase as it's superclass.

The skin contains the following:
Code:
<CompositeImage name="PopupBackground" size="50,50">
  <DrawRoundedRect loc="2,2" size="96,96" fillColor="PopupBackground" borderColor="PopupBorder" radius="@PopupCornerRadius" borderWidth="@PopupBorderWidth"/>
  <DrawText text="Select Option" loc="0,5" size="100,20" textStyle="GeneralTextStyle" align="Center"/>
  <DrawText text="@updateMessage" loc="30,50" size="70,20" textStyle="GeneralTextStyle" align="Left"/>
</CompositeImage>

In GetRenderList I call
Code:
System.Collections.Hashtable args = this.getBackgroundArgs();

hoping that it will return a HashTable with "@updateMessage" in it.

It this how it should work?
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#2
2008-10-30, 08:33 AM (This post was last modified: 2008-10-30, 08:37 AM by whurlston.)
Put an override in the class:

Code:
protected override Hashtable getBackgroundArgs()
        {
            Hashtable args = new Hashtable();
            args["@updateMessage"] = "Fill in message";
            return args;
        }

If you want to change it after the initial render, it should be in a separate composite image and should be manipulated in getPostBackgroundRenderList(). At least that's how I do it.
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#3
2008-10-30, 08:35 AM
So how do those args populate the compositeimage though?
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#4
2008-10-30, 08:38 AM
hmm, ok, it just works...

Not sure how, sub must call Getbackground args and use it to populate the image..
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#5
2008-10-30, 08:47 AM
I have a separate composite image defined:
Code:
        <CompositeImage name="RunTime" size="20,6">
            <DrawText text="@runtime" loc="0,0" size="100,100" textStyle="GeneralTextStyle" align="left" valign="middle"/>
        </CompositeImage>

And in my popup class I have the following:

Code:
private UiStatic RunTimeUi;

        private void BuildRunTimeUi()
        {
            Hashtable rtHash = new Hashtable();
            rtHash.Add("@runtime", "My RunTime text.");
            if (RunTimeUi == null) RunTimeUi = new UiStatic(skinHelper2, "RunTime", rtHash);
            else RunTimeUi.SetArgs(rtHash);
        }

        protected override ArrayList getPostBackgroundRenderList()
        {
            
            ArrayList renderList = new ArrayList();
            BuildRunTimeUi();
            renderList.AddRange(RunTimeUi.GetRenderList());
            return renderList;
        }

Code is truncated to relevant parts of course.
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#6
2008-10-30, 08:49 AM
psycik Wrote:hmm, ok, it just works...

Not sure how, sub must call Getbackground args and use it to populate the image..
hmm... you mean I do stuff the hard way? Who would have thought that? Rolleyes I should really learn how to code one day and simplify my life Big Grin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Closing Deactivating popups with handlePopupCallback psycik 4 1,593 2008-12-09, 08:38 AM
Last Post: psycik
  GBPVRX2.Popups.PopupBase don't close on button press psycik 2 1,432 2008-11-03, 07:35 AM
Last Post: psycik
  GBPVRX2.Popups.PopupBase - exited, still triggering callbacks psycik 6 2,257 2008-09-30, 11:50 PM
Last Post: psycik
  Custom popups? bgowland 2 1,760 2008-05-11, 12:26 AM
Last Post: bgowland
  Horizontal buttons in popups. whurlston 6 2,257 2008-03-30, 12:19 PM
Last Post: roy
  Memory management - controls and popups JavaWiz 2 1,899 2008-01-06, 02:48 AM
Last Post: JavaWiz
  'Please wait...' type popups? bgowland 8 2,962 2007-10-26, 02:14 PM
Last Post: bgowland
  GBPVRX2.dll skate15e 3 1,884 2007-09-26, 08:25 AM
Last Post: skate15e

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

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

Linear Mode
Threaded Mode