|
|
@@ -384,7 +384,15 @@ CODE
|
|
|
When you are not sure about an old symbol or function name, try using the Search/Find function of your IDE to look for comments or references in all imgui files.
|
|
|
You can read releases logs https://github.com/ocornut/imgui/releases for more details.
|
|
|
|
|
|
- - 2022/07/08 (1.88) - inputs: removed io.NavInputs[] and ImGuiNavInput enum (following 1.87 changes).
|
|
|
+ - 2022/08/03 (1.89) - changed signature of ImageButton() function. Kept redirection function (will obsolete).
|
|
|
+ - added 'const char* str_id' parameter + removed 'int frame_padding = -1' parameter.
|
|
|
+ - old signature: bool ImageButton(ImTextureID tex_id, ImVec2 size, ImVec2 uv0 = ImVec2(0,0), ImVec2 uv1 = ImVec2(1,1), int frame_padding = -1, ImVec4 bg_col = ImVec4(0,0,0,0), ImVec4 tint_col = ImVec4(1,1,1,1));
|
|
|
+ - used the ImTextureID value to create an ID. This was inconsistent with other functions, led to ID conflicts, and caused problems with engines using transient ImTextureID values.
|
|
|
+ - had a FramePadding override which was inconsistent with other functions and made the already-long signature even longer.
|
|
|
+ - new signature: bool ImageButton(const char* str_id, ImTextureID tex_id, ImVec2 size, ImVec2 uv0 = ImVec2(0,0), ImVec2 uv1 = ImVec2(1,1), ImVec4 bg_col = ImVec4(0,0,0,0), ImVec4 tint_col = ImVec4(1,1,1,1));
|
|
|
+ - requires an explicit identifier. You may still use e.g. PushID() calls and then pass an empty identifier.
|
|
|
+ - always uses style.FramePadding for padding, to be consistent with other buttons. You may use PushStyleVar() to alter this.
|
|
|
+ - 2022/07/08 (1.89) - inputs: removed io.NavInputs[] and ImGuiNavInput enum (following 1.87 changes).
|
|
|
- Official backends from 1.87+ -> no issue.
|
|
|
- Official backends from 1.60 to 1.86 -> will build and convert gamepad inputs, unless IMGUI_DISABLE_OBSOLETE_KEYIO is defined. Need updating!
|
|
|
- Custom backends not writing to io.NavInputs[] -> no issue.
|
|
|
@@ -1158,6 +1166,8 @@ ImGuiIO::ImGuiIO()
|
|
|
#endif
|
|
|
ConfigInputTrickleEventQueue = true;
|
|
|
ConfigInputTextCursorBlink = true;
|
|
|
+ ConfigInputTextEnterKeepActive = false;
|
|
|
+ ConfigDragClickToInputText = false;
|
|
|
ConfigWindowsResizeFromEdges = true;
|
|
|
ConfigWindowsMoveFromTitleBarOnly = false;
|
|
|
ConfigMemoryCompactTimer = 60.0f;
|
|
|
@@ -3856,7 +3866,7 @@ void ImGui::StartMouseMovingWindow(ImGuiWindow* window)
|
|
|
g.NavDisableHighlight = true;
|
|
|
g.ActiveIdClickOffset = g.IO.MouseClickedPos[0] - window->RootWindow->Pos;
|
|
|
g.ActiveIdNoClearOnFocusLoss = true;
|
|
|
- SetActiveIdUsingNavAndKeys();
|
|
|
+ SetActiveIdUsingAllKeyboardKeys();
|
|
|
|
|
|
bool can_move_window = true;
|
|
|
if ((window->Flags & ImGuiWindowFlags_NoMove) || (window->RootWindow->Flags & ImGuiWindowFlags_NoMove))
|
|
|
@@ -5227,12 +5237,17 @@ void ImGui::SetItemUsingMouseWheel()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-void ImGui::SetActiveIdUsingNavAndKeys()
|
|
|
+// FIXME: Technically this also prevents use of Gamepad D-Pad, may not be an issue.
|
|
|
+void ImGui::SetActiveIdUsingAllKeyboardKeys()
|
|
|
{
|
|
|
ImGuiContext& g = *GImGui;
|
|
|
IM_ASSERT(g.ActiveId != 0);
|
|
|
g.ActiveIdUsingNavDirMask = ~(ImU32)0;
|
|
|
- g.ActiveIdUsingKeyInputMask.SetAllBits();
|
|
|
+ g.ActiveIdUsingKeyInputMask.SetBitRange(ImGuiKey_Keyboard_BEGIN, ImGuiKey_Keyboard_END);
|
|
|
+ g.ActiveIdUsingKeyInputMask.SetBit(ImGuiKey_ModCtrl);
|
|
|
+ g.ActiveIdUsingKeyInputMask.SetBit(ImGuiKey_ModShift);
|
|
|
+ g.ActiveIdUsingKeyInputMask.SetBit(ImGuiKey_ModAlt);
|
|
|
+ g.ActiveIdUsingKeyInputMask.SetBit(ImGuiKey_ModSuper);
|
|
|
NavMoveRequestCancel();
|
|
|
}
|
|
|
|
|
|
@@ -5476,7 +5491,6 @@ static ImGuiWindow* CreateNewWindow(const char* name, ImGuiWindowFlags flags)
|
|
|
g.Windows.push_front(window); // Quite slow but rare and only once
|
|
|
else
|
|
|
g.Windows.push_back(window);
|
|
|
- UpdateWindowInFocusOrderList(window, true, window->Flags);
|
|
|
|
|
|
return window;
|
|
|
}
|
|
|
@@ -6089,8 +6103,6 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|
|
const bool window_just_created = (window == NULL);
|
|
|
if (window_just_created)
|
|
|
window = CreateNewWindow(name, flags);
|
|
|
- else
|
|
|
- UpdateWindowInFocusOrderList(window, window_just_created, flags);
|
|
|
|
|
|
// Automatically disable manual moving/resizing when NoInputs is set
|
|
|
if ((flags & ImGuiWindowFlags_NoInputs) == ImGuiWindowFlags_NoInputs)
|
|
|
@@ -6118,6 +6130,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|
|
// Update Flags, LastFrameActive, BeginOrderXXX fields
|
|
|
if (first_begin_of_the_frame)
|
|
|
{
|
|
|
+ UpdateWindowInFocusOrderList(window, window_just_created, flags);
|
|
|
window->Flags = (ImGuiWindowFlags)flags;
|
|
|
window->LastFrameActive = current_frame;
|
|
|
window->LastTimeActive = (float)g.Time;
|
|
|
@@ -11212,7 +11225,7 @@ bool ImGui::BeginDragDropSource(ImGuiDragDropFlags flags)
|
|
|
source_drag_active = IsMouseDragging(mouse_button);
|
|
|
|
|
|
// Disable navigation and key inputs while dragging + cancel existing request if any
|
|
|
- SetActiveIdUsingNavAndKeys();
|
|
|
+ SetActiveIdUsingAllKeyboardKeys();
|
|
|
}
|
|
|
else
|
|
|
{
|