PDA

View Full Version : Keep a submenu from closing onclick?


Lathlas
2008-06-18, 04:10
I'm adding an eject/load button to my shutdown submenu on PM3(DialogButtonMenu.xml) and I was wondering if there was a command that would let the submenu stay open after I clicked the eject button instead of returning to the home screen.

This is the control I'm currently using and it works perfectly aside from this issue.


<control type="button" id="3110">
<description>Eject button</description>
<visible>System.LoggedOn</visible>
<posx>240</posx>
<posy>5</posy>
<width>60</width>
<height>65</height>
<texturefocus>sub-eject-focus.gif</texturefocus>
<texturenofocus>sub-eject-nofocus.png</texturenofocus>
<onclick>XBMC.EjectTray()</onclick>
<pulseonselect>no</pulseonselect>
<onleft>3112</onleft>
<onright>3114</onright>
<onup>3110</onup>
<ondown>3110</ondown>
<font>-</font>
<label>13391</label>
</control>

jmarshall
2008-06-18, 12:38
Yeah - make it a normal dialog rather than a buttonmenu.

You may actually need to add a new dialog in fact - not sure.

Lathlas
2008-06-18, 19:15
Thanks, I'll give it a whirl today.

Lathlas
2008-06-18, 20:24
Nope, no dice. Changing the type to a dialog produces exactly the same results, and trying to add a new dialog didn't work at all.

I might have the new dialog process wrong though. I copied the dialog I was working with and changed the id from 111 to 120688381(just a random unique number) and saved it as "custom120688381.xml"

Switching the link in Home.xml from "ActivateWindow(ShutdownMenu)" to "ActivateWindow(custom120688381)" didn't work, nor did "ActivateWindow(120688381), ActivateWindow(custom120688381.xml), XBMC.ActivateWindow(120688381), XBMC.ActivateWindow(custom120688381.xml)"

I apparently get no custom window loving and the wiki entry on adding custom dialogs was very brief.

jmarshall
2008-06-19, 00:07
Yeah - it'd need to be a new dialog using the custom window stuff.

Then it should work fine. Perhaps you could model it on the other custom windows (skin settings for instance)?

Cheers,
Jonathan