1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-04-08 19:56:45 +00:00

mouseover hook

This commit is contained in:
Zeno Rogue 2025-02-10 11:59:11 +01:00
parent e3440b323a
commit 609064579c

View File

@ -893,6 +893,8 @@ int windtotal;
EX hookset<void(cell*)> hooks_mouseover;
EX hookset<bool()> hooks_global_mouseover;
template<class T> void set_help_to(T t) {
help = bygen([t] {
gotoHelpFor(t);
@ -903,6 +905,8 @@ template<class T> void set_help_to(T t) {
EX void describeMouseover() {
DEBBI(DF_GRAPH, ("describeMouseover"));
if(callhandlers(0, hooks_global_mouseover)) return;
cell *c = mousing ? mouseover : playermoved ? NULL : centerover;
string& out = mouseovers;
if(!c || instat || getcstat != '-') { }