Page 1 of 1

Optional Hook in UIPanel for Manual Animation

Posted: Wed Dec 09, 2020 1:52 am
by VoodooDetective
I was just implementing our ResponseMenu and realized that it requires you to use the Animator if you want the menu to wait for your animation to finish prior to changing the PanelState.

I was wondering if you'd be willing to add a hook to allow for programmatic animation. Like a callback I can call once my routine is done animating the open/close. Maybe a way to customize UIAnimatorMonitor where WaitForAnimation is virtual?

I know I can set deactivateOnHidden and make this work, but it seemed hacky to set the PanelState to Closed or Open before my animation finishes.

Maybe there's a better way for me to go about this?

Re: Optional Hook in UIPanel for Manual Animation

Posted: Wed Dec 09, 2020 8:08 am
by Tony Li
Hi,

All of the relevant methods are virtual. You can make a subclass that overrides Open() and Close().

Re: Optional Hook in UIPanel for Manual Animation

Posted: Wed Dec 09, 2020 7:39 pm
by VoodooDetective
Ah ok, thanks very much! I just wanted to be sure that was the right way to go before I did something foolish. Sorry for the confused post, and thanks!

Re: Optional Hook in UIPanel for Manual Animation

Posted: Wed Dec 09, 2020 7:58 pm
by Tony Li
Glad to help!