This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Unigine.ObjectGui Class

Inherits from: Object

This class allows to create a flat GUI object that is positioned in the world and to which different widgets are assigned to be displayed. Basically, ObjectGui is a flat display to which a player can come to and click some buttons. GUI objects can undergo postprocessing filtering, for example, blurring or any other one.

Notice
When you create an instance of the ObjectGui class, it is automatically associated with an instance of the Gui class.

See Also#

A set of UnigineScript API samples located in the <UnigineSDK>/data/samples/objects/ folder:

ObjectGui Class

Properties

int ScreenHeight#

The screen height of the gui object.

int ScreenWidth#

The screen width of the gui object.

float PhysicalHeight#

The physical height of the gui object.

float PhysicalWidth#

The physical width of the gui object.

float PolygonOffset#

The offset of the gui object above the background to avoid z-fighting.

float ControlDistance#

The distance at which the gui becomes controllable.

int MouseMode#

The current mouse mode.

bool MouseShow#

The value indicating if the mouse cursor is rendered in the gui object.

bool DepthTest#

The value indicating if the gui object uses depth test.

bool Background#

The value indicating if gui background (black screen) is rendered.

bool Billboard#

The value indicating if the gui object is a billboard.

Members


ObjectGui ( float width, float height, string 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.
  • string 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.

Gui GetGui ( ) #

Returns a Gui instance associated with the object. This function is used when assigning a widget to the GUI object.
Notice
When you create an instance of the ObjectGui class, it is automatically associated with a Gui instance.

Return value

Gui smart pointer.

void SetMouse ( vec3 p0, vec3 p1, int mouse_button, int mouse_show ) #

Sets mouse cursor position in the virtual control mode.

Arguments

  • vec3 p0 - Start point. A line segment between the start and the end points must intersect ObjectGui. The point of intersection determines x and y coordinates on the ObjectGui.
  • vec3 p1 - End point. A line segment between the start and the end points must intersect ObjectGui. The point of intersection determines x and y coordinates on the ObjectGui.
  • int mouse_button - Mouse button status. Set 1 to indicate that the button is clicked; otherwise, 0.
  • int mouse_show - Mouse cursor status. Set 1 to show mouse cursor; otherwise, 0.

void SetPhysicalSize ( float width, float height ) #

Sets physical dimensions of the GUI object.

Arguments

  • float width - New width in units. If a negative value is provided, 0 will be used instead.
  • float height - New height in units. If a negative value is provided, 0 will be used instead.

void SetScreenSize ( int width, int height ) #

Sets screen dimensions of the GUI object.

Arguments

  • int width - New width in pixels. If a negative value is provided, 0 will be used instead.
  • int height - New height in pixels. If a negative value is provided, 0 will be used instead.

static int type ( ) #

Returns the type of the node.

Return value

Object type identifier.
Last update: 2022-12-14
Build: ()