Posts: 67
Joined: Jan 2011
Reputation:
1
2015-01-30, 14:35
(This post was last modified: 2015-01-30, 14:43 by shinedou.)
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.
Posts: 67
Joined: Jan 2011
Reputation:
1
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.
Posts: 17,937
Joined: Aug 2007
Reputation:
656
Hitcher
Team-Kodi Member
Posts: 17,937
Movies would have to be the second item.
Posts: 1,126
Joined: Mar 2012
Reputation:
37
MassIV
Skilled Skinner
Posts: 1,126
Items are relative, not absolute in their numbering. You hide or add in the beginning or middle then things will change position.
[RELEASE] Metroid
[RELEASE] IrcChat
Posts: 67
Joined: Jan 2011
Reputation:
1
2015-01-31, 22:56
(This post was last modified: 2015-01-31, 22:58 by shinedou.)
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.