| 922 | } |
| 923 | |
| 924 | bool Gui::matchFocusString(std::string focus_string, df::viewscreen *top) { |
| 925 | if (!top) |
| 926 | top = getCurViewscreen(true); |
| 927 | |
| 928 | if (!cached_focus_strings.contains(top)) |
| 929 | cached_focus_strings[top] = getFocusStrings(top); |
| 930 | |
| 931 | vector<string> &cached = cached_focus_strings[top]; |
| 932 | return std::find_if(cached.begin(), cached.end(), [&focus_string](const std::string &item) { |
| 933 | return prefix_matches(focus_string, item); |
| 934 | }) != cached.end(); |
| 935 | } |
| 936 | |
| 937 | static void push_dfhack_focus_string(dfhack_viewscreen *vs, std::vector<std::string> &focusStrings) |
| 938 | { |
nothing calls this directly
no test coverage detected