Syntax Help

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Hitcher Offline
Skilled Skinner
Posts: 9,915
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Post: #11
Is this what you're after?

Code:
<window id="0">
<defaultcontrol always="true">300</defaultcontrol>
<allowoverlay>yes</allowoverlay>

<controls>
<control type="largeimage">
<description>BackgroundImage</description>
<posx>0</posx>
<posy>0</posy>
<width>1920</width>
<height>1080</height>
<visible>true</visible>
<texture background="true">$INFO[Container(300).ListItem.Icon]</texture>
<fadetime>150</fadetime>
<animation effect="fade" time="200">WindowOpen</animation>
<aspectratio>keep</aspectratio>
</control>

<control type="wraplist" id="300">
<description>HomeMenu</description>
<posx>0</posx>
<posy>730</posy>
<width>1920</width>
<height>350</height>
<onup>300</onup>
<ondown>300</ondown>
<onleft>300</onleft>
<onright>300</onright>
<focusposition>3</focusposition>
<scrolltime>150</scrolltime>
<animation effect="fade" start="0" end="50" time="300">WindowOpen</animation>

<itemlayout width="1920" height="65">
<control type="label">
<posx>10</posx>
<height>65</height>
<width>1920</width>
<font>MenuSmall</font>
<info>ListItem.Label</info>
<align>left</align>
<animation effect="fade" start="50" end="50" time="0" condition="true">Conditional</animation>
</control>
</itemlayout>

<focusedlayout width="1920" height="96">
<control type="label">
<posx>20</posx>
<width>1920</width>
<height>96</height>
<info>ListItem.Label</info>
<font>MenuBig</font>
<align>left</align>
<animation effect="fade" start="50" end="100" time="200">Focus</animation>
</control>
</focusedlayout>

<content>
<item id="1">
<description>Movies</description>
<label>Movies</label>
<icon>Movies.jpg</icon>
<onclick>ActivateWindow(Video,movietitles)</onclick>
<visible>Library.HasContent(Movies)</visible>
</item>
<item id="2">
<description>TV Shows</description>
<label>TV Shows</label>
<icon>TV Shows.png</icon>
<onclick>ActivateWindow(Video,tvshowtitles)</onclick>
</item>
<item id="3">
<description>Music</description>
<label>Music</label>
<icon>Music.jpg</icon>
<onclick>ActivateWindow(Music)</onclick>
</item>
<item id="4">
<description>Pictures</description>
<label>Pictures</label>
<icon>Pictures.png</icon>
<onclick>ActivateWindow(Pictures)</onclick>
</item>
<item id="5">
<description>Games</description>
<label>Games</label>
<icon>Games.png</icon>
<onclick>ActivateWindow(Programs,Addons)</onclick>
</item>
</content>
</control>
</controls>
</window>

[Image: sig_zps3af3b48e.jpg]
find quote
Avatarass Offline
Junior Member
Posts: 27
Joined: Apr 2012
Reputation: 0
Post: #12
Yep, that seemed to solve the problem. What exactly does "condition="true"" check to activate the animation?
find quote
Hitcher Offline
Skilled Skinner
Posts: 9,915
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Post: #13
Just means it's always on. Probably easier to just change the colour and make it 50% transparent.

[Image: sig_zps3af3b48e.jpg]
find quote
Avatarass Offline
Junior Member
Posts: 27
Joined: Apr 2012
Reputation: 0
Post: #14
Ok, thanks dude. I will continue on with some more advanced stuff now.

I would give you +2 rep but I cant find the button.
find quote
Avatarass Offline
Junior Member
Posts: 27
Joined: Apr 2012
Reputation: 0
Post: #15
Hello again. Another day another problem.

I decided to make a new video library. So I tried to implement the usual sidebar, with choice of ordering patter, filter, view type etc..., by basically creating a rotating wheel and a button. However, when I tried to add some visibility instructions. the buttons dissapear ignoring the fact that the condition is true.

My code is:

Code:
<window id="6">
<defaultcontrol always="false">303</defaultcontrol>
<allowoverlay>yes</allowoverlay>
<controls>
    
    <control type="image">
      <description>UnderLayer</description>
      <posx>-300</posx>
      <posy>-300</posy>
      <width>600</width>
      <height>600</height>
      <visible allowhiddenfocus="true">Control.HasFocus(303)</visible>
      <fadetime>150</fadetime>
      <texture>Layer1.png</texture>
      <aspectratio>keep</aspectratio>
    </control>
    
    <control type="image" id="303">
      <description>Order</description>
      <posx>-290</posx>
      <posy>-290</posy>
      <width>580</width>
      <height>580</height>
      <visible>true</visible>
      <fadetime>150</fadetime>
      <texture>Layer2.png</texture>
      <aspectratio>keep</aspectratio>
      <onup>303</onup>
      <ondown>9000</ondown>
      <onright>303</onright>
      <onleft>302</onleft>
    </control>
    
    <control type="image" id="302">
      <description>SearchIcon</description>
      <posx>-290</posx>
      <posy>-290</posy>
      <width>580</width>
      <height>580</height>
      <visible allowhiddenfocus="true">Control.HasFocus(302)</visible>
      <texture>Layer3.png</texture>
      <aspectratio>keep</aspectratio>
    </control>
    
