You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this issue is as a follow-up of issue: https://github.com/ocornut/imgui/issues/7344
as commented in the above issue, the center of the text is not implemented yet.
I want to make the text center and use a minimum extra code as possible.
could you please advise if the below is the best way to do it?
note: although modifying the ImGui source at me side would be cleaner, I want to avoid it so further update of ImGui will be easy to merge.
Version/Branch of Dear ImGui:
Version 1.90.9
Back-ends:
imgui_impl_XXX.cpp + imgui_impl_XXX.cpp
Compiler, OS:
Windows 11
Full config/build information:
No response
Details:
this issue is as a follow-up of issue: https://github.com/ocornut/imgui/issues/7344
as commented in the above issue, the center of the text is not implemented yet.
I want to make the text center and use a minimum extra code as possible.
could you please advise if the below is the best way to do it?
note: although modifying the ImGui source at me side would be cleaner, I want to avoid it so further update of ImGui will be easy to merge.
thank you
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
bool RsImGui::InputIntCentered(const char* label, int* v, int step)
{
const char* format = "%d";
int step_fast = 100;
ImGuiWindow* window = ImGui::GetCurrentWindow();
const void* p_step = (const void*)(step ? &step : NULL);
const void* p_step_fast = &step_fast;
if (window->SkipItems)
return false;
}
The text was updated successfully, but these errors were encountered: