mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
TreeNode,CollapsingHeader: sizing fixes to support laying out item on same line before/after (#414, #282)
This commit is contained in:
parent
546962351b
commit
4006fb77bc
2 changed files with 26 additions and 25 deletions
|
|
@ -2191,16 +2191,15 @@ static void ShowExampleAppPropertyEditor(bool* opened)
|
|||
ImGui::Columns(2);
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::Text("Item1"); ImGui::NextColumn();
|
||||
ImGui::Text("value1"); ImGui::NextColumn();
|
||||
|
||||
struct funcs
|
||||
{
|
||||
static void ShowDummyObject(const char* prefix, ImU32 uid)
|
||||
{
|
||||
ImGui::PushID(uid); // Use object uid as identifier. Most commonly you could also use the object pointer as a base ID.
|
||||
ImGui::PushID(uid); // Use object uid as identifier. Most commonly you could also use the object pointer as a base ID.
|
||||
ImGui::AlignFirstTextHeightToWidgets(); // Text and Tree nodes are less high than regular widgets, here we add vertical spacing to make the tree lines equal high.
|
||||
bool opened = ImGui::TreeNode("Object", "%s_%u", prefix, uid);
|
||||
ImGui::NextColumn();
|
||||
ImGui::AlignFirstTextHeightToWidgets();
|
||||
ImGui::Text("my sailor is rich");
|
||||
ImGui::NextColumn();
|
||||
if (opened)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue