mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-12-14 18:18:05 +00:00
replaced hooks_startmenu and hooks_mainmenu with a general hooks_display_dialog
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user