replaced hooks_startmenu and hooks_mainmenu with a general hooks_display_dialog

This commit is contained in:
Zeno Rogue
2019-09-12 22:50:16 +02:00
parent ca9a025e45
commit 8f8fb8a217
4 changed files with 16 additions and 8 deletions
+6
View File
@@ -59,6 +59,12 @@ public:
explicit operator bool() const noexcept {
return ptr_ != nullptr;
}
template<class T> T* target() {
auto ptr = dynamic_cast<function_state<T, R, Args...>*> (ptr_);
if(!ptr) return nullptr;
return &ptr->t_;
}
};
} // namespace hr