MCPcopy Create free account
hub / github.com/cinder/Cinder / GetKeyMagnitude2d

Method GetKeyMagnitude2d

src/imgui/imgui.cpp:9341–9346  ·  view source on GitHub ↗

Return 2D vector representing the combination of four cardinal direction, with analog value support (for e.g. ImGuiKey_GamepadLStick* values).

Source from the content-addressed store, hash-verified

9339
9340// Return 2D vector representing the combination of four cardinal direction, with analog value support (for e.g. ImGuiKey_GamepadLStick* values).
9341ImVec2 ImGui::GetKeyMagnitude2d(ImGuiKey key_left, ImGuiKey key_right, ImGuiKey key_up, ImGuiKey key_down)
9342{
9343 return ImVec2(
9344 GetKeyData(key_right)->AnalogValue - GetKeyData(key_left)->AnalogValue,
9345 GetKeyData(key_down)->AnalogValue - GetKeyData(key_up)->AnalogValue);
9346}
9347
9348// Rewrite routing data buffers to strip old entries + sort by key to make queries not touch scattered data.
9349// Entries D,A,B,B,A,C,B --> A,A,B,B,B,C,D

Callers

nothing calls this directly

Calls 2

ImVec2Function · 0.85
GetKeyDataFunction · 0.85

Tested by

no test coverage detected