1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-03-14 00:59:43 +00:00

replaced hooks_startmenu and hooks_mainmenu with a general hooks_display_dialog

This commit is contained in:
Zeno Rogue
2019-09-08 10:08:05 +02:00
parent ca9a025e45
commit 8f8fb8a217
4 changed files with 16 additions and 8 deletions

View File

@@ -7772,8 +7772,15 @@ EX vector< function<void()> > screens = { normalscreen };
template<class T> void pushScreen(const T& x) { screens.push_back(x); }
inline void popScreen() { if(isize(screens)>1) screens.pop_back(); }
inline void popScreenAll() { while(isize(screens)>1) popScreen(); }
typedef void (*cfunction)();
#endif
EX cfunction current_screen_cfunction() {
auto tgt = screens.back().target<cfunction>();
if(!tgt) return nullptr;
return *tgt;
}
#if HDR
namespace sm {
static const int NORMAL = 1;