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

dowit picture dowit  路  3Comments

ocornut picture ocornut  路  3Comments

spaderthomas picture spaderthomas  路  3Comments

SlNPacifist picture SlNPacifist  路  3Comments

GrammarLord picture GrammarLord  路  3Comments