</controls>
</window>

Also I would like to know how to add new views used in music/picture/video libraries. The wikia has no information on that what so ever.
(This post was last modified: 2012-05-02 00:25 by Avatarass.)
find quote
mad-max Offline
Posting Freak
Posts: 1,476
Joined: Jul 2010
Reputation: 52
Location: Germany
Post: #16
For adding views, you need to include the view file itself in includes.xml...
Then you need MyVideoNav.xml or MyMusicNav.xml or what kind of media you want to add views to.
Then check the ID of the main control of the view e.g. 50 for default list.
In MyVideoNav you'll find a views tag where you need to add the ID and a bit below you need to include the include name of the view...
Sorry if this is a bit confusing and without code, it's tapatalked Big Grin

[Image: obi3o55x.jpg]
[Image: 7c8w3bu8.png]

- - - Tribute to Metallica - - -

If I managed to help you, please click my reputation
find quote
Avatarass Offline
Junior Member
Posts: 27
Joined: Apr 2012
Reputation: 0
Post: #17
(2012-05-01 23:17)mad-max Wrote:  For adding views, you need to include the view file itself in includes.xml...
Then you need MyVideoNav.xml or MyMusicNav.xml or what kind of media you want to add views to.
Then check the ID of the main control of the view e.g. 50 for default list.
In MyVideoNav you'll find a views tag where you need to add the ID and a bit below you need to include the include name of the view...
Sorry if this is a bit confusing and without code, it's tapatalked Big Grin

yeah I figured that much over the last hour.

But it still doesnt solve the problem why the image disappears. I mean it doesnt have any views or anything, its just 3 images.
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,520
Joined: Oct 2003
Reputation: 138
Post: #18
When you're pasting code, please use a code block as it makes things much more readable (or pastebin if you prefer).

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
ronie Online
Team-XBMC Member
Posts: 8,247
Joined: Jan 2009
Reputation: 108
Post: #19
(2012-05-01 21:21)Avatarass Wrote:  
Code:
<window id="6">
<defaultcontrol always="false">303</defaultcontrol>
<allowoverlay>yes</allowoverlay>
<controls>
    
    <control type="image">
      <description>UnderLayer</description>
      <posx>-300</posx>
      <posy>-300</posy>
      <width>600</width>
      <height>600</height>
      <visible allowhiddenfocus="true">Control.HasFocus(303)</visible>
      <fadetime>150</fadetime>
      <texture>Layer1.png</texture>
      <aspectratio>keep</aspectratio>
    </control>
    
    <control type="image" id="303">
      <description>Order</description>
      <posx>-290</posx>
      <posy>-290</posy>
      <width>580</width>
      <height>580</height>
      <visible>true</visible>
      <fadetime>150</fadetime>
      <texture>Layer2.png</texture>
      <aspectratio>keep</aspectratio>
      <onup>303</onup>
      <ondown>9000</ondown>
      <onright>303</onright>
      <onleft>302</onleft>
    </control>
    
    <control type="image" id="302">
      <description>SearchIcon</description>
      <posx>-290</posx>
      <posy>-290</posy>
      <width>580</width>
      <height>580</height>
      <visible allowhiddenfocus="true">Control.HasFocus(302)</visible>
      <texture>Layer3.png</texture>
      <aspectratio>keep</aspectratio>
    </control>
    
</controls>
</window>

you can't put the focus on an image control, nor do image controls accept <onfoo> tags.

by the looks of it, you need to code them as button controls.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not PM or e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
Avatarass Offline
Junior Member
Posts: 27
Joined: Apr 2012
Reputation: 0
Post: #20
(2012-05-02 00:47)ronie Wrote:  you can't put the focus on an image control, nor do image controls accept <onfoo> tags.

by the looks of it, you need to code them as button controls.

I see. But I dont want to have any other buttons on the screen. Just the picture that represents a button.

What I think is, I have to create a wraplist and put all the stuff i want there. Then I connect a picture that will spin along with wraplist. I think I can do that by using a labels of the objects in the list to send values of rotation to the picture. Like 90, 180, and 360 degrees. Then I just take the wraplist off the screen to have nothing but the picture I want. Am I correct?
find quote
Post Reply