SkinSetting for color? (1 Viewer)

mbuzina

Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    Why does the following produce an invisible control:
    XML:
    	<control Style="headerStyle">
    	  <id>0</id>
    	  <type>label</type>
    	  <description>Header label</description>
    	  <textcolor>#skin.color.highlight</textcolor>
    	  <posX>40</posX>
    	  <posY>10</posY>
    	  <label>#header.label</label>
    	</control>

    Having the following entry in SkinSettings.xml:
    Code:
    	<entry name="#skin.color.highlight">FFB75700</entry>

    P.S.: Font, width & height is defined in the headerStyle.
     
    Last edited:

    mbuzina

    Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    Thx.m I am trying to build a new Skin from the ground up instead of re-using another skin. This might result in me doing things a bit different and might discover a few bugs in skin engine. My idea is a very flexible skin using very smooth animation, which takes all its input from the SkinSettings (incl. BasicHome layout). I use the "skin script" very extensively at the moment - sometimes a little bit frustrating, but I like puzzles ;-)

    My only issue is, that I am by no way a gfx designer - basic drawing, OK, but more complicated things tend to go wrong.
     

    kiwijunglist

    Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    This will be useful, bc I'm always trying to do weird stuff and I never know if it's me making a mistake or there might be a bug/limitation of the skin engine :)
     

    mbuzina

    Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    OK, here is another one:
    I am trying to do some complicated mapping of SkinSettings:
    I have one setting: #BasicHome.Current.ID which contains the ID of the current main menu section (is set by the buttons on focus).
    I have 10 settings named: #BasicHome.Bx.Overlay.WW containing 0,1,2 or 3 (position of the Overlay).
    I am trying to define a label as follows:
    XML:
    <define>#BasicHome.Current.Overlay.WW:#(choose(#BasicHome.Current.ID,#BasicHome.B0.Overlay.WW,#BasicHome.B1.Overlay.WW,#BasicHome.B2.Overlay.WW,#BasicHome.B3.Overlay.WW,#BasicHome.B4.Overlay.WW,#BasicHome.B5.Overlay.WW,#BasicHome.B6.Overlay.WW,#BasicHome.B7.Overlay.WW,#BasicHome.B8.Overlay.WW,#BasicHome.B9.Overlay.WW))</define>

    When I show this in a label I get the error message: System.MissingMethodException: Member could not be found... (see screenshot). I will try this on MP 1.3 as well, but this is now on 1.4.

    Any ideas?

    P.S.: Does not work with 1.3 as well.
     
    Last edited:

    mbuzina

    Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    Yeah, found it: choose needs a reals int, so I need to do as follows:
    XML:
    <define>#BasicHome.Current.Overlay.WW:#(choose(cint(#BasicHome.Current.ID),#BasicHome.B0.Overlay.WW,#BasicHome.B1.Overlay.WW,#BasicHome.B2.Overlay.WW,#BasicHome.B3.Overlay.WW,#BasicHome.B4.Overlay.WW,#BasicHome.B5.Overlay.WW,#BasicHome.B6.Overlay.WW,#BasicHome.B7.Overlay.WW,#BasicHome.B8.Overlay.WW,#BasicHome.B9.Overlay.WW))</define>

    (I also had an issue with a wrong defined SkinSetting, only cost about 30 minutes searching :mad: )
     

    mbuzina

    Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    Now I am getting another strange issue (1.3), reusing a define in an expression goes wrong:
    XML:
    <define>#test:#(string.trim('2'))</define>
    	<controls>
    		<control Style="debugGroupStyle">
    			<description>Debug Controls</description>
    			<type>group</type>
    			<control Style="debugControlStyle">
    				<type>button</type>
    				<label>#test</label>
    			</control>
    			<control Style="debugControlStyle">
    				<type>button</type>
    				<label>#(choose(cint(#test),'Zero','One','Two'))</label>
    			</control>
    			<control Style="debugControlStyle">
    				<type>button</type>
    				<label>#(string.format('-{0}-',#test))</label>
    			</control>
    		</control>
    	</controls>

    This should result in
    2
    Two
    -2-

    But it results in:
    2
    Zero
    --

    What is happening here?
     

    mbuzina

    Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    Update: Making this a property with evaluateNow=false results in:
    2
    System.FormatException
    -#(string.trim('2'))-

    evaluateNow=True is
    Musik (Translation)
    Two
    -2-

    But I need late evaluation (my original contains other properties that change in time). This looks like a bug to me.
     

    mbuzina

    Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    Also great: You can not use a Boolean skin setting to switch visibility directly! I have a Boolean setting named:
    #skin.ShowTouchControls (true/false)
    and having
    XML:
    <visible>#skin.ShowTouchControls</visible>
    results in the control being visible always. Bug?

    Update: No Bug, you need to use skin.hassetting(#skin.ShowTouchControls) - which is a bit misleading for me as the skin has the setting, but it is set to false...
     
    Last edited:

    Users who are viewing this thread

    Top Bottom