MCPcopy Create free account
hub / github.com/DFHack/dfhack / list

Function list

plugins/hotkeys.cpp:120–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118};
119
120static void list(color_ostream &out) {
121 DEBUG(log).print("listing active hotkeys\n");
122 bool was_valid = valid;
123 if (!valid)
124 find_active_keybindings(out, Gui::getCurViewscreen(true), false);
125
126 out.print("Valid keybindings for the current focus:\n {}\n",
127 join_strings("\n", Gui::getCurFocus(true)));
128 std::for_each(sorted_keys.begin(), sorted_keys.end(), [&](const string &sym) {
129 out.print("{}: {}\n", sym, current_bindings[sym]);
130 });
131
132 if (!was_valid)
133 cleanupHotkeys(NULL);
134}
135
136static bool invoke_command(color_ostream &out, const size_t index) {
137 auto screen = Core::getTopViewscreen();

Callers 5

mainFunction · 0.85
print_stderrFunction · 0.85
hotkeys_cmdFunction · 0.85
consolidate_changelogFunction · 0.85

Calls 7

find_active_keybindingsFunction · 0.85
getCurFocusFunction · 0.85
cleanupHotkeysFunction · 0.85
join_stringsFunction · 0.50
printMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected