Added ImGuiKey_MouseXXX aliases. (#4921) Reworked SetItemUsingMouseWheel() to use this for ActiveId. (#2891)
The rework of SetItemUsingMouseWheel() is half-complete since there's a HoveredIdUsingMouseWheel component. This will however be totally cleaned when we transtion to InputOwner system.
IM_ASSERT(&g.IO==this&&"Can only add events to current context.");
IM_ASSERT(ImGui::IsNamedKey(key));// Backend needs to pass a valid ImGuiKey_ constant. 0..511 values are legacy native key codes which are not accepted by this API.
IM_ASSERT(!ImGui::IsAliasKey(key));// Backend cannot submit ImGuiKey_MouseXXX values they are automatically inferred from AddMouseXXX() events.
// Verify that backend isn't mixing up using new io.AddKeyEvent() api and old io.KeysDown[] + io.KeyMap[] data.
Text("HoveredId: 0x%08X (%.2f sec), AllowOverlap: %d",g.HoveredIdPreviousFrame,g.HoveredIdTimer,g.HoveredIdAllowOverlap);// Not displaying g.HoveredId as it is update mid-frame
ImGuiInputReadFlags_Repeat=1<<0,// Return true on successive repeats. Default for legacy IsKeyPressed(). NOT Default for legacy IsMouseClicked(). MUST BE == 1.
floatLastActiveIdTimer;// Store the last non-zero ActiveId timer since the beginning of activation, useful for animation.
// Input Ownership
boolActiveIdUsingMouseWheel;// Active widget will want to read mouse wheel. Blocks scrolling the underlying window.
ImU32ActiveIdUsingNavDirMask;// Active widget will want to read those nav move requests (e.g. can activate a button and move away from it)
ImBitArrayForNamedKeysActiveIdUsingKeyInputMask;// Active widget will want to read those key inputs. When we grow the ImGuiKey enum we'll need to either to order the enum to make useful keys come first, either redesign this into e.g. a small array.