MCPcopy Create free account
hub / github.com/Raais/ImStudio / CenterHorizontal

Method CenterHorizontal

src/utils/ims_utils.cpp:372–378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

370}
371
372float utils::CenterHorizontal()
373{
374 auto windowWidth = ImGui::GetWindowSize().x;
375 auto itemWidth = ImGui::GetItemRectSize().x;
376 float PosX = ((windowWidth - itemWidth) * 0.5f);
377 return PosX;
378}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected