//ImGui::PushItemWidth(ImGui::GetWindowWidth() * 0.65f); // Use 2/3 of the space for widgets and 1/3 for labels (default)
//ImGui::PushItemWidth(ImGui::GetWindowWidth() * 0.65f); // Use 2/3 of the space for widgets and 1/3 for labels (default)
ImGui::PushItemWidth(ImGui::GetFontSize()*-12);// Use fixed width for labels (by passing a negative value), the rest goes to widgets. We choose a width proportional to our font size.
ImGui::PushItemWidth(ImGui::GetFontSize()*-12);// Use fixed width for labels (by passing a negative value), the rest goes to widgets. We choose a width proportional to our font size.
if(ImGui::TreeNode("Advanced, with Selectable nodes"))
if(ImGui::TreeNode("Advanced, with Selectable nodes"))
{
{
HelpMarker("This is a more standard looking tree with selectable nodes.\nClick to select, CTRL+Click to toggle, click on arrows or double-click to open.");
HelpMarker("This is a more typical looking tree with selectable nodes.\nClick to select, CTRL+Click to toggle, click on arrows or double-click to open.");
// Leaf: The only reason we have a TreeNode at all is to allow selection of the leaf. Otherwise we can use BulletText() or TreeAdvanceToLabelPos()+Text().
// Items 3..5 are Tree Leaves
// The only reason we use TreeNode at all is to allow selection of the leaf.
// Otherwise we can use BulletText() or TreeAdvanceToLabelPos()+Text().
ImGuiButtonFlags_NoKeyModifiers=1<<10,// disable interaction if a key modifier is held
ImGuiButtonFlags_NoKeyModifiers=1<<10,// disable interaction if a key modifier is held
ImGuiButtonFlags_NoHoldingActiveID=1<<11,// don't set ActiveId while holding the mouse (ImGuiButtonFlags_PressedOnClick only)
ImGuiButtonFlags_NoHoldingActiveID=1<<11,// don't set ActiveId while holding the mouse (ImGuiButtonFlags_PressedOnClick only)
ImGuiButtonFlags_PressedOnDragDropHold=1<<12,// press when held into while we are drag and dropping another item (used by e.g. tree nodes, collapsing headers)
ImGuiButtonFlags_PressedOnDragDropHold=1<<12,// press when held into while we are drag and dropping another item (used by e.g. tree nodes, collapsing headers)
ImGuiButtonFlags_NoNavFocus=1<<13// don't override navigation focus when activated
ImGuiButtonFlags_NoNavFocus=1<<13,// don't override navigation focus when activated
ImGuiButtonFlags_NoHoveredOnNav=1<<14// don't report as hovered when navigated on
};
};
enumImGuiSliderFlags_
enumImGuiSliderFlags_
@ -382,7 +383,8 @@ enum ImGuiItemStatusFlags_
ImGuiItemStatusFlags_None=0,
ImGuiItemStatusFlags_None=0,
ImGuiItemStatusFlags_HoveredRect=1<<0,
ImGuiItemStatusFlags_HoveredRect=1<<0,
ImGuiItemStatusFlags_HasDisplayRect=1<<1,
ImGuiItemStatusFlags_HasDisplayRect=1<<1,
ImGuiItemStatusFlags_Edited=1<<2// Value exposed by item was edited in the current frame (should match the bool return value of most widgets)
ImGuiItemStatusFlags_Edited=1<<2,// Value exposed by item was edited in the current frame (should match the bool return value of most widgets)
ImGuiItemStatusFlags_ToggledSelection=1<<3// Set when Selectable(), TreeNode() reports toggling a selection. We can't report "Selected" because reporting the change allows us to handle clipping with less issues.
ImGuiIDNavJustMovedToId;// Just navigated to this id (result of a successfully MoveRequest).
ImGuiIDNavJustMovedToId;// Just navigated to this id (result of a successfully MoveRequest).
ImGuiIDNavJustMovedToSelectScopeId;// Just navigated to this select scope id (result of a successfully MoveRequest).
ImGuiIDNavJustMovedToMultiSelectScopeId;// Just navigated to this select scope id (result of a successfully MoveRequest).
ImGuiIDNavNextActivateId;// Set by ActivateItem(), queued until next frame.
ImGuiIDNavNextActivateId;// Set by ActivateItem(), queued until next frame.
ImGuiInputSourceNavInputSource;// Keyboard or Gamepad mode? THIS WILL ONLY BE None or NavGamepad or NavKeyboard.
ImGuiInputSourceNavInputSource;// Keyboard or Gamepad mode? THIS WILL ONLY BE None or NavGamepad or NavKeyboard.
ImRectNavScoringRectScreen;// Rectangle used for scoring, in screen space. Based of window->DC.NavRefRectRel[], modified for directional navigation scoring.
ImRectNavScoringRectScreen;// Rectangle used for scoring, in screen space. Based of window->DC.NavRefRectRel[], modified for directional navigation scoring.
IMGUI_APIboolIsItemToggledSelection();// was the last item selection toggled? (after Selectable(), TreeNode() etc. We only returns toggle _event_ in order to handle clipping correctly)
// Logging/Capture
// Logging/Capture
IMGUI_APIvoidLogBegin(ImGuiLogTypetype,intauto_open_depth);// -> BeginCapture() when we design v2 api, for now stay under the radar by using the old name.
IMGUI_APIvoidLogBegin(ImGuiLogTypetype,intauto_open_depth);// -> BeginCapture() when we design v2 api, for now stay under the radar by using the old name.