1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-22 01:17:39 +00:00

dialog:: find_highlight

This commit is contained in:
Zeno Rogue
2022-11-03 19:29:23 +01:00
parent 1482a7aca2
commit 3ab4915ff4
2 changed files with 6 additions and 1 deletions

View File

@@ -388,8 +388,12 @@ EX namespace dialog {
EX string highlight_text;
EX int highlight_key;
EX bool is_highlight(item& I) { return I.body == highlight_text && I.key == highlight_key; }
EX bool is_highlight(item& I) { return I.body == highlight_text && among(highlight_key, I.key, PSEUDOKEY_SELECT); }
EX void set_highlight(item& I) { highlight_text = I.body; highlight_key = I.key; }
EX void find_highlight(const string& s) {
println(hlog, "highlight_text set to ", s);
highlight_text = s; highlight_key = PSEUDOKEY_SELECT;
}
EX void measure() {
tothei = 0;