|
|
@ -5523,7 +5523,7 @@ static bool ImGui::UpdateWindowManualResize(ImGuiWindow* window, const ImVec2& s
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ImVec2 nav_resize_delta;
|
|
|
|
ImVec2 nav_resize_delta;
|
|
|
|
if (g.NavInputSource == ImGuiInputSource_Keyboard && g.IO.KeyShift)
|
|
|
|
if (g.NavInputSource == ImGuiInputSource_Keyboard && g.IO.KeyShift)
|
|
|
|
nav_resize_delta = GetNavInputAmount2d(ImGuiNavDirSourceFlags_Keyboard, ImGuiInputReadMode_Down);
|
|
|
|
nav_resize_delta = GetNavInputAmount2d(ImGuiNavDirSourceFlags_RawKeyboard, ImGuiInputReadMode_Down);
|
|
|
|
if (g.NavInputSource == ImGuiInputSource_Gamepad)
|
|
|
|
if (g.NavInputSource == ImGuiInputSource_Gamepad)
|
|
|
|
nav_resize_delta = GetNavInputAmount2d(ImGuiNavDirSourceFlags_PadDPad, ImGuiInputReadMode_Down);
|
|
|
|
nav_resize_delta = GetNavInputAmount2d(ImGuiNavDirSourceFlags_PadDPad, ImGuiInputReadMode_Down);
|
|
|
|
if (nav_resize_delta.x != 0.0f || nav_resize_delta.y != 0.0f)
|
|
|
|
if (nav_resize_delta.x != 0.0f || nav_resize_delta.y != 0.0f)
|
|
|
@ -9335,6 +9335,8 @@ float ImGui::GetNavInputAmount(ImGuiNavInput n, ImGuiInputReadMode mode)
|
|
|
|
ImVec2 ImGui::GetNavInputAmount2d(ImGuiNavDirSourceFlags dir_sources, ImGuiInputReadMode mode, float slow_factor, float fast_factor)
|
|
|
|
ImVec2 ImGui::GetNavInputAmount2d(ImGuiNavDirSourceFlags dir_sources, ImGuiInputReadMode mode, float slow_factor, float fast_factor)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ImVec2 delta(0.0f, 0.0f);
|
|
|
|
ImVec2 delta(0.0f, 0.0f);
|
|
|
|
|
|
|
|
if (dir_sources & ImGuiNavDirSourceFlags_RawKeyboard)
|
|
|
|
|
|
|
|
delta += ImVec2((float)IsKeyDown(GetKeyIndex(ImGuiKey_RightArrow)) - (float)IsKeyDown(GetKeyIndex(ImGuiKey_LeftArrow)), (float)IsKeyDown(GetKeyIndex(ImGuiKey_DownArrow)) - (float)IsKeyDown(GetKeyIndex(ImGuiKey_UpArrow)));
|
|
|
|
if (dir_sources & ImGuiNavDirSourceFlags_Keyboard)
|
|
|
|
if (dir_sources & ImGuiNavDirSourceFlags_Keyboard)
|
|
|
|
delta += ImVec2(GetNavInputAmount(ImGuiNavInput_KeyRight_, mode) - GetNavInputAmount(ImGuiNavInput_KeyLeft_, mode), GetNavInputAmount(ImGuiNavInput_KeyDown_, mode) - GetNavInputAmount(ImGuiNavInput_KeyUp_, mode));
|
|
|
|
delta += ImVec2(GetNavInputAmount(ImGuiNavInput_KeyRight_, mode) - GetNavInputAmount(ImGuiNavInput_KeyLeft_, mode), GetNavInputAmount(ImGuiNavInput_KeyDown_, mode) - GetNavInputAmount(ImGuiNavInput_KeyUp_, mode));
|
|
|
|
if (dir_sources & ImGuiNavDirSourceFlags_PadDPad)
|
|
|
|
if (dir_sources & ImGuiNavDirSourceFlags_PadDPad)
|
|
|
@ -10101,7 +10103,7 @@ static void ImGui::NavUpdateWindowing()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ImVec2 move_delta;
|
|
|
|
ImVec2 move_delta;
|
|
|
|
if (g.NavInputSource == ImGuiInputSource_Keyboard && !io.KeyShift)
|
|
|
|
if (g.NavInputSource == ImGuiInputSource_Keyboard && !io.KeyShift)
|
|
|
|
move_delta = GetNavInputAmount2d(ImGuiNavDirSourceFlags_Keyboard, ImGuiInputReadMode_Down);
|
|
|
|
move_delta = GetNavInputAmount2d(ImGuiNavDirSourceFlags_RawKeyboard, ImGuiInputReadMode_Down);
|
|
|
|
if (g.NavInputSource == ImGuiInputSource_Gamepad)
|
|
|
|
if (g.NavInputSource == ImGuiInputSource_Gamepad)
|
|
|
|
move_delta = GetNavInputAmount2d(ImGuiNavDirSourceFlags_PadLStick, ImGuiInputReadMode_Down);
|
|
|
|
move_delta = GetNavInputAmount2d(ImGuiNavDirSourceFlags_PadLStick, ImGuiInputReadMode_Down);
|
|
|
|
if (move_delta.x != 0.0f || move_delta.y != 0.0f)
|
|
|
|
if (move_delta.x != 0.0f || move_delta.y != 0.0f)
|
|
|
|