We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am attempting to draw all the input arrows on top of each other, providing a perfect overlap so only one arrow is seen.
Without arrows this works fine:
With the arrows it does not:
To set the pivot point I am using the following code
ImVec2 min = ImGui::GetItemRectMin(); ImVec2 max = ImGui::GetItemRectMax(); ImVec2 pos = { kind == ed::PinKind::Input ? min.x - 9.0f : max.x + 9.0f, min.y + (max.y - min.y) / 2.0f }; ed::PinPivotRect(pos, pos);
The text was updated successfully, but these errors were encountered:
Editor: Add ability to snap link origin to pin direction (#167)
27a85f6
You can now request link origin to be snapped to pin direction by setting style variable:
ed::PushStyleVar(ed::StyleVar_SnapLinkToPinDir, 1);
By default links are links origins are closest points between pins, this variable change that.
You can recreate example above using this patch:
examples/blueprints-example/blueprints-example.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/blueprints-example/blueprints-example.cpp b/examples/blueprints-example/blueprints-example.cpp index c14c2e3..7826d9a 100644 --- a/examples/blueprints-example/blueprints-example.cpp +++ b/examples/blueprints-example/blueprints-example.cpp @@ -917,6 +917,8 @@ struct Example: util::BlueprintNodeBuilder builder(m_HeaderBackground, GetTextureWidth(m_HeaderBackground), GetTextureHeight(m_HeaderBackground)); + ed::PushStyleVar(ed::StyleVar_PinRadius, 10.0f); + ed::PushStyleVar(ed::StyleVar_SnapLinkToPinDir, 1); for (auto& node : m_Nodes) { if (node.Type != NodeType::Blueprint && node.Type != NodeType::Simple) @@ -977,6 +979,8 @@ struct Example: builder.EndHeader(); } + ed::PushStyleVar(ed::StyleVar_PinArrowSize, 10.0f); + ed::PushStyleVar(ed::StyleVar_PinArrowWidth, 10.0f); for (auto& input : node.Inputs) { auto alpha = ImGui::GetStyle().Alpha; @@ -1000,6 +1004,7 @@ struct Example: ImGui::PopStyleVar(); builder.EndInput(); } + ed::PopStyleVar(2); if (isSimple) { @@ -1054,6 +1059,7 @@ struct Example: builder.End(); } + ed::PopStyleVar(2); for (auto& node : m_Nodes) {
Sorry, something went wrong.
thedmd
No branches or pull requests
I am attempting to draw all the input arrows on top of each other, providing a perfect overlap so only one arrow is seen.
Without arrows this works fine:
With the arrows it does not:
To set the pivot point I am using the following code
The text was updated successfully, but these errors were encountered: