xLeak
xLeak

Reputation: 19

Any Fixes For ImGui AddRect

ImGui::GetWindowDrawList()->AddRect(ImVec2(ModelEspInfo[i].pOutX, ModelEspInfo[i].pOutY), 5750 / ModelEspInfo[i].RealDistance, IM_COL32(245, 110, 110, 255), 12, 2.0f);

Error: no suitable constructor exists to convert from "float" to "ImVec2"

Upvotes: 1

Views: 936

Answers (1)

flowit
flowit

Reputation: 1442

Please, format your question and add some context.

The declaration of addRect looks like this:

IMGUI_API void  AddRect(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding = 0.0f, ImDrawCornerFlags rounding_corners = ImDrawCornerFlags_All, float thickness = 1.0f);

Without more context to your example I can only guess what you are trying to do. Check your parameters. You only have 5, addRect takes six (although two are optional, but it looks like you want the thickness to be 2, so you need all six). You definitly need a ImVec as second parameter.

Upvotes: 1

Related Questions