[Help needed] How to load skin files dynamically (or change aspect ratio of Facade) (1 Viewer)

Anthrax

Portal Pro
February 15, 2007
157
48
pretty much in the center
Home Country
Germany Germany
Cheers fellow devs,

here's a new nut to crack:

Is there a way to load skin files dynamically while running the same window id?

Like simply doing: Load("myskin.facade.ar.portrait.xml"); whenever i want the facade items to display their thumbs in portrait asprect ratio?



The reason why I'm trying to achieve this:
The MyPlexMedia Plugin has to deal with album art (squares), pictures (landscape) and dvd covers (portrait) alike.
And because I'm trying to use as many common imports from the Default/Wide I stumbled across the problem of having to resort to a fixed aspect ratio since I can't (yet) change it in GuiFacadeControl programmatically...
(Just trying to apply the KISS priciple here!)

Anyone?


thanks in advance
Anthrax

PS: Truth be told: I suck at skinning and like to find an easier solution ;-)
 

mbuzina

Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    Re: [Help needed] How to load skin files dynamically (or change aspect ratio of Facad

    Is it possible to clip round corners when having keep aspect ratio ?
     

    Anthrax

    Portal Pro
    February 15, 2007
    157
    48
    pretty much in the center
    Home Country
    Germany Germany
    AW: Re: [Help needed] How to load skin files dynamically (or change aspect ratio of F

    Images have a keep aspect ratio setting
    (Image - MediaPortal Wiki)
    so you can keep the image in the right aspect ratio

    Thanks jameson_uk for your reply,

    the thing is I'm trying to preserve as much of the original Default/Wide skin files and was trying to find a way to use the three main facades (images, videos, music) according to the selected media types within the sections of the Plex server.

    Basically it boils down to this:

    when browsing the plex music collection I'd like to use (import) the common.facade.music.xml and do the same for the other collections accordingly.

    And all that without going through the trouble of having to use three seperate GUIWindow instances...


    Can anyone else share any light on this issue?

    thank you all very much in advance
    Anthrax
     

    Anthrax

    Portal Pro
    February 15, 2007
    157
    48
    pretty much in the center
    Home Country
    Germany Germany
    AW: [Help needed] How to load skin files dynamically (or change aspect ratio of Facad

    Me again,

    would this work?:

    Code:
    <control>
              <id>1111111</id>
              <description>use import for square images like album art</description>          
              <visible>a condition set in the code</visible>
              <import>common.facade.music.xml</import>
    </control>
    <control>
              <id>1111112</id>
              <description>use import for portrait a/r items like DVD covers</description>          
              <visible>a condition set in the code</visible>
              <import>common.facade.video.title.xml</import>
    </control>
    <control>
              <id>1111113</id>
              <description>use import for landscape a/r items like episode images</description>          
              <visible>a condition set in the code</visible>
              <import>common.facade.pictures.xml</import>
    </control>

    I'm not having too much time on my hands for this atm, so a simple yes/no answer would save me the trial and error time...

    thx
    Anthrax
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    AW: [Help needed] How to load skin files dynamically (or change aspect ratio of Facad

    No. Import has to be done on the toplevel and has no condition. If you really need different facade styles, you also need different facades with each one a different ID, and you plugin code would have to fill the correct facade and hide/show it. This can't be done with imports, as all those facades have the same id. You need a copy of them and each with a new id.
    PS: I'd focus on MP2 for more flexible skinning :)
     

    Anthrax

    Portal Pro
    February 15, 2007
    157
    48
    pretty much in the center
    Home Country
    Germany Germany
    AW: [Help needed] How to load skin files dynamically (or change aspect ratio of Facad

    Well offbyone,

    this sounds like a definite answer from a pro.
    Thank you very much you saved me from a miserable trial&error session.

    I'll use seperate xmls then.
    If I find something else on the way I'll share the info with you within this thread.

    bye
    Anthrax

    PS: very nice community around here... fast, friendly & helpful no other forum like this anywhere else that I know of. Period.
     

    Scrounger

    Retired Team Member
  • Premium Supporter
  • January 21, 2009
    1,032
    514
    Stuttgart
    Home Country
    Germany Germany
    AW: [Help needed] How to load skin files dynamically (or change aspect ratio of Facad

    No. Import has to be done on the toplevel and has no condition. If you really need different facade styles, you also need different facades with each one a different ID, and you plugin code would have to fill the correct facade and hide/show it. This can't be done with imports, as all those facades have the same id. You need a copy of them and each with a new id.
    PS: I'd focus on MP2 for more flexible skinning :)

    I have tested this. And it works. But now i have a problem to set focus / control focus by remote:
    I use the standard HiddenMenu and one facadecontrol with id 50 and another one with id 51. Condition which facaedcontrol to show is set by the code, like you descirped. For the HiddenMenu (Actiongroup) i set the <onexit>50</onexit>.

    But if i loaded the facadecontrol with id 51 (different layouts), switching the focus doesnt work correctly.

    Anyone has an idea to solve this problem?

    I've found a solution, implement a button and using the gefocus event of this to set focus to the right facadecontrol by code. But thats not very nice, esspecially for the skin devs.
     
    Last edited:

    Users who are viewing this thread

    Top Bottom