If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Learning To Skining First problem

spawn5mspawn5m Posts: 21Members ✭✭
edited August 2014 in PHT Skin Development
hi everyone.
I'm learning to skinning and i have my first problem, i don't understand this behavior:
I create a background for my label and the label himself all two with the same dimension and position, if align the label to left i have what i aspect, instead if align the label to center i have a strange behavior and the label is not in the center of background image.
Attach some photos to better explain.
 
Align Left Result
left.png
 
Align Center Result
center.png
 
My Code
I post all Wraplist quote but the label and background is in FocusLayout line 543
    <control type="Wraplist" id="11001" description="OnDeck">
      <animation effect="slide" start="0,0" end="0,162" time="0" condition="Control.IsVisible(11000)">Conditional</animation>
      <include>VisibleFadeEffectDelayShelf</include>
      <posx>600</posx>
      <posy>378</posy>
      <width>1368</width>
      <height>358</height>
      <onleft>300</onleft>
      <onback>300</onback>
      <movement>4</movement>
      <preloaditems>4</preloaditems>
      <orientation>horizontal</orientation>
      <focusposition>0</focusposition>
      <onright>11001</onright>
      <onleft>300</onleft>
      <onup condition="Control.IsVisible(11000)">11000</onup>
      <onup condition="!Control.IsVisible(11000)">300</onup>
      <ondown>300</ondown>
      <onback>300</onback>
      
      <itemlayout height="358" width="253">
        <control type="group" description="movie">
          <visible>ListItem.Type(movie)</visible>
          
          <control type="image" >
            <posx>21</posx>
            <posy>21</posy>
            <width>189</width>
            <height>285</height>
            <bordersize>-12</bordersize>
	    <bordersize>-14</bordersize>
    	    <texture>thumbs/PosterBG_NF.png</texture>          
          </control>
          
          <control type="image">
            <posx>21</posx>
            <posy>21</posy>
            <width>189</width>
            <height>285</height>
	    <texture background="true" diffuse="thumbs/PosterDiffuse.png">$INFO[ListItem.Art(thumb)]</texture>
	    <aspectratio aligny="top" scalediffuse="false">scale</aspectratio>          
	  </control>
          
          <control type="image">
            <posx>177</posx>
            <posy>273</posy>
            <width>33</width>
            <height>33</height>
            <texture>OverlayInProgress.png</texture>
          </control>
         
        </control>
        <control type="group" description="episodes">
          <visible>ListItem.Type(episode) | ListItem.Type(season)</visible>
           <control type="image">
            <posx>0</posx>
            <posy>0</posy>
            <width>208</width>
            <height>303</height>
	    <aspectratio>scale</aspectratio>
	    <texture>Mu_Home/Mu_Poster_BG.png</texture>          
	  </control>
		  
          <control type="image">
            <posx>4</posx>
            <posy>4</posy>
            <width>200</width>
            <height>295</height>
            <texture background="true">$INFO[ListItem.GrandparentThumb]</texture>
            <aspectratio aligny="top" scalediffuse="false">scale</aspectratio>
          </control>
          
          <control type="group">           
           <control type="image">
            <posx>4</posx>
            <posy>230</posy>
            <width>200</width>
            <height>70</height>
	    <aspectratio>scale</aspectratio>
	    <texture>Mu_Home/Mu_Label_BG.png</texture>          
	   </control>
		   
	   <control type="label">
              <posx>4</posx>
              <posy>230</posy>
              <width>200</width>
              <height>70</height>
              <font>Mu_Poster_TXT</font>
              <align>left</align>
              <textcolor>White</textcolor>
              <label>$LOCALIZE[31973]$INFO[ListItem.Season] $LOCALIZE[31977]$INFO[ListItem.Episode]</label>
            </control>
          </control>
        </control>
      </itemlayout>
      
      <focusedlayout height="358" width="253">
        <control type="group" description="movie">
          <visible>ListItem.Type(movie)</visible>
          <control type="image">
            <posx>21</posx>
            <posy>21</posy>
            <width>189</width>
            <height>285</height>
            <bordersize>-12</bordersize>
            <include>PosterThumbFO</include>
          </control>
          <control type="image">
            <posx>21</posx>
            <posy>21</posy>
            <width>189</width>
            <height>285</height>
            <include>PosterThumb</include>
          </control>
          <control type="image">
            <posx>177</posx>
            <posy>273</posy>
            <width>33</width>
            <height>33</height>
            <texture>OverlayInProgress.png</texture>
          </control>
        </control>
        <control type="group" description="episodes">
          <visible>ListItem.Type(episode) | ListItem.Type(season)</visible>  
           <control type="image">
            <posx>25</posx>
            <posy>0</posy>
            <width>253</width>
            <height>358</height>
	    <aspectratio>scale</aspectratio>
	   <texture>Mu_Home/Mu_Poster_BG.png</texture>          
	  </control>
		  
          <control type="image">
            <posx>29</posx>
            <posy>4</posy>
            <width>245</width>
            <height>350</height>
            <texture background="true">$INFO[ListItem.GrandparentThumb]</texture>
            <aspectratio aligny="top" scalediffuse="false">scale</aspectratio>
          </control>
          
          <control type="group" description="Label">
           <posx>29</posx>
	   <posy>239</posy>
           <control type="image">
           <width>245</width>
           <height>115</height>
	   <aspectratio>stretch</aspectratio>
   	   <texture>Mu_Home/Mu_Label_BG.png</texture>          
          </control>
		   
	  <control type="label">
            <width>245</width>
            <height>115</height>
            <font>Mu_Poster_TXT</font>
            <align>left</align>
            <aligny>center</aligny>
            <textcolor>White</textcolor>
            <label>$LOCALIZE[31973]$INFO[ListItem.Season] $LOCALIZE[31977]$INFO[ListItem.Episode]</label>
           </control>
          
          </control>
        
        </control>
      </focusedlayout>
    </control>
 
Anyone can explain where i'm wrong?
 
Thank a lot and sorry for bad English.
Make everything as simple as possible but not simpler.
- Albert Einstein -

Comments

  • HakulakuHakulaku Posts: 23Members, Plex Pass Plex Pass

    Hi,

    It is because of your fixed position of label. When you use left align it will start left from that position. Using center it will center on that fixed position (e.g. 4 characters will give you 2 characters left and 2 characters right from the fixed position.). I would suggest you to make use of an cell in the code, this will allow you to align it correctly.

Sign In or Register to comment.