mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-07-06 11:32:49 +00:00
mouseover hook
This commit is contained in:
parent
e3440b323a
commit
609064579c
4
help.cpp
4
help.cpp
@ -893,6 +893,8 @@ int windtotal;
|
|||||||
|
|
||||||
EX hookset<void(cell*)> hooks_mouseover;
|
EX hookset<void(cell*)> hooks_mouseover;
|
||||||
|
|
||||||
|
EX hookset<bool()> hooks_global_mouseover;
|
||||||
|
|
||||||
template<class T> void set_help_to(T t) {
|
template<class T> void set_help_to(T t) {
|
||||||
help = bygen([t] {
|
help = bygen([t] {
|
||||||
gotoHelpFor(t);
|
gotoHelpFor(t);
|
||||||
@ -903,6 +905,8 @@ template<class T> void set_help_to(T t) {
|
|||||||
EX void describeMouseover() {
|
EX void describeMouseover() {
|
||||||
DEBBI(DF_GRAPH, ("describeMouseover"));
|
DEBBI(DF_GRAPH, ("describeMouseover"));
|
||||||
|
|
||||||
|
if(callhandlers(0, hooks_global_mouseover)) return;
|
||||||
|
|
||||||
cell *c = mousing ? mouseover : playermoved ? NULL : centerover;
|
cell *c = mousing ? mouseover : playermoved ? NULL : centerover;
|
||||||
string& out = mouseovers;
|
string& out = mouseovers;
|
||||||
if(!c || instat || getcstat != '-') { }
|
if(!c || instat || getcstat != '-') { }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user