mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-09 23:54:20 +00:00
Windows: store BgClickFlags which allows the equivalent of io.ConfigWindowsMoveFromTitleBarOnly to be overridden on a per window basis. (#899, #3071, #5044, + #3379)
io.ConfigWindowsMoveFromTitleBarOnly now sets initial value for BgClickFlags. Using e.g. ImGui::GetCurrentWindow()->BgClickFlags &= ~ImGuiWindowBgClickFlags_Move; allow per-window override. This will be extended for supporting scrolling options for #3379. As a minor side effect: the effect of enabling io.ConfigWindowsMoveFromTitleBarOnly now happens one frame later ('window_modal_bounds_exceeding_work_area" test accidentally broke in some situations because of that)
This commit is contained in:
parent
245e12cca7
commit
40f9e4e8e2
2 changed files with 16 additions and 4 deletions
|
|
@ -209,6 +209,7 @@ typedef int ImGuiSeparatorFlags; // -> enum ImGuiSeparatorFlags_ // F
|
|||
typedef int ImGuiTextFlags; // -> enum ImGuiTextFlags_ // Flags: for TextEx()
|
||||
typedef int ImGuiTooltipFlags; // -> enum ImGuiTooltipFlags_ // Flags: for BeginTooltipEx()
|
||||
typedef int ImGuiTypingSelectFlags; // -> enum ImGuiTypingSelectFlags_ // Flags: for GetTypingSelectRequest()
|
||||
typedef int ImGuiWindowBgClickFlags; // -> enum ImGuiWindowBgClickFlags_ // Flags: for overriding behavior of clicking on window background/void.
|
||||
typedef int ImGuiWindowRefreshFlags; // -> enum ImGuiWindowRefreshFlags_ // Flags: for SetNextWindowRefreshPolicy()
|
||||
|
||||
// Table column indexing
|
||||
|
|
@ -1283,6 +1284,12 @@ enum ImGuiWindowRefreshFlags_
|
|||
// Refresh policy/frequency, Load Balancing etc.
|
||||
};
|
||||
|
||||
enum ImGuiWindowBgClickFlags_
|
||||
{
|
||||
ImGuiWindowBgClickFlags_None = 0,
|
||||
ImGuiWindowBgClickFlags_Move = 1 << 0, // Click on bg/void + drag to move window. Cleared by default when using io.ConfigWindowsMoveFromTitleBarOnly.
|
||||
};
|
||||
|
||||
enum ImGuiNextWindowDataFlags_
|
||||
{
|
||||
ImGuiNextWindowDataFlags_None = 0,
|
||||
|
|
@ -2662,6 +2669,7 @@ struct IMGUI_API ImGuiWindow
|
|||
ImS8 HiddenFramesCannotSkipItems; // Hide the window for N frames while allowing items to be submitted so we can measure their size
|
||||
ImS8 HiddenFramesForRenderOnly; // Hide the window until frame N at Render() time only
|
||||
ImS8 DisableInputsFrames; // Disable window interactions for N frames
|
||||
ImGuiWindowBgClickFlags BgClickFlags : 8; // Configure behavior of click+dragging on window bg/void or over items. Default sets by io.ConfigWindowsMoveFromTitleBarOnly. If you use this please report in #3379.
|
||||
ImGuiCond SetWindowPosAllowFlags : 8; // store acceptable condition flags for SetNextWindowPos() use.
|
||||
ImGuiCond SetWindowSizeAllowFlags : 8; // store acceptable condition flags for SetNextWindowSize() use.
|
||||
ImGuiCond SetWindowCollapsedAllowFlags : 8; // store acceptable condition flags for SetNextWindowCollapsed() use.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue