mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
dialog:: find_highlight
This commit is contained in:
parent
1482a7aca2
commit
3ab4915ff4
@ -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;
|
||||
|
@ -244,6 +244,7 @@
|
||||
#define PSEUDOKEY_MENU 2505
|
||||
#define PSEUDOKEY_NOHINT 2506
|
||||
#define PSEUDOKEY_LIST_SLIDER 2507
|
||||
#define PSEUDOKEY_SELECT 2508
|
||||
|
||||
#ifndef CAP_PNG
|
||||
#define CAP_PNG (!ISMOBWEB)
|
||||
|
Loading…
Reference in New Issue
Block a user