mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-07-27 13:02:49 +00:00
hook_in_subscreen
This commit is contained in:
parent
a064c20b94
commit
da22fe21bc
10
hyper.h
10
hyper.h
@ -792,6 +792,16 @@ template<class T, class V, class... U> V callhandlers(V zero, const hookset<T>&
|
|||||||
return h.callhandlers(zero, static_cast<U&&>(args)...);
|
return h.callhandlers(zero, static_cast<U&&>(args)...);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void popScreen();
|
||||||
|
|
||||||
|
template<class T, class U> void hook_in_subscreen(hookset<T>& m, int prio, U&& hook) {
|
||||||
|
int v = m.add(prio, static_cast<U&&>(hook));
|
||||||
|
pushScreen([&m, v] {
|
||||||
|
delHook(m, v);
|
||||||
|
popScreen();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
string XLAT(string);
|
string XLAT(string);
|
||||||
|
|
||||||
#define GLERR(call) glError(call, __FILE__, __LINE__)
|
#define GLERR(call) glError(call, __FILE__, __LINE__)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user