Detect transition to/from dialogs
#1
As the title, can anyone offer a suggestion to detect when the skin is transitioning between dialogs?

I've designed my skin so that dialogs always appear to take up the whole screen, rather than overlay on the main window. Primarily I've done this simply by including the background image, so that it covers whatever window is beneath. However, adding a fade-in/fade-out animation to the dialog means that, when going from one dialog to another (an obvious example being, one select dialog to another select dialog), the window underneath becomes visible during the transition which looks quite jarring.

What I'd like to do, therefore, is detect when transitioning between dialogs so that I don't do the fade-in/fade-out animation on those occasions.

What looked like the obvious solution - Window.Next(selectdialog) / Window.Previous(selectdialog) doesn't work. Presumably because they're dialogs and not windows, these never appear to become True.

Any suggestions for other ways I could detect this? Thanks Smile

(BTW, developing against Helix alpha)
Reply
#2
Code:
!Window.IsActive(selectdialog)
?
Reply
#3
Knew it'd be something obvious. Much appreciated Smile

Edit - didn't work directly (caused problems with the animation when opening a dialog when _not_ coming from a dialog), but by adding the background as an overlay on the windows with the visibility condition Window.IsActive(selectdialog) | Window.IsActive(okdialog) | ... with a slight delay on the hidden animation worked perfectly. Again, thank you!
Reply
#4
Only glad to help.
Reply
#5
You need to use Window.IsVisible(...) instead of IsActive(...). While IsActive is immediatly false if the dialog gets closed, IsVisible is true as long as it's visible, means that the window close animation is taken into account.
Image
Reply
#6
Good point.
Reply
#7
(2014-08-04, 21:48)`Black Wrote: You need to use Window.IsVisible(...) instead of IsActive(...). While IsActive is immediatly false if the dialog gets closed, IsVisible is true as long as it's visible, means that the window close animation is taken into account.

Perfect, thank you Smile

Edit: and that works (reasonably well so far, only because I haven't had time to do it properly) with the original idea of doing/not doing the animation in the dialog itself. Thats why I love this community Smile Another thank you to you!

One more edit, because I've now got this working perfectly: using IsActive for the visible animation, and IsVisible for the hidden animation of the background works perfectly. Unsuprisingly, I was developing against the select dialogs displayed by my skin shortcuts script which seems to be why the Window.Next/Window.Previous didn't work - when the select dialog is closed, the next select dialog hasn't yet been initialised (and, in a lot of cases, has a progress dialog inbetween.) Again, my thanks to both Hitcher and 'Black - between you, your suggestions have allowed me to create exaxctly the ux i was looking for. Now, where's that +1 button...?
Reply

Logout Mark Read Team Forum Stats Members Help
Detect transition to/from dialogs0