Help needed with Substratum's menus
#1
I've been working on this for about 3 days now and even though I've got close to solving the problem (with help from Unfledged) I haven't quite been able to fix it yet.

I've got an include for the menus that is loaded on every window so it's global and it also needs to serve as the breadcrumbs so you know where you are in XBMC. There's a button in each list that sets the item that is currently focused to a string, this string is then used onload of each window to set the menus to the same focus items as the previous window. All well and good until you scroll further down the list making the items offset and then scroll back up to click an item - the next window opens and the correct item is focused but the list isn't offset anymore.

Home screen - select movies

Image

Movies - correct menu item is highlighted

Image

Scroll down to Weather and offset the list

Image

Scroll back up to Movies (note list is now offset)

Image

Movies is loaded and movies is highlighted but list is reset

Image

Can anyone think of a way to load the list in the same position each time?

Thanks.
Reply
#2
Ideally the menu should be a in a custom, always visible overlay. Problem is that those can't be focused but I think this is something we could add. For now you could try to use a second custom window with a button to control the list via Control.Message. So instead of focusing the list directly, you activate the custom window with the button which controls the list.
Image
Reply
#3
Unfortunately this is being designed with touch pads in mind so any hidden buttons and/or fake lists are a no-go. Sad

I've got as far as getting both menus to focus on the correct items when switching windows it's just trying to work out a way to know their positions as well; either that or somehow get the list to move it's position down as you go back up.
Reply
#4
Big problem with user being able to hide whatever they want.

A single column panel instead of a list. With a button in the focuslayout containing:
Code:
<control type="button">
    <onfocus condition="Container(750).Row(0)">Skin.Reset(Main_row_8)</onfocus>
    <onfocus condition="Container(750).Row(1)">Skin.Reset(Main_row_9)</onfocus>
    <onfocus condition="Container(750).Row(2)">Skin.Reset(Main_row_10)</onfocus>
    <onfocus condition="Container(750).Row(3)">Skin.Reset(Main_row_11)</onfocus>

    <onfocus condition="Container(750).Row(8) + !Skin.HasSetting(Main_row_8)">Skin.ToggleSetting(Main_row_8)</onfocus>
    <onfocus condition="Container(750).Row(9) + !Skin.HasSetting(Main_row_9)">Skin.ToggleSetting(Main_row_9)</onfocus>
    <onfocus condition="Container(750).Row(9)">Skin.Reset(Main_row_8)</onfocus>
    <onfocus condition="Container(750).Row(10) + !Skin.HasSetting(Main_row_10)">Skin.ToggleSetting(Main_row_10)</onfocus>
    <onfocus condition="Container(750).Row(10)">Skin.Reset(Main_row_9)</onfocus>
    <onfocus condition="Container(750).Row(11) + !Skin.HasSetting(Main_row_11)">Skin.ToggleSetting(Main_row_11)</onfocus>
    <onfocus condition="Container(750).Row(11)">Skin.Reset(Main_row_10)</onfocus>
                        
    <visible allowhiddenfocus="true">false</visible>
    <enable>true</enable>
</control>
And so forth. Is there a max? This might get big... Ayway.
Only one of these skin settings will be true. Which means you can have a bunch of:
Code:
<onload condition="Skin.HasSetting(Main_row_8)">Control.Move(750,8)</onload>
<onload condition="Skin.HasSetting(Main_row_9)">Control.Move(750,9)</onload>
<onload condition="Skin.HasSetting(Main_row_10)">Control.Move(750,10)</onload>
<onload condition="Skin.HasSetting(Main_row_11)">Control.Move(750,11)</onload>
Then followed by the onload of your actual focus position (however you planned that). Could even try a 1 second delay with alarm.

[EDIT] Cleaned up code. Tested. Confirmed working, but...
Problem with this idea seems that items that fall outside the <height> are not counted as row.
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#5
Do you have this on GitHub somewhere, so I could have a go at it? (or PM me if you don't want it public yet)
Image
Reply
#6
We're using DropBox, I'll send you a link.
Reply
#7
Well it's defeated me! Confused
Reply

Logout Mark Read Team Forum Stats Members Help
Help needed with Substratum's menus0