How could I possibly convert a float value to string and show that in ImGui::Text, and if this is not possible/if there's another way of doing it, could someone possibly give me a pseudo code or an example?
My code, which is completely wrong, I know.
float viewy;
float viewx;
void xD
{
viewy = interface->model.y;
viewx = interface->model.x;
ImGui::Text(viewy);
ImGui::Text(viewx);
}
Hello,
ImGui::Text() uses printf() style format string, so for example you can do:
ImGui::Text("view = %f, %f", interface->model.x, interface->model.y);
There are numerous examples of doing this in imgui_demo.cpp, and numerous documentations about printf-style format strings on the internet. Please refer to them.
Most helpful comment
Hello,
ImGui::Text()uses printf() style format string, so for example you can do:ImGui::Text("view = %f, %f", interface->model.x, interface->model.y);There are numerous examples of doing this in imgui_demo.cpp, and numerous documentations about printf-style format strings on the internet. Please refer to them.