Auto Closing a Window..How do I do it?
#1
Hello,

I've been working on a small tweak to help me understand some skinning techniques. I've managed to get everything I want sorted except for automatically closing a window after a set (adjustable??) time period. Is this possible??

Here's the deal...I have been using a slide animation to open the window on a key press, but I want the window to auto close after a set time. I looked at the "loop" function of animation, but this is the one thing I haven't been able to suss. Any help much appreciated. Thx
ZOTAC IONITX-D-E Intel Atom N330 Dual Core 1.6 GHz NVIDIA ION with LIVE on SSD (now updated to Nvidia Shield Pro (P2897)
Reply
#2
there may be other tricks, but this is the only one i ever came across:
Code:
<window id="1111">
    <defaultcontrol always="true">100</defaultcontrol>
    <controls>
        <control type="button" id="100">
            <posx>-100</posx>
            <posy>-100</posy>
            <width>1</width>
            <height>1</height>
            <onfocus>PreviousMenu</onfocus>
            <animation effect="fade" end="100" delay="5000">Focus</animation>
        </control>
    </controls>
</window>
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
Hey Ronie - Thx alot for the help.

Unfortunately, I've tried to install this code every way I can think - without any luck. Do I need all of it?

Here is the code for my window. I've borrowed it from another skin, so I don't know what default control 603 isHuh

Your code is for a button, whereas my code below is just an info window, so I'm confused as to how this works.

Code:
<window type="dialog" id="309">
    <defaultcontrol always="true">603</defaultcontrol>
    <controls>

<!--Movies-->

        <control type="group">
        <posx>880</posx>
        <posy>06</posy>
                <visible>VideoPlayer.Content(Movies)</visible>
            <animation effect="slide" start="880,0" time="200" >WindowOpen</animation>
            <animation effect="slide" end="1080,0" time="400">WindowClose</animation>
        <control type="image">
            <width>380</width>
            <height>86</height>
            <aspectratio>stretch</aspectratio>
            <texture border="40">simplicity/infoscreen-popup.png</texture>
        </control>

<---More controls--->

You can see the slide animation for windowopen and windowclosed, but I'd like to replace the windowclosed part with the timed slide out (to auto close). So were should I put your code.

Thx again.
ZOTAC IONITX-D-E Intel Atom N330 Dual Core 1.6 GHz NVIDIA ION with LIVE on SSD (now updated to Nvidia Shield Pro (P2897)
Reply
#4
I came back to it fresh today and suddenly it worked first time. Dont' figure Oo I think I had to many <control(s)> in the mix. I used only this part...with the defaultcontrol set to 100.
Code:
<control type="button" id="100">
            <posx>-100</posx>
            <posy>-100</posy>
            <width>1</width>
            <height>1</height>
            <onfocus>PreviousMenu</onfocus>
            <animation effect="fade" end="100" delay="5000">Focus</animation>
        </control>

Thx for the help.
ZOTAC IONITX-D-E Intel Atom N330 Dual Core 1.6 GHz NVIDIA ION with LIVE on SSD (now updated to Nvidia Shield Pro (P2897)
Reply

Logout Mark Read Team Forum Stats Members Help
Auto Closing a Window..How do I do it?0