MCPcopy Create free account
hub / github.com/RenderKit/embree / GetKeyChordName

Method GetKeyChordName

tutorials/common/imgui/imgui.cpp:7960–7969  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7958}
7959
7960void ImGui::GetKeyChordName(ImGuiKeyChord key_chord, char* out_buf, int out_buf_size)
7961{
7962 ImGuiContext& g = *GImGui;
7963 ImFormatString(out_buf, (size_t)out_buf_size, "%s%s%s%s%s",
7964 (key_chord & ImGuiMod_Ctrl) ? "Ctrl+" : "",
7965 (key_chord & ImGuiMod_Shift) ? "Shift+" : "",
7966 (key_chord & ImGuiMod_Alt) ? "Alt+" : "",
7967 (key_chord & ImGuiMod_Super) ? (g.IO.ConfigMacOSXBehaviors ? "Cmd+" : "Super+") : "",
7968 GetKeyName((ImGuiKey)(key_chord & ~ImGuiMod_Mask_)));
7969}
7970
7971// t0 = previous time (e.g.: g.Time - g.IO.DeltaTime)
7972// t1 = current time (e.g.: g.Time)

Callers

nothing calls this directly

Calls 1

ImFormatStringFunction · 0.85

Tested by

no test coverage detected