Optional Hook in UIPanel for Manual Animation

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
VoodooDetective
Posts: 222
Joined: Wed Jan 22, 2020 10:48 pm

Optional Hook in UIPanel for Manual Animation

Post 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?
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Optional Hook in UIPanel for Manual Animation

Post by Tony Li »

Hi,

All of the relevant methods are virtual. You can make a subclass that overrides Open() and Close().
VoodooDetective
Posts: 222
Joined: Wed Jan 22, 2020 10:48 pm

Re: Optional Hook in UIPanel for Manual Animation

Post 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!
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Optional Hook in UIPanel for Manual Animation

Post by Tony Li »

Glad to help!
Post Reply