Regular API function

simCreateUI

Description Creates an empty OpenGl-based custom UI. See also simRemoveUI.
C synopsis simInt simCreateUI(const simChar* uiName,simInt menuAttributes,const simInt* clientSize,const simInt* cellSize,simInt* buttonHandles)
C parameters
uiName: name of the OpenGl-based custom UI. If an OpenGl-based custom UI with such a name already exists, a new name is generated and no error produced
menuAttributes: combination of OpenGl-based custom UI menu attributes. Set to 0 for a menuless OpenGl-based custom UI
clientSize: sizes (in terms of cells (x and y)) of the client surface. (client surface=surface minus the menu bar space)
cellSize: cell sizes (x and y). must be a multiple of 2
buttonHandles: handles of buttons as specified in the menuAttributes. Array size must be appropriate
C return value
handle of OpenGl-based custom UI if value >=0, -1 if operation was not successful
Lua synopsis number uiHandle,table buttonHandles=simCreateUI(string uiName,number menuAttributes,table_2 clientSize,table_2 cellSize)
Lua parameters
uiName: name of the OpenGl-based custom UI. If an OpenGl-based custom UI with such a name already exists, a new name is generated and no error produced
menuAttributes: combination of OpenGl-based ustom UI menu attributes. Set to 0 for a menuless OpenGl-based custom UI
clientSize: sizes (in terms of cells (x and y)) of the client surface. (client surface=surface minus the menu bar space)
cellSize: cell sizes (x and y). must be a multiple of 2
Lua return values
uiHandle: handle of the newly created OpenGl-based custom UI if value >=0, error otherwise
buttonHandles: handles of the created buttons. Is nil if uiHandle is -1.

All regular API functions on one page