1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-28 08:03:18 +00:00

actions on title click allowed (unused)

This commit is contained in:
Zeno Rogue 2019-11-24 23:40:26 +01:00
parent 6331ca1e1d
commit ae92566255

View File

@ -120,6 +120,8 @@ EX namespace dialog {
EX item& lastItem() { return items[items.size() - 1]; }
EX item& titleItem() { return items[0]; }
EX map<int, reaction_t> key_actions;
EX void add_key_action(int key, const reaction_t& action) {
@ -421,7 +423,9 @@ EX namespace dialog {
int mid = (top + tothei) / 2;
I.position = mid;
if(I.type == diTitle || I.type == diInfo) {
bool xthis = (mousey >= top && mousey < tothei && I.key);
displayfr(dcenter, mid, 2, dfsize * I.scale/100, I.body, I.color, 8);
if(xthis) getcstat = I.key;
}
else if(I.type == diItem || I.type == diBigItem) {
bool xthis = (mousey >= top && mousey < tothei);