Stuck on a simple problem | XML editing

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Addam1125 Offline
Junior Member
Posts: 11
Joined: Oct 2011
Reputation: 0
Post: #1
*Sorry for having a double post here. Mod moved this from skin development

I'm a bit stuck, can anyone help?

[Image: sToxV.png]

That's supposed to say 'Trailers' but it's cut off on the left.

Code:
<!--MOVIES -->    <control type="list" id="9011">
                    <posx>420</posx>
                    <posy>30</posy>
                    <width>1380</width>
                    <height>465</height>
                    <orientation>horizontal</orientation>
                    <onleft>9011</onleft>
                    <onright>9011</onright>
                    <focusposition>2</focusposition>
                    <scrolltime>200</scrolltime>
                    <preloaditems>2</preloaditems>
                    <onup></onup>
                    <ondown>301</ondown>
                    <itemgap>0</itemgap>
                    <visible>Container(301).HasFocus(3)</visible>
                    <itemlayout width="320" height="245">
                        <control type="group">    
                            <posx>20</posx>
                            <posy>-5</posy>
                                <control type="label"><!--Movie title-->
                                    <width>320</width>
                                    <height>56</height>
                                    <label>$INFO[ListItem.Label]</label>
                                    <align>center</align>
                                    <font>Font_Bartowski_Main_SubMenu</font>
                                    <textcolor>grey3</textcolor>
                                </control>
                        </control>
                    </itemlayout>
                    <focusedlayout width="320" height="515">
                        <control type="group">    
                            <posx>20</posx>
                            <posy>-5</posy>
                                <control type="label"><!--Movie title-->
                                    <width>320</width>
                                    <height>56</height>
                                    <label>$INFO[ListItem.Label]</label>
                                    <align>center</align>
                                    <font>Font_Bartowski_Main_SubMenu</font>
                                    <textcolor>mainblue</textcolor>
                                </control>
                        </control>
                    </focusedlayout>
                        <content>
                            <item id="1">
                                <label>$INFO[Skin.String(Menu_Custom11_Label)]</label>
                                <onclick>$INFO[Skin.String(Menu_Custom11_Path)]</onclick>
                                <visible>Skin.HasSetting(Menu_Custom11)</visible>
                            </item>
                            <item id="2">
                                <label>$INFO[Skin.String(Menu_Custom12_Label)]</label>
                                <onclick>XBMC.ActivateWindow(10025,$INFO[Skin.String(Menu_Custom12_Path)],return)</onclick>
                                <visible>Skin.HasSetting(Menu_Custom12)</visible>
                            </item>
                            <item id="9">
                                <label>Newly Added</label>
                                <onclick>ActivateWindow(VideoLibrary,RecentlyAddedMovies,return)</onclick>
                            </item>
                            <item id="10">
                                <label>20389</label>
                                <onclick>ActivateWindow(VideoLibrary,MusicVideoTitles,return)</onclick>
                                <visible>Library.HasContent(MusicVideos)</visible>
                            </item>
                        </content>
                </control>
(This post was last modified: 2011-10-04 20:50 by Addam1125.)
find quote
`Black Offline
Team-Kodi Member
Posts: 2,433
Joined: Apr 2009
Reputation: 72
Location: Germany
Post: #2
This is because inside a container the label gets centered at it's x position (not posx + width/2 as anywhere else) so you have to add half of the labels width.

[Image: xp1080-21.png]
find quote
Addam1125 Offline
Junior Member
Posts: 11
Joined: Oct 2011
Reputation: 0
Post: #3
`Black Wrote:This is because inside a container the label gets centered at it's x position (not posx + width/2 as anywhere else) so you have to add half of the labels width.

Forgive my ignorance, but could you point out to me which width value represents the container that I'm trying to adjust?
find quote
`Black Offline
Team-Kodi Member
Posts: 2,433
Joined: Apr 2009
Reputation: 72
Location: Germany
Post: #4
Add <posx>160</posx> to both label controls.

[Image: xp1080-21.png]
find quote
Addam1125 Offline
Junior Member
Posts: 11
Joined: Oct 2011
Reputation: 0
Post: #5
Code:
<control type="group">    
            <posx>20</posx>
            <posy>-5</posy>
                <control type="label"><!--Movie title-->
                    [b]<posx>160</posx>[/b]
                    <width>320</width>
                    <height>56</height>
                    <label>$INFO[ListItem.Label]</label>
                    <align>center</align>
                    <font>Font_Bartowski_Main_SubMenu</font>
                    <textcolor>grey3</textcolor>
</control>
        </control>
    </itemlayout>
    <focusedlayout width="320" height="515">
        <control type="group">    
            <posx>20</posx>
            <posy>-5</posy>
                <control type="label"><!--Movie title-->
                    [b]<posx>160</posx>[/b]
                    <width>320</width>
                    <height>56</height>
                    <label>$INFO[ListItem.Label]</label>
                    <align>center</align>
                    <font>Font_Bartowski_Main_SubMenu</font>
                    <textcolor>mainblue</textcolor>
                </control>
        </control>

This caused no noticeable change to the UI.

Am I retarded?
find quote