3#include "../third_party/imgui/imgui.h"
4#include "../AI/BTGraphLayoutEngine.h"
5#include "../third_party/imnodes/imnodes.h"
6#include "../BlueprintEditor/NodeStyleRegistry.h"
12 namespace NodeGraphShared
16 ImVec2 nPos = ImNodes::GetNodeScreenSpacePos(nodeId);
17 ImVec2 nDim = ImNodes::GetNodeDimensions(nodeId);
21 h = std::max(4.0f, std::min(h,
nDim.y - 4.0f));
55 ImU32 r =
static_cast<ImU32>(180 +
static_cast<int>(
t * 75.0f));
56 ImU32 g =
static_cast<ImU32>(140 +
static_cast<int>(
t * 115.0f));
67 if (icon && icon[0] !=
'\0')
68 ImGui::Text(
"%s %s", icon, title.c_str());
70 ImGui::TextUnformatted(title.c_str());
72 ImNodes::PopColorStyle();
73 ImNodes::PopColorStyle();
74 ImNodes::PopColorStyle();
ComponentTypeID GetComponentTypeID_Static()
void DrawPinCircle(ImDrawList *drawList, const ImVec2 ¢er, float radius, ImU32 fillColor, ImU32 outlineColor, float outlineThickness)
void RenderNodeHeader(int nodeId, const NodeStyle &style, const char *icon, const std::string &title, bool isCurrentNode, float pulseTimer)
ImVec2 ComputePinCenterScreen(int nodeId, const BTNodeLayout *layout, bool isOutput, float pinOffset, float headerPx, float currentZoom)
Compute the screen-space center position of a pin.
< Provides AssetID and INVALID_ASSET_ID
Layout information for a single behavior tree node.
Visual descriptor for a single node type.
ImU32 headerColor
Title-bar background colour (ImNodes TitleBar colour slot).
ImU32 headerSelectedColor
Title-bar colour when the node is selected.
ImU32 headerHoveredColor
Title-bar colour when the node is hovered.