call Replacewindow() after x seconds?
#1
i've been screwing around with some stuff and was curious about one minor thing:
say i wanted to set up the home page so that if you idle for x seconds and certain other conditions are met, it'll auto-switch to some other window. i figure like replacewindow() would be a good
function for this, but i have no idea if this is even possible in the current skin engine without a user action like <onclick>.

i know that in like startup.xml this sort of thing happens, but it's not clear to me at this point how it works. a little help?
Catchy Signature Here
Reply
#2
hi there,

no this is not possible. at best you can hide controls or show controls after an idle timeout. you can't tell it to change windows - that can only occur due to user input (eg a focus or click event).
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
edit: deleted



For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#4
thats what i thought, thanks Smile
Catchy Signature Here
Reply
#5
actually, i can think of one sneaky way to do this, but it requires that none of the real navigatable controls in the window have allowhiddenfocus="true". if you have this, you could make all controls go invisible after x seconds idle time.

you would need to place an invisible "dummy" control that has allowhiddenfocus="true" and has <onfocus>replacewindow(the target window)</onfocus>. if you set it up correctly i believe you can force focus to this element when everything else goes invisible. i might try to implement this when i have time Smile
Catchy Signature Here
Reply
#6
hehe, haven't figured out a way to force focus to a specific control, is there currently any way to do this?
Catchy Signature Here
Reply
#7
probably a better way to do this would be to have a dialog that is only visible on the conditions you want to use, and then use that dialog to do the forwarding.
here's one i wrote just to test if this would be possible.
according to the online docs on conditional visiblity (here)
"dialogs can also be made to popup automatically based on a visibility condition. this is done by supplying the <visible> tag at the top of the window file (where the <id>, <type> and <coordinate> tags are). xbmc once again evaluates this visibility at render time, and if needbe, will create and show the dialog at the appropriate time. it'll also close them once that visibility has vanished."

based on that, i wrote this:
Quote:<window>
<id>8000</id>
<defaultcontrol>5555</defaultcontrol>
<allowoverlay>no</allowoverlay>
<type>dialog</type>
<zorder>1</zorder>
<coordinates>
<system>1</system>
<origin x="0" y="0">window.isactive(home)</origin>
</coordinates>
<visible>window.isactive(0) + player.hasaudio</visible>
<controls>
<control>
<description>home glow</description>
<type>image</type>
<id>5555</id>
<posx>200</posx>
<posy>200</posy>
<width>200</width>
<height>200</height>
<texture>home glow.png</texture>
<visible>true</visible>
<label>-</label>
</control>
</controls>
</window>

this doesn't currently become visible ever as far as i can tell Sad



Catchy Signature Here
Reply
#8
i think you're confusing animation and visibile.

the control is considered visible as soon as the condition is met. you want the control to be visible after the animation.

i don't know if that's possible.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#9
what? are you referring to my post about the dialog windows or something else?
Catchy Signature Here
Reply

Logout Mark Read Team Forum Stats Members Help
call Replacewindow() after x seconds?0