2005-08-02, 12:25
hi all,
fading was added to the gui last night. it works as follows: whenever a control has a <visible> tag with the fade attributes set, it'll fade whenever the visibility changes.
for instance:
<visible effect="fade" time="400">player.hasaudio</visible>
will cause the control to fade in (lasting a time of 400 milliseconds) when xbmc starts playing music, and will fade back out again when it stops playing music.
you can use this on any control except videowindow's and visualisation controls. videowindow's i can probably do reasonably easily, but visualisations would need changes to the vis interface.
there's also some other attributes that you can add:
<visible effect="fade" time="200" start="hidden">true</visible>
this control will always be visible (as we've set the visible tag to true) but it will always start out hidden and fade in over 200 milliseconds. you can also do:
<visible effect="fade" intime="500" outtime="100">player.hasmedia</visible>
to specify the fade in and fade out times separately.
lastly, the fade attribute works for dialogs as well, so at the top of any dialog window's xml, you can add:
<visible effect="fade" time="200">window.isactive(windowid)</visible>
to have it fade in when it pops up, and fade out again when it is finished with.
note that you need the window.isactive(windowid) command there, otherwise it'll always be on screen. (windowid will ofcourse be the dialogs id).
the only exceptions to the dialog fading are the music and video overlays, which always vanish immediately if you change to a window that doesn't allow overlays (eg fullscreen video)
let me know what you think, and if you find any bugs! i strongly suggest you don't overuse it - keep the fades short (less than 400ms or so) otherwise it gets a bit much.
cheers
jonathan
edit: updated to the new system.
fading was added to the gui last night. it works as follows: whenever a control has a <visible> tag with the fade attributes set, it'll fade whenever the visibility changes.
for instance:
<visible effect="fade" time="400">player.hasaudio</visible>
will cause the control to fade in (lasting a time of 400 milliseconds) when xbmc starts playing music, and will fade back out again when it stops playing music.
you can use this on any control except videowindow's and visualisation controls. videowindow's i can probably do reasonably easily, but visualisations would need changes to the vis interface.
there's also some other attributes that you can add:
<visible effect="fade" time="200" start="hidden">true</visible>
this control will always be visible (as we've set the visible tag to true) but it will always start out hidden and fade in over 200 milliseconds. you can also do:
<visible effect="fade" intime="500" outtime="100">player.hasmedia</visible>
to specify the fade in and fade out times separately.
lastly, the fade attribute works for dialogs as well, so at the top of any dialog window's xml, you can add:
<visible effect="fade" time="200">window.isactive(windowid)</visible>
to have it fade in when it pops up, and fade out again when it is finished with.
note that you need the window.isactive(windowid) command there, otherwise it'll always be on screen. (windowid will ofcourse be the dialogs id).
the only exceptions to the dialog fading are the music and video overlays, which always vanish immediately if you change to a window that doesn't allow overlays (eg fullscreen video)
let me know what you think, and if you find any bugs! i strongly suggest you don't overuse it - keep the fades short (less than 400ms or so) otherwise it gets a bit much.
cheers
jonathan
edit: updated to the new system.