Imgui: How can I specify the position and size of widgets?

Created on 11 May 2015  路  2Comments  路  Source: ocornut/imgui

I want to specify the position and size of Button Label and so on, not only the window, how can make it?

Most helpful comment

Use SetCursorPos*() functions to position the draw cursor.
For the size it currently depends on the type of widget. Widgets like Button() or Selectable() can take a size as parameter. For composed widget that are followed by a label you can use PushItemWidth() at the moment.

All 2 comments

Use SetCursorPos*() functions to position the draw cursor.
For the size it currently depends on the type of widget. Widgets like Button() or Selectable() can take a size as parameter. For composed widget that are followed by a label you can use PushItemWidth() at the moment.

Thank you! SetCursorPos* works!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

the-lay picture the-lay  路  3Comments

noche-x picture noche-x  路  3Comments

mkanakis picture mkanakis  路  3Comments

GrammarLord picture GrammarLord  路  3Comments

dowit picture dowit  路  3Comments