This page has been translated automatically.
Getting Started
Migrating to UNIGINE 2.0
C++ API Migration
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::ObjectGui Class

Interface for object gui handling. See also the UnigineScript analog.

To use this class, include the UnigineObjectGui.h file.

Unigine::ObjectGui Class

Members


static int type ()

ObjectGui type.

Return value

ObjectGui type identifier.

static Ptr< ObjectGui > create (const NodePtr & node)

ObjectGui constructor.

Arguments

  • const NodePtr & node - Node smart pointer.

static Ptr< ObjectGui > create (const ObjectPtr & object)

ObjectGui constructor.

Arguments

  • const ObjectPtr & object - Object smart pointer.

static Ptr< ObjectGui > create (float width, float height, const char * name)

ObjectGui constructor.

Arguments

  • float width - Gui width in units.
  • float height - Gui height in units.
  • const char * name - Gui skin name.

virtual GuiPtr getGui () const =0

Returns a Gui instance associated with the object.

Return value

Gui smart pointer.

virtual void setBillboard (int billboard) const =0

Sets a value indicating if the GUI object should be a billboard.

Arguments

  • int billboard - 1 to be a billboard; otherwise, 0.

virtual int isBillboard () const =0

Returns a value indicating if the GUI object is a billboard.

Return value

1 if the GUI object is a billboard; otherwise, 0.

virtual void setBackground (int background) const =0

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.

virtual int getBackground () const =0

Returns a value indicating if GUI background (black screen) is rendered.

Return value

1 if background is rendered; otherwise, 0.

virtual void setDepthTest (int test) const =0

Sets a value indicating if depth test should be used for the GUI object.

Arguments

  • int test - 1 to use depth test; otherwise, 0.

virtual int getDepthTest () const =0

Returns a value indicating if the GUI object uses depth test.

Return value

1 if the GUI object uses depth test; otherwise, 0.

virtual void setMouseShow (int show) const =0

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.

virtual int getMouseShow () const =0

Returns a value indicating if the mouse cursor is rendered in the GUI object.

Return value

1 if the cursor is rendered; otherwise, 0.

virtual void setControlDistance (float distance) const =0

Sets a distance at which the GUI becomes controllable.

Arguments

  • float distance - A new distance in units.

virtual float getControlDistance () const =0

Returns the distance at which the GUI becomes controllable.

Return value

The distance in units.

virtual void setPolygonOffset (float offset) const =0

Sets an offset of the GUI object above the background to avoid z-fighting.

Arguments

  • float offset - A polygon offset in units.

virtual float getPolygonOffset () const =0

Returns an offset of the GUI object above the background to avoid z-fighting.

Return value

The polygon offset in units.

virtual void setPhysicalSize (float width, float height) const =0

Sets physical dimensions of the GUI object.

Arguments

  • float width - A new width in units.
  • float height - A new height in units.

virtual float getPhysicalWidth () const =0

Returns the physical width of the GUI object.

Return value

The width in units.

virtual float getPhysicalHeight () const =0

Returns the physical height of the GUI object.

Return value

The height in units.

virtual void setScreenSize (int width, int height) const =0

Sets screen dimensions of the GUI object.

Arguments

  • int width - A new width in pixels.
  • int height - A new height in pixels.

virtual int getScreenWidth () const =0

Returns the screen width of the GUI object.

Return value

The width in pixels.

virtual int getScreenHeight () const =0

Returns the screen height of the GUI object.

Return value

The height in pixels.
Last update: 2017-07-03
Build: ()