mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-17 01:04:19 +00:00
parent
5a7d18a441
commit
2e01952b35
2 changed files with 3 additions and 6 deletions
|
|
@ -7171,12 +7171,9 @@ void ImGui::BeginDisabled(bool disabled)
|
|||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
bool was_disabled = (g.CurrentItemFlags & ImGuiItemFlags_Disabled) != 0;
|
||||
g.DisabledAlphaBackup = g.Style.Alpha;
|
||||
if (!was_disabled && disabled)
|
||||
{
|
||||
//PushStyleVar(ImGuiStyleVar_Alpha, g.Style.Alpha * g.Style.DisabledAlpha);
|
||||
g.DisabledAlphaBackup = g.Style.Alpha;
|
||||
g.Style.Alpha *= g.Style.DisabledAlpha;
|
||||
}
|
||||
g.Style.Alpha *= g.Style.DisabledAlpha; // PushStyleVar(ImGuiStyleVar_Alpha, g.Style.Alpha * g.Style.DisabledAlpha);
|
||||
//PushItemFlag(ImGuiItemFlags_Disabled, was_disabled || disabled);
|
||||
g.CurrentItemFlags |= ImGuiItemFlags_Disabled;
|
||||
g.ItemFlagsStack.push_back(g.CurrentItemFlags);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue