persona-3-dual
A DS demake of Persona 3
Loading...
Searching...
No Matches
UICallbackAnimation.hpp
Go to the documentation of this file.
1
6
7#pragma once
8
10
11#include <functional>
12
17{
18 public:
19 explicit UICallbackAnimation(std::function<void()> f) : fn(std::move(f))
20 {
21 }
22
23 protected:
24 bool onUpdate(ae::q20_12_t) override
25 {
26 if (fn)
27 {
28 fn();
29 }
30 return true;
31 }
32
33 private:
34 std::function<void()> fn;
35};
Base class for one UI animation step (property, delay, callback, sequence).
UIAnimation(const UIAnimation &)=delete
std::function< void()> fn
UICallbackAnimation(std::function< void()> f)
bool onUpdate(ae::q20_12_t) override
Per-frame update.