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.
No language code for this page. You can select other language.
No language code for this page,
shown in other instead.
shown in other instead.
This class allows to render GUI onto an arbitrary mesh. Unlike ObjectGui, it can be used to create non-flat displays positioned in the world. If the mesh contains several surfaces, the same GUI will be rendered on each of them. Note that the GUI will be rendered according to the UV mapping of surfaces.
The following samples demonstrate the ObjectGuiMesh class usage:
ObjectGuiMesh ClassThis class inherits from Object
ObjectGuiMesh (string mesh, string name)Constructor. Creates a new mesh GUI object with given properties.
- string mesh - Name of the mesh, to which GUI will be added.
- string name - Path to the folder with GUI skin (the RC file and textures).
float getControlDistance ()Returns the distance, at which the GUI becomes controllable.
Return valueDistance in units.
Gui getGui ()Returns a Gui instance associated with the object.
Return valueGUI associated with the object.
string getMeshName ()Returns the name of the original mesh file.
Return valueName of the mesh file.
int getMouseShow ()Returns a value indicating if the mouse cursor is rendered in the mesh GUI object.
Return value1 if the cursor is rendered; otherwise, 0.
int getScreenHeight ()Returns the screen height of the mesh GUI object.
Return valueHeight in pixels.
int getScreenWidth ()Returns the screen width of the mesh GUI object.
Return valueWidth in pixels.
void setControlDistance (float distance)Sets a distance, at which the GUI becomes controllable.
- float distance - New distance in units.
void setMouseShow (int show)Sets a value indicating if the mouse cursor should be rendered in the mesh GUI object. The default is 1.
- int show - Positive number to render the mouse cursor; otherwise, 0.
void setScreenSize (int width, int height)Sets screen dimensions of the mesh GUI object.
- int width - New width in pixels.
- int height - New height in pixels.
Last update: 2017-07-03
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)