ObjectGui Class
Interface for object gui handling. See also the UnigineScript analog.
To use this class, include the UnigineObjectGui.h file.
ObjectGui Class
Members
ObjectGui (float width, float height, const char * name = 0)
Constructor. Creates a new GUI object with given properties.Arguments
- float width - Physical width of the new GUI object in units.
- float height - Physical height of the new GUI object in units.
- const char * name - Path to the folder with GUI skin (the RC file and textures). If no value is specified, the default gui skin will be used.
void setDepthTest (int test)
Sets a value indicating if depth test should be used for the GUI object.Arguments
- int test - 1 to use depth test; otherwise, 0.
Ptr<Gui> getGui ()
Returns a Gui instance associated with the object.Return value
Gui smart pointer.int getScreenWidth ()
Returns the screen width of the GUI object.Return value
The width in pixels.void setPhysicalSize (float width, float height)
Sets physical dimensions of the GUI object.Arguments
- float width - A new width in units.
- float height - A new height in units.
int getMouseShow ()
Returns a value indicating if the mouse cursor is rendered in the GUI object.Return value
1 if the cursor is rendered; otherwise, 0.int getDepthTest ()
Returns a value indicating if the GUI object uses depth test.Return value
1 if the GUI object uses depth test; otherwise, 0.float getPhysicalHeight ()
Returns the physical height of the GUI object.Return value
The height in units.void setMouseShow (int show)
Sets a value indicating if the mouse cursor should be rendered in the GUI object.Arguments
- int show - 1 to render the mouse cursor; otherwise, 0.
void setScreenSize (int width, int height)
Sets screen dimensions of the GUI object.Arguments
- int width - A new width in pixels.
- int height - A new height in pixels.
void setControlDistance (float distance)
Sets a distance at which the GUI becomes controllable.Arguments
- float distance - A new distance in units.
int isBillboard ()
Returns a value indicating if the GUI object is a billboard.Return value
1 if the GUI object is a billboard; otherwise, 0.float getPhysicalWidth ()
Returns the physical width of the GUI object.Return value
The width in units.float getControlDistance ()
Returns the distance at which the GUI becomes controllable.Return value
The distance in units.void setBillboard (int billboard)
Sets a value indicating if the GUI object should be a billboard.Arguments
- int billboard - 1 to be a billboard; otherwise, 0.
float getPolygonOffset ()
Returns an offset of the GUI object above the background to avoid z-fighting.Return value
The polygon offset in units.int getBackground ()
Returns a value indicating if GUI background (black screen) is rendered.Return value
1 if background is rendered; otherwise, 0.int getScreenHeight ()
Returns the screen height of the GUI object.Return value
The height in pixels.void setPolygonOffset (float offset)
Sets an offset of the GUI object above the background to avoid z-fighting.Arguments
- float offset - A polygon offset in units.
void setBackground (int background)
Sets a value indicating if the GUI background (black screen) should be rendered.Arguments
- int background - 1 to render GUI background, 0 to keep it transparent.
Last update: 03.07.2017
Помогите сделать статью лучше
Была ли эта статья полезной?
(или выберите слово/фразу и нажмите Ctrl+Enter