Quantcast
Channel: Kodi Community Forum - Skinning
Viewing all articles
Browse latest Browse all 1818

Dialog.Close works only once, why?

$
0
0
Hi,

My purpose is:
1. Playing a video.
2. Open the controls buttons dialog (videoosd) with 'M'
3. Open the shutdown dialog (shutdownmenu) with 'S' + Close (videoosd) if active.
4. Press 'S' again to close (shutdownmenu), if the (shutdownmenu) was opened when (videoosd) was active, return it back.

This is work only once, but on the second try the (videoosd) doesn't close and (shutdownmenu) doesn't show up.

What I want is actually to toggle between (shutdownmenu) and (videoosd) when (videoosd) is active.

I have tried some ways, but still the same.

This is regarding the (shutdownmenu):
Code:
    <onload condition="Window.IsActive(videoosd)">SetProperty(hadVideoOSD,true,home)</onload>
    <onload condition="Window.IsActive(musicosd)">SetProperty(hadMusicOSD,true,home)</onload>
    
    <onload condition="Window.IsActive(videoosd) | String.IsEqual(Window(home).Property(hadVideoOSD),true)">Dialog.Close(videoosd)</onload>
    <onload condition="Window.IsActive(musicosd) | String.IsEqual(Window(home).Property(hadMusicOSD),true)">Dialog.Close(musicosd)</onload>

    <onunload condition="String.IsEqual(Window(home).Property(hadVideoOSD),true)">ActivateWindow(videoosd)</onunload>
    <onunload condition="String.IsEqual(Window(home).Property(hadMusicOSD),true)">ActivateWindow(musicosd)</onunload>    
    
    <onunload>ClearProperty(hadVideoOSD,home)</onunload>    
    <onunload>ClearProperty(hadMusicOSD,home)</onunload>

Viewing all articles
Browse latest Browse all 1818

Latest Images

Trending Articles



Latest Images