mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-26 17:46:35 +00:00
Internals: reduced side-effects of setting window->HiddenFramesForRenderOnly > 0
This commit is contained in:
parent
248ed1b01d
commit
06d5f9297d
@ -7070,7 +7070,8 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|||||||
window->HiddenFramesCanSkipItems = 1;
|
window->HiddenFramesCanSkipItems = 1;
|
||||||
|
|
||||||
// Update the Hidden flag
|
// Update the Hidden flag
|
||||||
window->Hidden = (window->HiddenFramesCanSkipItems > 0) || (window->HiddenFramesCannotSkipItems > 0) || (window->HiddenFramesForRenderOnly > 0);
|
bool hidden_regular = (window->HiddenFramesCanSkipItems > 0) || (window->HiddenFramesCannotSkipItems > 0);
|
||||||
|
window->Hidden = hidden_regular || (window->HiddenFramesForRenderOnly > 0);
|
||||||
|
|
||||||
// Disable inputs for requested number of frames
|
// Disable inputs for requested number of frames
|
||||||
if (window->DisableInputsFrames > 0)
|
if (window->DisableInputsFrames > 0)
|
||||||
@ -7081,7 +7082,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|||||||
|
|
||||||
// Update the SkipItems flag, used to early out of all items functions (no layout required)
|
// Update the SkipItems flag, used to early out of all items functions (no layout required)
|
||||||
bool skip_items = false;
|
bool skip_items = false;
|
||||||
if (window->Collapsed || !window->Active || window->Hidden)
|
if (window->Collapsed || !window->Active || hidden_regular)
|
||||||
if (window->AutoFitFramesX <= 0 && window->AutoFitFramesY <= 0 && window->HiddenFramesCannotSkipItems <= 0)
|
if (window->AutoFitFramesX <= 0 && window->AutoFitFramesY <= 0 && window->HiddenFramesCannotSkipItems <= 0)
|
||||||
skip_items = true;
|
skip_items = true;
|
||||||
window->SkipItems = skip_items;
|
window->SkipItems = skip_items;
|
||||||
|
2
imgui.h
2
imgui.h
@ -65,7 +65,7 @@ Index of this file:
|
|||||||
// Version
|
// Version
|
||||||
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals. Work in progress versions typically starts at XYY99 then bounce up to XYY00, XYY01 etc. when release tagging happens)
|
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals. Work in progress versions typically starts at XYY99 then bounce up to XYY00, XYY01 etc. when release tagging happens)
|
||||||
#define IMGUI_VERSION "1.86 WIP"
|
#define IMGUI_VERSION "1.86 WIP"
|
||||||
#define IMGUI_VERSION_NUM 18521
|
#define IMGUI_VERSION_NUM 18522
|
||||||
#define IMGUI_CHECKVERSION() ImGui::DebugCheckVersionAndDataLayout(IMGUI_VERSION, sizeof(ImGuiIO), sizeof(ImGuiStyle), sizeof(ImVec2), sizeof(ImVec4), sizeof(ImDrawVert), sizeof(ImDrawIdx))
|
#define IMGUI_CHECKVERSION() ImGui::DebugCheckVersionAndDataLayout(IMGUI_VERSION, sizeof(ImGuiIO), sizeof(ImGuiStyle), sizeof(ImVec2), sizeof(ImVec4), sizeof(ImDrawVert), sizeof(ImDrawIdx))
|
||||||
#define IMGUI_HAS_TABLE
|
#define IMGUI_HAS_TABLE
|
||||||
#define IMGUI_HAS_VIEWPORT // Viewport WIP branch
|
#define IMGUI_HAS_VIEWPORT // Viewport WIP branch
|
||||||
|
Loading…
Reference in New Issue
Block a user