Imgui: Window's center

Created on 3 Mar 2018  路  1Comment  路  Source: ocornut/imgui

Hello Omar!

Is there any function to move window center in the middle of the window? I want to place my window at the center of my screen but window moves from center if it trying to be bigger.

Most helpful comment

You can use
SetNextWindowPos(ImVec2(io.DisplaySize.x * 0.5f, io.DisplaySize.y * 0.5f), ImGuiCond_Always, ImVec2(0.5f,0.5f))

>All comments

You can use
SetNextWindowPos(ImVec2(io.DisplaySize.x * 0.5f, io.DisplaySize.y * 0.5f), ImGuiCond_Always, ImVec2(0.5f,0.5f))

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bizehao picture bizehao  路  3Comments

mnemode2 picture mnemode2  路  3Comments

noche-x picture noche-x  路  3Comments

dowit picture dowit  路  3Comments

the-lay picture the-lay  路  3Comments