Multiple screens in a plugin (1 Viewer)

egonspengleruk

Retired Team Member
  • Premium Supporter
  • June 30, 2005
    250
    0
    Hi all,

    How do I go about adding multiple main screens to a plugin? e.g. the user click on a Mode button and the entire screen changes. Like the Playlist button in MyVideos. I see how its been done there, but I want to keep all of my code self contained and dont want to have to modify other MP code files as its not easy to release that way.
    Its for an upgrade for the Stocks plugin by the way.

    Egon
     

    samuel337

    Portal Pro
    August 25, 2004
    772
    0
    Melbourne, Australia
    Um... I don't get what you're wanting to do.

    If you want to add more screens to the plugin, just code the new screens, then use the ActivateWindow method to change the current screen to the new screen.

    Why do you need to edit other MP code files?

    Or, do you want to add new screens to the Stocks plugin without editing the existing stocks plugin code...

    Sam
     

    egonspengleruk

    Retired Team Member
  • Premium Supporter
  • June 30, 2005
    250
    0
    samuel337 said:
    Um... I don't get what you're wanting to do.

    If you want to add more screens to the plugin, just code the new screens, then use the ActivateWindow method to change the current screen to the new screen.

    Why do you need to edit other MP code files?

    Or, do you want to add new screens to the Stocks plugin without editing the existing stocks plugin code...

    Sam

    Thanks for the quick reply.
    My issue is that I dont fully understand how all the skinning stuff works. My C# is pretty good.....just not to clear on MP specific stuff.

    If I have a new window then I need a new Skin.xml file....but how do I load it? At the minute I just have the below.

    public override bool Init()
    {
    return Load(GUIGraphicsContext.Skin+@"\mystocks.xml");
    }

    Would it be a new class that I create? And hence a new Init function for that class?

    Mat
     

    BigCheese

    Portal Pro
    January 13, 2006
    57
    0
    Germany
    Hi,
    any update here?
    I think i will run into the same problem - so is there any solution or description how to do this?

    and: screentransitions would be very nice - is there a way to get some (like e.g. the apple ipod - on selecting a item, whole page scrolls from rigth to left and so the content is changed) :)

    bye,
    BigCheese
     

    samuel337

    Portal Pro
    August 25, 2004
    772
    0
    Melbourne, Australia
    The above is basically it.

    Basically, just copy your existing screen class into a new class, give it a new WindowID, change the path of its skin xml file, and in your previous screen, use the ActivateWindow function to activate the new window using its WindowID.

    Sam
     

    egonspengleruk

    Retired Team Member
  • Premium Supporter
  • June 30, 2005
    250
    0
    BigCheese said:
    Hi,
    any update here?
    I think i will run into the same problem - so is there any solution or description how to do this?

    and: screentransitions would be very nice - is there a way to get some (like e.g. the apple ipod - on selecting a item, whole page scrolls from rigth to left and so the content is changed) :)

    bye,
    BigCheese

    Have a look at my Stocks/Shares plugin. Joey70 tweaked my code so that I can have multiple screens....its a bit of a fudge but it works brilliantly.

    Egon
     

    BigCheese

    Portal Pro
    January 13, 2006
    57
    0
    Germany
    thanks - today i have tried it, and it works... i have the whole parsing stuff of my plugin in the first page and fill up the list in the second page...
    really easy (because i have found it out too ;)

    bye,
    BigCheese
     

    Users who are viewing this thread

    Top Bottom