Disabled: Fixed an issue restoring Alpha in EndDisabled() when using nested BeginDisabled() calls with PushStyleVar(ImGuiStyleVar_DisabledAlpha) within. (#8454, #7640)
This commit is contained in:
@@ -103,6 +103,8 @@ Other changes:
|
|||||||
(#8451, #7660) [@achabense]
|
(#8451, #7660) [@achabense]
|
||||||
- TextLinkOpenURL(): fixed default Win32 io.PlatformOpenInShellFn handler to
|
- TextLinkOpenURL(): fixed default Win32 io.PlatformOpenInShellFn handler to
|
||||||
handle UTF-8 regardless of system regional settings. (#7660) [@achabense]
|
handle UTF-8 regardless of system regional settings. (#7660) [@achabense]
|
||||||
|
- Disabled: Fixed an issue restoring Alpha in EndDisabled() when using nested
|
||||||
|
BeginDisabled() calls with PushStyleVar(ImGuiStyleVar_DisabledAlpha) within. (#8454, #7640)
|
||||||
- Clipper: Fixed an issue where passing an out of bound index to IncludeItemByIndex()
|
- Clipper: Fixed an issue where passing an out of bound index to IncludeItemByIndex()
|
||||||
could incorrectly offset the final cursor, even if that index was not iterated through.
|
could incorrectly offset the final cursor, even if that index was not iterated through.
|
||||||
One case where it would manifest was calling Combo() with an out of range index. (#8450)
|
One case where it would manifest was calling Combo() with an out of range index. (#8450)
|
||||||
|
|||||||
@@ -7084,6 +7084,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|||||||
window_stack_data.Window = window;
|
window_stack_data.Window = window;
|
||||||
window_stack_data.ParentLastItemDataBackup = g.LastItemData;
|
window_stack_data.ParentLastItemDataBackup = g.LastItemData;
|
||||||
window_stack_data.DisabledOverrideReenable = (flags & ImGuiWindowFlags_Tooltip) && (g.CurrentItemFlags & ImGuiItemFlags_Disabled);
|
window_stack_data.DisabledOverrideReenable = (flags & ImGuiWindowFlags_Tooltip) && (g.CurrentItemFlags & ImGuiItemFlags_Disabled);
|
||||||
|
window_stack_data.DisabledOverrideReenableAlphaBackup = 0.0f;
|
||||||
ErrorRecoveryStoreState(&window_stack_data.StackSizesInBegin);
|
ErrorRecoveryStoreState(&window_stack_data.StackSizesInBegin);
|
||||||
g.StackSizesInBeginForCurrentWindow = &window_stack_data.StackSizesInBegin;
|
g.StackSizesInBeginForCurrentWindow = &window_stack_data.StackSizesInBegin;
|
||||||
if (flags & ImGuiWindowFlags_ChildMenu)
|
if (flags & ImGuiWindowFlags_ChildMenu)
|
||||||
@@ -7950,6 +7951,7 @@ void ImGui::BeginDisabledOverrideReenable()
|
|||||||
{
|
{
|
||||||
ImGuiContext& g = *GImGui;
|
ImGuiContext& g = *GImGui;
|
||||||
IM_ASSERT(g.CurrentItemFlags & ImGuiItemFlags_Disabled);
|
IM_ASSERT(g.CurrentItemFlags & ImGuiItemFlags_Disabled);
|
||||||
|
g.CurrentWindowStack.back().DisabledOverrideReenableAlphaBackup = g.Style.Alpha;
|
||||||
g.Style.Alpha = g.DisabledAlphaBackup;
|
g.Style.Alpha = g.DisabledAlphaBackup;
|
||||||
g.CurrentItemFlags &= ~ImGuiItemFlags_Disabled;
|
g.CurrentItemFlags &= ~ImGuiItemFlags_Disabled;
|
||||||
g.ItemFlagsStack.push_back(g.CurrentItemFlags);
|
g.ItemFlagsStack.push_back(g.CurrentItemFlags);
|
||||||
@@ -7963,7 +7965,7 @@ void ImGui::EndDisabledOverrideReenable()
|
|||||||
IM_ASSERT(g.DisabledStackSize > 0);
|
IM_ASSERT(g.DisabledStackSize > 0);
|
||||||
g.ItemFlagsStack.pop_back();
|
g.ItemFlagsStack.pop_back();
|
||||||
g.CurrentItemFlags = g.ItemFlagsStack.back();
|
g.CurrentItemFlags = g.ItemFlagsStack.back();
|
||||||
g.Style.Alpha = g.DisabledAlphaBackup * g.Style.DisabledAlpha;
|
g.Style.Alpha = g.CurrentWindowStack.back().DisabledOverrideReenableAlphaBackup;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImGui::PushTextWrapPos(float wrap_pos_x)
|
void ImGui::PushTextWrapPos(float wrap_pos_x)
|
||||||
|
|||||||
@@ -1316,6 +1316,7 @@ struct ImGuiWindowStackData
|
|||||||
ImGuiLastItemData ParentLastItemDataBackup;
|
ImGuiLastItemData ParentLastItemDataBackup;
|
||||||
ImGuiErrorRecoveryState StackSizesInBegin; // Store size of various stacks for asserting
|
ImGuiErrorRecoveryState StackSizesInBegin; // Store size of various stacks for asserting
|
||||||
bool DisabledOverrideReenable; // Non-child window override disabled flag
|
bool DisabledOverrideReenable; // Non-child window override disabled flag
|
||||||
|
float DisabledOverrideReenableAlphaBackup;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ImGuiShrinkWidthItem
|
struct ImGuiShrinkWidthItem
|
||||||
|
|||||||
Reference in New Issue
Block a user