imgui-node-editor
imgui-node-editor copied to clipboard
ImGui::DragFloat2 is misaligned
How can I render ImGui::DragFloat2? Right now it looks like this:
and as you can see it's not aligned properly.
example code:
builder.Input((ed::PinId)pin->getUUID());
NodeDrawUtils::DrawPinIcon(pin, isPinLinked(pin), (int)(alpha * 255));
ImGui::Spring(0);
if (!pin->getDisplayName().empty()) {
ImGui::TextUnformatted(pin->getDisplayName().c_str());
ImGui::Spring(0);
}
if (!isPinLinked(pin)) {
static glm::vec2 pinValue = 0.0f;
if (ImGui::DragFloat2("##vec2In", &pinValue[0], 0.01f, 0.0f, 0.0f, "%g")) {
}
}
builder.EndInput();