Kodi Community Forum

Full Version: Clear home.xml from memory without ReloadSkin()?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am working on a mod for MQ5 using its ability to have multiple menu bar presets. I have changed the selection behavior so that the different menus can be selected from the menu bar and not a context menu amd dialog box.

MQ5 uses ReplaceWindow(home) to load a new home with a different menu bar. It is working well but it still remembers the last home menu item position. The only way I can get it to use the default position and not the last used position is to use ReloadSkin().

Is there a way to Clear home.xml from memory without using ReloadSkin() so that the skin thinks it is loading home.xml from a fresh Kodi start up thus positioning the correct menu item in the center.

I am a newby when it comes to working with skins so bare with me if this doesn't make any sense.

Thanks.
PHP Code:
<defaultcontrol always="true">ID</defaultcontrol
If the above isn't possible is there a way to force home to always show a Particular menu bar item (e.g. movies) in focus? I understand focusposition assigns which position on the menu bar is focused but I would like a way to force a particular item to always be in that focused position. I tried Control.Move but that doesn't do what I need because it offsets off of the last view so it is unpredictible.

I have also tried ReplaceWindowAndFocus but that doesn't work at all for me.
(2015-01-31, 00:28)Hitcher Wrote: [ -> ]
PHP Code:
<defaultcontrol always="true">ID</defaultcontrol

Ok right now home.xml has <defaultcontrol always="true">9000</defaultcontrol> which forces control to the menu bar. The menu bar has focuspostion set at 1 so the middle item is focused. How do I get "movies" for example to always show in focuspostion 1?
Movies would have to be the second item.
Items are relative, not absolute in their numbering. You hide or add in the beginning or middle then things will change position.
Thanks for the replies folks. I really appreciate it.

Say I scroll to the settings item on the main menubar which is a wraplist and click the settings item. When I back out and return to home the main menu keeps the settings item in focus. How can I force the menu bar to return to movies as the focus instead of settings?

When I start Kodi the correct menu item (movies) is focused but from that point it always remembers the last focused item. I am trying to elimimate this behavior. I am tested some condition statements with Container(id).HasFocus(item_number) and control.move right now to see if I can move the focus back to movies when reentering home.xml.

It looks like I should be able to do it but because the items in MQ5's Menubar do not have id's I am not able to determine what item hasfocus using Container(id).HasFocus(item_number).

When using Container(id).HasFocus(item_number) what does (item_number) refer to exactly?

I am sure I am not explaining what I am trying to do very well. Maybe me choosing MQ5 as a starting point for learning some skinning was a bad idea because it seems his skinning methods don't matchup well with some of the wiki and manual.