Comments (1)
Closing this, the solution is that once you use ImGui::BeginHorizontal
in a given window, you should also use ImGui::BeginVertical
(so that the vertical layout width is transferred to its child horizontal layout).
And the code could for example be:
ed::BeginNode(node_id);
// A vertical layout that will contain the horizontal layout as a child
ImGui::BeginVertical("Vertical");
{
// A dummy item to set the node min width
ImGui::Dummy(ImVec2(minWidth, 0));
// Edit the min width
ImGui::Text("Min Width");
ImGui::SetNextItemWidth(70.f);
ImGui::SliderFloat("##minWidth", &minWidth, 0.f, 600.f);
// The horizontal child layout
ImGui::BeginHorizontal("Hor");
{
ImGui::Text("LEFT LABEL");
ImGui::Spring();
ImGui::Text("RIGHT LABEL");
}
ImGui::EndHorizontal();
}
ImGui::EndVertical();
ed::EndNode();
I think it could be worse it to add a succinct doc to imgui_stacklayout.h
in the future. If you are interested, I could try to propose something.
Thanks!
from imgui-node-editor.
Related Issues (20)
- Using the master branch with docking the branch of ImGUI HOT 2
- ImGui::InputTextMultiline widgets in nodes are not interactible
- Adding smooth zoom from #266 to the canvas example
- Question: Creating a NESTED canvas? HOT 1
- Callback for drag and drop
- Suspend & Resume may lead to corrupted ImDrawCmd in some cases
- Auxiliary settings for optimization
- Try to build example and run blueprint-example solution HOT 3
- Disabling load/save of settings HOT 1
- Question: Embedding editor within a window? HOT 4
- How to use it In image processing project? HOT 5
- BeginPin/EndPin takes space in node even if pin location is moved with PinRect HOT 1
- Can this support the functionality of irregularly shaped image buttons based on PNG images, where I create an image button with a PNG image that has an alpha channel, and only the non-transparent parts of the image respond to taps/clicks?
- When arranging components close to each other, can they support a magnetic snap-to effect?
- I would like to add a footer to the node and request your assistance
- Fixed Size Node (vertical)
- Manually set zoom/position of viewport?
- Proposal fix for ImGui::TextWrapped() and ImGui::Separator(), ImGui::SliderXXX inside Nodes HOT 1
- Disable automatic handling of node drag? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imgui-node-editor.