40 float t = 0.5f + 0.5f * std::sin(
static_cast<float>(ImGui::GetTime()) * 4.0f);
41 float alpha = 0.6f + 0.4f *
t;
43 static_cast<int>(180.0f +
t * 75.0f),
44 static_cast<int>(140.0f +
t * 115.0f),
46 static_cast<int>(
alpha * 255.0f));
53 ImNodes::BeginNodeTitleBar();
63 ((color >> 16) & 0xFF) / 255.0f,
64 ((color >> 8) & 0xFF) / 255.0f,
65 ((color >> 0) & 0xFF) / 255.0f,
66 ((color >> 24) & 0xFF) / 255.0f
72 ImGui::PopStyleColor();
81 ImGui::TextColored(
ImVec4(1.0f, 0.15f, 0.15f, 1.0f),
"[B]");
86 ImGui::TextColored(
ImVec4(1.0f, 1.0f, 0.4f, 1.0f),
"[C]");
87 if (ImGui::IsItemHovered())
89 ImGui::SetTooltip(
"%s",
annotation->comment.c_str());
94 ImNodes::EndNodeTitleBar();
97 ImGui::Columns(2,
"ai_node_pins",
false);
98 ImGui::SetColumnWidth(0, 80.0f);
107 ImNodes::EndInputAttribute();
112 ImGui::Text(
"%s: %s",
it->first.c_str(),
it->second.c_str());
124 ImNodes::EndOutputAttribute();
133 ImNodes::PopColorStyle();
static void RenderNode(const NodeGraph::NodeData &nodeData, bool isSelected=false, bool isExecuting=false, const NodeGraph::NodeAnnotation *annotation=nullptr)
Render a single node with ImNodes.