mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-31 03:20:05 +00:00
Merge branch 'master' into docking
# Conflicts: # imgui.cpp # imgui.h # imgui_internal.h # imgui_widgets.cpp
This commit is contained in:
commit
c191faf0ba
7 changed files with 223 additions and 100 deletions
14
imgui.cpp
14
imgui.cpp
|
|
@ -5419,6 +5419,12 @@ void ImGui::SetActiveIdUsingAllKeyboardKeys()
|
|||
NavMoveRequestCancel();
|
||||
}
|
||||
|
||||
ImGuiID ImGui::GetItemID()
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
return g.LastItemData.ID;
|
||||
}
|
||||
|
||||
ImVec2 ImGui::GetItemRectMin()
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
|
|
@ -6206,8 +6212,8 @@ void ImGui::RenderWindowDecorations(ImGuiWindow* window, const ImRect& title_bar
|
|||
}
|
||||
}
|
||||
|
||||
// Render title text, collapse button, close button
|
||||
// When inside a dock node, this is handled in DockNodeCalcTabBarLayout() instead.
|
||||
// Render title text, collapse button, close button
|
||||
void ImGui::RenderWindowTitleBarContents(ImGuiWindow* window, const ImRect& title_bar_rect, const char* name, bool* p_open)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
|
|
@ -9382,8 +9388,6 @@ void ImGui::SetItemKeyOwner(ImGuiKey key, ImGuiInputFlags flags)
|
|||
}
|
||||
}
|
||||
|
||||
// - Need to decide how to handle shortcut translations for Non-Mac <> Mac
|
||||
// - Ideas: https://github.com/ocornut/imgui/issues/456#issuecomment-264390864
|
||||
bool ImGui::Shortcut(ImGuiKeyChord key_chord, ImGuiID owner_id, ImGuiInputFlags flags)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
|
|
@ -9405,7 +9409,7 @@ bool ImGui::Shortcut(ImGuiKeyChord key_chord, ImGuiID owner_id, ImGuiInputFlags
|
|||
if (key == ImGuiKey_None)
|
||||
key = ConvertSingleModFlagToKey(mods);
|
||||
|
||||
if (!IsKeyPressed(key, owner_id, (flags & (ImGuiInputFlags_Repeat | ImGuiInputFlags_RepeatRateMask_))))
|
||||
if (!IsKeyPressed(key, owner_id, (flags & (ImGuiInputFlags_Repeat | (ImGuiInputFlags)ImGuiInputFlags_RepeatRateMask_))))
|
||||
return false;
|
||||
IM_ASSERT((flags & ~ImGuiInputFlags_SupportedByShortcut) == 0); // Passing flags not supported by this function!
|
||||
|
||||
|
|
@ -11846,7 +11850,7 @@ void ImGui::NavUpdateCreateMoveRequest()
|
|||
g.NavMoveScrollFlags = ImGuiScrollFlags_None;
|
||||
if (window && !g.NavWindowingTarget && !(window->Flags & ImGuiWindowFlags_NoNavInputs))
|
||||
{
|
||||
const ImGuiInputFlags repeat_mode = ImGuiInputFlags_Repeat | ImGuiInputFlags_RepeatRateNavMove;
|
||||
const ImGuiInputFlags repeat_mode = ImGuiInputFlags_Repeat | (ImGuiInputFlags)ImGuiInputFlags_RepeatRateNavMove;
|
||||
if (!IsActiveIdUsingNavDir(ImGuiDir_Left) && ((nav_gamepad_active && IsKeyPressed(ImGuiKey_GamepadDpadLeft, ImGuiKeyOwner_None, repeat_mode)) || (nav_keyboard_active && IsKeyPressed(ImGuiKey_LeftArrow, ImGuiKeyOwner_None, repeat_mode)))) { g.NavMoveDir = ImGuiDir_Left; }
|
||||
if (!IsActiveIdUsingNavDir(ImGuiDir_Right) && ((nav_gamepad_active && IsKeyPressed(ImGuiKey_GamepadDpadRight, ImGuiKeyOwner_None, repeat_mode)) || (nav_keyboard_active && IsKeyPressed(ImGuiKey_RightArrow, ImGuiKeyOwner_None, repeat_mode)))) { g.NavMoveDir = ImGuiDir_Right; }
|
||||
if (!IsActiveIdUsingNavDir(ImGuiDir_Up) && ((nav_gamepad_active && IsKeyPressed(ImGuiKey_GamepadDpadUp, ImGuiKeyOwner_None, repeat_mode)) || (nav_keyboard_active && IsKeyPressed(ImGuiKey_UpArrow, ImGuiKeyOwner_None, repeat_mode)))) { g.NavMoveDir = ImGuiDir_Up; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue