mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 04:58:47 +02:00
TreeNode,CollapsingHeader: sizing fixes to support laying out item on same line before/after (#414, #282)
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user