MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / ConvertSingleModFlagToKey

Function ConvertSingleModFlagToKey

KBotExt/imgui/imgui_internal.h:2967–2976  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2965 inline bool IsAliasKey(ImGuiKey key) { return key >= ImGuiKey_Aliases_BEGIN && key < ImGuiKey_Aliases_END; }
2966 inline ImGuiKeyChord ConvertShortcutMod(ImGuiKeyChord key_chord) { ImGuiContext& g = *GImGui; IM_ASSERT_PARANOID(key_chord & ImGuiMod_Shortcut); return (key_chord & ~ImGuiMod_Shortcut) | (g.IO.ConfigMacOSXBehaviors ? ImGuiMod_Super : ImGuiMod_Ctrl); }
2967 inline ImGuiKey ConvertSingleModFlagToKey(ImGuiContext* ctx, ImGuiKey key)
2968 {
2969 ImGuiContext& g = *ctx;
2970 if (key == ImGuiMod_Ctrl) return ImGuiKey_ReservedForModCtrl;
2971 if (key == ImGuiMod_Shift) return ImGuiKey_ReservedForModShift;
2972 if (key == ImGuiMod_Alt) return ImGuiKey_ReservedForModAlt;
2973 if (key == ImGuiMod_Super) return ImGuiKey_ReservedForModSuper;
2974 if (key == ImGuiMod_Shortcut) return (g.IO.ConfigMacOSXBehaviors ? ImGuiKey_ReservedForModSuper : ImGuiKey_ReservedForModCtrl);
2975 return key;
2976 }
2977
2978 IMGUI_API ImGuiKeyData* GetKeyData(ImGuiContext* ctx, ImGuiKey key);
2979 inline ImGuiKeyData* GetKeyData(ImGuiKey key) { ImGuiContext& g = *GImGui; return GetKeyData(&g, key); }

Callers 5

GetKeyDataMethod · 0.85
GetKeyNameMethod · 0.85
ShortcutMethod · 0.85
GetKeyOwnerDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected