Kodi Community Forum

Full Version: Visibilty code... Help!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys,

Could someone point me in the right direction! What visibility code is needed to make a list hidden until a ondown, etc command is pressed?

Cheers Wink
Probably a couple ways, a fake button is one:

Quote:<control type="button" id="9999">
<posx>0</posx>
<posy>0</posy>
<width>1</width>
<height>1</height>
<onup>7000</onup>
<ondown>65</ondown>
<onright>55</onright>
<onleft>55</onleft>
</control>

Quote:<control type="image">
<posx>?</posx>
<posy>?</posy>
<width>?</width>
<height>?</height>
<texture>Infopanel.png</texture>
<visible>Control.IsVisible(55) + Control.HasFocus(9999)</visible>
</control>

That image won't show until that fake button has focus. Obviously have the <ondown>9999</ondown> in your list
Hey mcborzu,

Thanks for the info. I had a play however still couldn't crack it. Here's what i'm after...

I have a horizontal fixedlist of icons. What i'm trying to achieve is to have a different vertical fixedlist for each icon, that drops down when a ondown/onup command is run.

The problems i'm having are...

1) getting a ondown/onup command to work for each separate icon. At the moment, there's 1 ondown/onup code that is on the horizontal fixedlist, and therefore applies to all icons. How can i get multiple ondown/onup commands for each icon in the list?

2) using the false button trick, i can get 1 vertical fixedlist to appear when the ondown/onup command is run, however when that list is then active, it's own ondown/onup doesn't work.

Thanks
Put all the vertical lists in one control group with a unique id and use that id in the ondown control. Then in each vertical list add a visibility condition that relates to the horizontal list.

ie

PHP Code:
<control type="fixedlist" id="300">
    <
ondown>3000</ondown>
    ...
</
control>

<
control type="group" id="3000">

    <
control type="fixedlist" id="3001">
        <
visible>Container(300).HasFocus(1) | Control.HasFocus(3001)</visible>
        ...
    </
control>
    
    <
control type="fixedlist" id="3002">
        <
visible>Container(300).HasFocus(2) | Control.HasFocus(3002)</visible>
        ...
    </
control>
    
    <
control type="fixedlist" id="3003">
        <
visible>Container(300).HasFocus(3) | Control.HasFocus(3003)</visible>
        ...
    </
control>
    
    ...
    
</
control
Cheers Hitcher, i see. That's the multiple verticle lists sorted.

I'll try it with the false button trick to make the verticle lists hidden until a ondown is used.

Thanks guys
Just changed it to cover being hidden until focused.
Cheers. I'd already had the code to make each verticle list only appear on it's corresponding horizontal icon, however i had to use 'container.hasfocus' instead of 'control.hasfocus'. If i use control.hasfocus the verticle menu doesn't appear at all.

The last thing i can't figure out is how to make the verticle list hidden until you get to it's corresponding horizontal icon, then press down. So it appears to drop down below the horizontal icon.

Tried mcborzu's false button trick, however when the verticle list drops down, i can't scroll down/up.

Thanks
It's ok, i think i've sorted it!

<visible allowhiddenfocus="true">Control.HasFocus(....)</visible> seems to be doing the trick.
Actually, no i haven't!

Using <visible allowhiddenfocus="true">Control.HasFocus(3002)</visible> in one list (id="3002"), and <visible allowhiddenfocus="true">Control.HasFocus(3009)</visible> in another list (id="3009"), i get 3002's menu for both.

I'm guessing i need a + something to associate them to their own horizontal icon. Will have a play however if you any have idea, let me know!!

Thanks guys
<visible>Container().HasFocus()</visible> Container ID of the horizontal list, and then the id of the static content used in it in your <content> list
Hey Arcanthur,

I've used that before to associate a vertical list to it's horizontal icon, however the vertical list is always visible. What additional visibilty code do i need to make the list hidden, and appear only on a ondown command?

I thought <visible allowhiddenfocus="true">Control.HasFocus(....)</visible> would do the trick, however the first vertical list with this entry appears for all horizontal icons.

Am i making sense with my descriptions of what i'm trying to do?

Thanks