Setting Default Highlighted Menu on Boot to VIDEOS instead of MUSIC
#1
So I'm assuming there must be quite a few other people who would prefer to have XBMC land on the VIDEOS menu as it used to upon boot instead of on the MUSIC menu as it now does. I've been playing around with a bunch of stuff and have read all over this forum and nothing I've read works. Hopefully someone could help us out with this, much appreciated.
Reply
#2
I think it centers out on the menu selection. If you get rid of Pictures, and programs it might start up on Video. But I honestly have no idea. I just know mine starts on video.
Reply
#3
This is why Mods are made Big Grin

If you want to do your own then edit home.xml

At a top of the file

Code:
<?xml version="1.0" encoding="UTF-8"?>
<window>
    <defaultcontrol always="true">9000</defaultcontrol>
    <allowoverlay>no</allowoverlay>    
    <onunload condition="Container(9000).Hasfocus(10) | Container(9000).Hasfocus(11) | ControlGroup(9010).HasFocus | ControlGroup(9016).HasFocus |      ControlGroup(9017).HasFocus">SetProperty(VideosDirectLink,True)</onunload>
    <onunload condition="Control.HasFocus(9000) + Container(9000).Hasfocus(2)">ClearProperty(VideosDirectLink)</onunload>
    <controls>
        <include>CommonBackground</include>

Under the "<allowoverlay>no</allowoverlay>" statement add the following code


Code:
<onload condition="Window.Previous(startup)">Control.Move(9000,-3)</onload>

The -3 is the number of places to move and needs to be adjusted to match your system eg -1 or the other direction 2 or 3 whatever
Noli illegitimi carborundum


Reply
#4
Thank you very much Sir, it worked as expected.
Reply
#5
I really wish there was some way to just highlight a specific menu. The mod Mudislander provided works, until you decide to enable another menu item. Then you have to go adjust the number again.
Reply
#6
With a little more work you can get a control in the settings, where it's easier to adjust. Hybrid has got one
Noli illegitimi carborundum


Reply
#7
(2014-05-15, 06:20)Mudislander Wrote: With a little more work you can get a control in the settings, where it's easier to adjust. Hybrid has got one

Any more clues on how to do that? Which .xml's should we be looking at in Hybrid ... Smile
Reply
#8
Okay the code will need adapting for Confluence due to the main menu items, but in Hybrid's Home.xml you'll find
Code:
<onload condition="Window.Previous(startup)">Control.Move(9000,$INFO[Skin.String(initialmenuitem)])</onload>

which is a modified version of code suggested earlier

Then in skinsettings.xml. At the top you'll find a <onload> statement
Code:
<onload condition="stringcompare(Container(9009).Position,0) + !stringcompare(Skin.String(initialmenuposi),0)">Control.Move(9009,$INFO[Skin.String(initialmenuposi)])</onload>

Which controls the list of main menu items.

Round about line #186 in skinsettings.xml you'll find the code for the button that you use to chance the menu item you want in focus.

Code:
<control type="button" id="101">
                        <width>750</width>
                        <height>40</height>
                        <font>font13</font>
                        <label>$LOCALIZE[31014]</label>
                        <label2>[COLOR=selected]$INFO[Container(9009).ListItem.label][/COLOR]</label2>
                        <textcolor>grey2</textcolor>
                        <focusedcolor>white</focusedcolor>
                        <texturefocus>MenuItemFO.png</texturefocus>
                        <texturenofocus>MenuItemNF.png</texturenofocus>
                        <onclick>Control.Move(9009,1)</onclick>
                        <onclick>Skin.SetString(initialmenuposi,$INFO[Container(9009).Position])</onclick>
                        <onclick condition="StringCompare(Container(9009).Position,0)">Skin.SetString(initialmenuitem,-1)</onclick>
                        <onclick condition="StringCompare(Container(9009).Position,1)">Skin.SetString(initialmenuitem,0)</onclick>
                        <onclick condition="StringCompare(Container(9009).Position,2)">Skin.SetString(initialmenuitem,1)</onclick>
                        <onclick condition="StringCompare(Container(9009).Position,3)">Skin.SetString(initialmenuitem,2)</onclick>
                        <onclick condition="StringCompare(Container(9009).Position,4)">Skin.SetString(initialmenuitem,3)</onclick>
                        <onclick condition="StringCompare(Container(9009).Position,5)">Skin.SetString(initialmenuitem,4)</onclick>
                        <onclick condition="StringCompare(Container(9009).Position,6)">Skin.SetString(initialmenuitem,5)</onclick>
                        <onclick condition="StringCompare(Container(9009).Position,7)">Skin.SetString(initialmenuitem,6)</onclick>
                        <onclick condition="StringCompare(Container(9009).Position,8)">Skin.SetString(initialmenuitem,7)</onclick>
                        <onclick condition="StringCompare(Container(9009).Position,9)">Skin.SetString(initialmenuitem,8)</onclick>
                        <onclick condition="StringCompare(Container(9009).Position,10)">Skin.SetString(initialmenuitem,-2)</onclick>
                    </control>

