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

spaderthomas picture spaderthomas  路  3Comments

mnemode2 picture mnemode2  路  3Comments

NPatch picture NPatch  路  3Comments

GrammarLord picture GrammarLord  路  3Comments

SlNPacifist picture SlNPacifist  路  3Comments