mirror of
https://github.com/ocornut/imgui.git
synced 2026-07-05 09:05:20 +00:00
Docking: minor packing of AuthorityForXXX fields.
This commit is contained in:
@@ -21013,8 +21013,8 @@ void ImGui::DockBuilderRemoveNodeChildNodes(ImGuiID root_id)
|
||||
return;
|
||||
bool has_central_node = false;
|
||||
|
||||
ImGuiDataAuthority backup_root_node_authority_for_pos = root_node ? root_node->AuthorityForPos : ImGuiDataAuthority_Auto;
|
||||
ImGuiDataAuthority backup_root_node_authority_for_size = root_node ? root_node->AuthorityForSize : ImGuiDataAuthority_Auto;
|
||||
ImGuiDataAuthority backup_root_node_authority_for_pos = root_node ? (ImGuiDataAuthority_)root_node->AuthorityForPos : ImGuiDataAuthority_Auto;
|
||||
ImGuiDataAuthority backup_root_node_authority_for_size = root_node ? (ImGuiDataAuthority_)root_node->AuthorityForSize : ImGuiDataAuthority_Auto;
|
||||
|
||||
// Process active windows
|
||||
ImVector<ImGuiDockNode*> nodes_to_remove;
|
||||
@@ -21041,8 +21041,8 @@ void ImGui::DockBuilderRemoveNodeChildNodes(ImGuiID root_id)
|
||||
// Make sure we don't lose our current pos/size. (FIXME-DOCK: Consider tidying up that code in DockNodeAddWindow instead)
|
||||
if (root_node)
|
||||
{
|
||||
root_node->AuthorityForPos = backup_root_node_authority_for_pos;
|
||||
root_node->AuthorityForSize = backup_root_node_authority_for_size;
|
||||
root_node->AuthorityForPos = (ImU8)backup_root_node_authority_for_pos;
|
||||
root_node->AuthorityForSize = (ImU8)backup_root_node_authority_for_size;
|
||||
}
|
||||
|
||||
// Apply to settings
|
||||
|
||||
@@ -198,7 +198,7 @@ struct ImGuiWindowSettings; // Storage for a window .ini settings (we ke
|
||||
// Enumerations
|
||||
// Use your programming IDE "Go to definition" facility on the names of the center columns to find the actual flags/enum lists.
|
||||
enum ImGuiLocKey : int; // -> enum ImGuiLocKey // Enum: a localization entry for translation.
|
||||
typedef int ImGuiDataAuthority; // -> enum ImGuiDataAuthority_ // Enum: for storing the source authority (dock node vs window) of a field
|
||||
typedef unsigned int ImGuiDataAuthority;// -> enum ImGuiDataAuthority_ // Enum: for storing the source authority (dock node vs window) of a field
|
||||
typedef int ImGuiLayoutType; // -> enum ImGuiLayoutType_ // Enum: Horizontal or vertical
|
||||
|
||||
// Flags
|
||||
@@ -2091,9 +2091,9 @@ struct IMGUI_API ImGuiDockNode
|
||||
ImGuiID SelectedTabId; // [Leaf node only] Which of our tab/window is selected.
|
||||
ImGuiID WantCloseTabId; // [Leaf node only] Set when closing a specific tab/window.
|
||||
ImGuiID RefViewportId; // Reference viewport ID from visible window when HostWindow == NULL.
|
||||
ImGuiDataAuthority AuthorityForPos :3;
|
||||
ImGuiDataAuthority AuthorityForSize :3;
|
||||
ImGuiDataAuthority AuthorityForViewport :3;
|
||||
ImU8 AuthorityForPos :3; // ImGuiDataAuthority
|
||||
ImU8 AuthorityForSize :3;
|
||||
ImU8 AuthorityForViewport :3;
|
||||
bool IsVisible :1; // Set to false when the node is hidden (usually disabled as it has no active window)
|
||||
bool IsFocused :1;
|
||||
bool IsBgDrawnThisFrame :1;
|
||||
|
||||
Reference in New Issue
Block a user