37 ax::NodeEditor::EndNode();
39 if (ImGui::IsItemVisible())
41 auto alpha =
static_cast<int>(255 * ImGui::GetStyle().Alpha);
43 auto* drawList = ax::NodeEditor::GetNodeBackgroundDrawList(
CurrentNodeId);
45 const auto halfBorderWidth = ax::NodeEditor::GetStyle().NodeBorderWidth * 0.5F;
47 auto headerColor = IM_COL32(0, 0, 0, alpha) | (
HeaderColor & IM_COL32(255, 255, 255, 0));
50 const auto uv = ImVec2(
55 HeaderMin - ImVec2(8 - halfBorderWidth, 4 - halfBorderWidth),
56 HeaderMax + ImVec2(8 - halfBorderWidth, 0),
57 ImVec2(0.0F, 0.0F), uv,
58 headerColor, GetStyle().NodeRounding, 1 | 2);
63 if ((headerSeparatorMax.x > headerSeparatorMin.x) && (headerSeparatorMax.y > headerSeparatorMin.y))
66 headerSeparatorMin + ImVec2(-(8 - halfBorderWidth), -0.5F),
67 headerSeparatorMax + ImVec2((8 - halfBorderWidth), -0.5F),
68 ImColor(255, 255, 255, 96 * alpha / (3 * 255)), 1.0F);
77 ax::NodeEditor::PopStyleVar();
175 ImGui::EndHorizontal();
180 ImGui::Spring(0, ImGui::GetStyle().ItemSpacing.y * 2.0F);
188 ax::NodeEditor::PopStyleVar(2);
191 ImGui::EndVertical();
200 ImGui::EndVertical();
209 ax::NodeEditor::PopStyleVar(2);
212 ImGui::EndVertical();
230 ImGui::BeginVertical(
"node");
236 ImGui::BeginHorizontal(
"header");
245 ImGui::BeginHorizontal(
"content");
250 ImGui::BeginVertical(
"inputs", ImVec2(0, 0), 0.0F);
252 ax::NodeEditor::PushStyleVar(ax::NodeEditor::StyleVar_PivotAlignment, ImVec2(0, 0.5F));
253 ax::NodeEditor::PushStyleVar(ax::NodeEditor::StyleVar_PivotSize, ImVec2(0, 0));
263 ImGui::BeginVertical(
"middle", ImVec2(0, 0), 1.0F);
275 ImGui::BeginVertical(
"outputs", ImVec2(0, 0), 1.0F);
277 ax::NodeEditor::PushStyleVar(ax::NodeEditor::StyleVar_PivotAlignment, ImVec2(1.0F, 0.5F));
278 ax::NodeEditor::PushStyleVar(ax::NodeEditor::StyleVar_PivotSize, ImVec2(0, 0));
293 ImGui::EndHorizontal();
299 ImGui::EndVertical();
300 NodeMin = ImGui::GetItemRectMin();
301 NodeMax = ImGui::GetItemRectMax();