imgui-node-editor icon indicating copy to clipboard operation
imgui-node-editor copied to clipboard

ImGui::DragFloat2 is misaligned

Open SC5Shout opened this issue 2 years ago • 0 comments

How can I render ImGui::DragFloat2? Right now it looks like this:

missaligned

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();

SC5Shout avatar May 31 '23 19:05 SC5Shout