MCPcopy Create free account
hub / github.com/OpenBoardView/OpenBoardView / to_string

Method to_string

src/openboardview/UI/Keyboard/KeyBinding.cpp:30–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30std::string KeyBinding::to_string() const {
31 std::string keys = (this->getKey() == ImGuiKey_None) ? "" : ImGui::GetKeyName(this->getKey());
32
33 auto modifiers = this->getModifiers();
34 for (auto im = modifiers.rbegin(); im != modifiers.rend(); ++im ) {
35 keys = std::string(ImGui::GetKeyName(*im)) + "+" + keys;
36 }
37
38 return keys;
39}

Callers 2

getKeyNamesMethod · 0.80
renderMethod · 0.80

Calls 2

getKeyMethod · 0.95
getModifiersMethod · 0.95

Tested by

no test coverage detected