Then way further down line #664 is the actual list of your main screen items. this is where you'll have to adjust to work in Confluence as in Hybrid the menu items are listed as homeitem.?.label/path and as you can see visability is controlled by the path being empty or not For Confluence you know that the first item is the weather and visibility is controlled by "!Skin.HasSetting(HomeMenuNoWeatherButton)" next is Pictures controlled by "!Skin.HasSetting(HomeMenuNoPicturesButton)" and so on

Code:
<control type="list" id="9009">
                    <onleft>9001</onleft>
                    <onright>9001</onright>
                    <onup>9001</onup>
                    <ondown>9001</ondown>
                    <visible>Container(9000).Hasfocus(1)</visible>
                    <itemlayout height="1" width="750"></itemlayout>
                    <focusedlayout height="1" width="750"></focusedlayout>
                    <content>
                        <item>
                            <label>$INFO[Skin.String(homeitem.1.label)]</label>
                            <onclick>noop</onclick>
                            <icon>-</icon>
                            <thumb>-</thumb>
                            <visible>!IsEmpty(Skin.String(homeitem.1.path))</visible>
                        </item>
                        <item>
                            <label>$INFO[Skin.String(homeitem.2.label)]</label>
                            <onclick>noop</onclick>
                            <icon>-</icon>
                            <thumb>-</thumb>
                            <visible>!IsEmpty(Skin.String(homeitem.2.path))</visible>
                        </item>
                        <item>
                            <label>$INFO[Skin.String(homeitem.3.label)]</label>
                            <onclick>noop</onclick>
                            <icon>-</icon>
                            <thumb>-</thumb>
                            <visible>!IsEmpty(Skin.String(homeitem.3.path))</visible>
                        </item>
                        <item>
                            <label>$INFO[Skin.String(homeitem.4.label)]</label>
                            <onclick>noop</onclick>
                            <icon>-</icon>
                            <thumb>-</thumb>
                            <visible>!IsEmpty(Skin.String(homeitem.4.path))</visible>
                        </item>
                        <item>
                            <label>$INFO[Skin.String(homeitem.5.label)]</label>
                            <onclick>noop</onclick>
                            <icon>-</icon>
                            <thumb>-</thumb>
                            <visible>!IsEmpty(Skin.String(homeitem.5.path))</visible>
                        </item>
                        <item>
                            <label>$INFO[Skin.String(homeitem.6.label)]</label>
                            <onclick>noop</onclick>
                            <icon>-</icon>
                            <thumb>-</thumb>
                            <visible>!IsEmpty(Skin.String(homeitem.6.path))</visible>
                        </item>
                        <item>
                            <label>$INFO[Skin.String(homeitem.7.label)]</label>
                            <onclick>noop</onclick>
                            <icon>-</icon>
                            <thumb>-</thumb>
                            <visible>!IsEmpty(Skin.String(homeitem.7.path))</visible>
                        </item>
                        <item>
                            <label>$INFO[Skin.String(homeitem.8.label)]</label>
                            <onclick>noop</onclick>
                            <icon>-</icon>
                            <thumb>-</thumb>
                            <visible>!IsEmpty(Skin.String(homeitem.8.path))</visible>
                        </item>
                        <item>
                            <label>$INFO[Skin.String(homeitem.9.label)]</label>
                            <onclick>noop</onclick>
                            <icon>-</icon>
                            <thumb>-</thumb>
                            <visible>!IsEmpty(Skin.String(homeitem.9.path))</visible>
                        </item>
                        <item>
                            <label>$INFO[Skin.String(homeitem.10.label)]</label>
                            <onclick>noop</onclick>
                            <icon>-</icon>
                            <thumb>-</thumb>
                            <visible>!IsEmpty(Skin.String(homeitem.10.path))</visible>
                        </item>
                    </content>
                </control>

Hybrid also has a bit of code

Code:
<onload>Skin.SetString(initialmenuposi,2)</onload>

that gets run only once on initial setup just to enter a number in the string. You should get away without it but the first click on you adjusting button may go a little haywire because there is no previous value to the string

you could put a IsEmpty condition to the onload and put it in your Home.xml, but I wouldn't bother
Noli illegitimi carborundum


Reply
#9
Not an easy fix then! Think I'll stick to heaping praise on you guys rather than sticking my toe in the Skinning pool Wink

Actually I dug around a bit yesterday and found the first part ("Round about line #186 in skinsettings.xml") but failed to spot the stuff at #664. I'll persevere and see if somehow I can get this to work, more for my own amusement than anything.

Very much appreciate the detailed response though, Thank you!
Reply
#10
I am trying this for latest final version 16.1, but I think I need help. I can't find the needed lines in home.xml
Reply
#11
I got it working with http://kodi.wiki/view/HOW-TO_edit_the_Ma...a_skinning
Reply
#12
[/code]

Under the "<allowoverlay>no</allowoverlay>" statement add the following code


Code:
<onload condition="Window.Previous(startup)">Control.Move(9000,-3)</onload>

The -3 is the number of places to move and needs to be adjusted to match your system eg -1 or the other direction 2 or 3 whatever
[/quote]

I was able to get this working on Confluence but not on a modified version of Confluence. I inserted the code as shown here but nothing changed.
Reply

Logout Mark Read Team Forum Stats Members Help
Setting Default Highlighted Menu on Boot to VIDEOS instead of MUSIC1