Changing View type using a 'cycle button' help?
#1
I want to change the View type selection on Aeon to a cycling button similar to PM3.

Looking through PM3's xml files I've found this in the MyVideoNav.xml-
Code:
<control type="button" id="2">
    <description>View As button</description>
    <posx>0</posx>
    <posy>0</posy>
    <include>ButtonCommonValues</include>
    <label>-</label>
    <onleft>50</onleft>
    <onright>50</onright>
    <onup>611</onup>
    <ondown>3</ondown>
</control>
which seems to be the button I'm looking for but I was expecting an <onclick> entry. The only other part that I think is relevant is the <include> which is this -
Code:
<include name="ButtonCommonValues">
    <height>44</height>
    <width>280</width>
    <font>font12</font>
    <textcolor>white</textcolor>
    <focusedcolor>white</focusedcolor>
    <shadowcolor>black</shadowcolor>
    <align>left</align>
    <aligny>center</aligny>
    <textoffsetx>35</textoffsetx>
    <texturefocus border="32,0,0,0">Button_Side_Focus.png</texturefocus>
    <texturenofocus border="32,0,0,0">Button_Side_NoFocus.png</texturenofocus>
    <pulseonselect>true</pulseonselect>
</include>
but I can't see how that changes views.

Help a noob out.
Reply
#2
Its auto button id="2" is predefinded as a cycle view button in the media windows so xbmc knows what to do with it.
So just make a button with that Id in AEON
Reply
#3
Brilliant, thanks.
Reply
#4
I managed to get the button working how I want by doing this.

Replace -

Code:
<control type="button" id="900">
    <label>$LOCALIZE[31050] $INFO[Container.ViewMode]</label>
    <include>Objects_MediaMenuButton</include>
    <onclick>SetFocus(69)</onclick>
</control>

with -

Code:
<control type="button" id="900">
    <visible allowhiddenfocus="true">false</visible>
    <onfocus>SetFocus(2)</onfocus>
</control>
                
<control type="button" id="2">
    <description>View As button</description>
    <include>Objects_MediaMenuButton</include>
</control>

Now I can cycle through the various view types available but I'm now stuck trying to add a new view type. I've saved the following as ViewType_List2.xml and added it to the Includes.xml but it doesn't appear when I cycle through the view type button and it's always displayed over the other view types.
Code:
<includes>    

    <include name="Viewtype_List2">
        <control type="list" id="5000">
            <viewtype label="List2">list</viewtype>
....
        </control>
    </include>

</includes>
Are there only a set number of view types available as 50-59 are already used and that's why I picked 5000 so it wouldn't interfere with anything?
Reply
#5
Add it to the <views> list at the top of the XML.
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
Reply
#6
Which XML would that be?

I've searched all of them in Aeon but not one has the <views> tag.
Reply
#7
If no <views> tag is present, it assumes view controls are id 50 through 59.
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
Reply
#8
That'll explain it then, many thanks.

PS Is this info on the WIKI?
Reply
#9
Not to hijack this thread, but i have a related question: I haven't been able to find any info on views in MyVideoNav.xml. Currently, I have been using control 50 for all my views and using conditional visibilty. So if i understand this correctly - video library will be displayed by default in controls 50-59? Is this also true for music library? Is there any documentation on this, or a thread someone can point me to that would explain which controls use specific ids and what they mean? The current documentation in the wiki is great - and if someone shows me where to find this info, Id be glad to add it to the wiki.
Reply
#10
Any media window by default uses any container type in id's 50 through 59 as a valid view. They can be anything you like. There's no need for a "list" type to be id 50 or anything like that.

With the introduction of the <views> tag, the skinner can specify as many container types as they like as views, and can also reorder them as they see fit for particular windows and so on (previously they were cycled through in the order they were given in the XML, which has implications for how things are layered on screen).

PM3.HD uses the <views> tag. I don't believe there's any documentation on it at present - it'll need to be added to the Window documentation in the skinning manual, and probably linked in from the view container page (I think there's one of them, anyway).

Cheers,
Jonathan
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
Reply
#11
jmarshall Wrote:PM3.HD uses the <views> tag. I don't believe there's any documentation on it at present - it'll need to be added to the Window documentation in the skinning manual, and probably linked in from the view container page (I think there's one of them, anyway).

Where can i get the latest PM3.HD xml files? I dont see them in the skinning svn?
Reply
#12
That's because it's in the main XBMC SVN.

Cheers,
Jonathan
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
Reply

Logout Mark Read Team Forum Stats Members Help
Changing View type using a 'cycle button' help?0