This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
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.WidgetComboBox Class

Inherits: Widget

This class creates a combo box.

WidgetComboBox Class

Properties

int CurrentItem#

The currently selected item.
set
Sets a given item as selected.
set value - Item number.

int NumItems#

The number of items in the combobox.

string Texture#

Path to the image with mini icons, which are used with combobox items.
set
Sets a texture with mini icons to be used with items. The texture is a vertical strip of square icons.
set value - Path to a texture file.

vec4 ButtonColor#

Returns the current color for the widget's button.
set
Sets the color for the widget's button.
set value - Four-component vector specifying the color in the RGBA format.

vec4 BorderColor#

Returns the current border color for the widget.
set
Sets the border color for the widget.
set value - Four-component vector specifying the color in the RGBA format.

vec4 SelectionColor#

Returns the current color used to highlight the current selection for the widget.
set
Sets the color to be used to highlight the current selection for the widget.
set value - Four-component vector specifying the color in the RGBA format.

vec4 ListBackgroundColor#

Returns the current background color used for the widget's list items.
set
Sets the background color to be used for the widget's list items.
set value - Four-component vector specifying the color in the RGBA format.

vec4 MainBackgroundColor#

Returns the current background color used for the widget's text box.
set
Sets the background color to be used for the widget's text box.
set value - Four-component vector specifying the color in the RGBA format.

Members


static WidgetComboBox ( Gui gui ) #

Constructor. Creates an empty combobox.

Arguments

  • Gui gui - GUI, to which the new combobox will belong.

string GetCurrentItemData ( ) #

Returns the text data of the currently selected item. The data can be used as a text identifier of the item (instead of using the item number).

Return value

Item text data.

string GetCurrentItemText ( ) #

Returns a text value of the currently selected item.

Return value

Item text.

void SetImage ( Image image ) #

Sets an image with mini icons to be used with items. The image is a vertical strip of square icons.

Arguments

  • Image image - Image to set.

Image GetImage ( ) #

Returns the image with mini icons, which are used for the combobox items.

Return value

Image with mini icons.

void SetItemData ( int item, string str ) #

Sets the text data for the item with the specified number. The data can be used as a text identifier of the item (instead of using the item number).

Arguments

  • int item - Item number in range from 0 to the total number of items.
  • string str - Item text data to be set.

string GetItemData ( int item ) #

Returns the text data of the item with the specified number. The data can be used as a text identifier of the item (instead of using the item number).

Arguments

  • int item - Item number in range from 0 to the total number of items.

Return value

Item text data.

void SetItemText ( int item, string str ) #

Sets a text for a given item.

Arguments

  • int item - Item number.
  • string str - Item text.

string GetItemText ( int item ) #

Returns the text of a given item.

Arguments

  • int item - Item number.

Return value

Item text.

void SetItemTexture ( int item, int texture ) #

Sets an icon for a given item.

Arguments

  • int item - Item number.
  • int texture - Zero-based ID of the icon.

int GetItemTexture ( int item ) #

Returns the icon of a given item.

Arguments

  • int item - Item number.

Return value

Zero-based ID of the icon.

int AddItem ( string str, int texture = -1 ) #

Adds a new item with a given text and an icon.

Arguments

  • string str - Item text.
  • int texture - Zero-based ID of the icon.

Return value

Number of the added item.

void Clear ( ) #

Removes all items from the combobox.

void RemoveItem ( int num ) #

Removes a given item from the combobox.

Arguments

  • int num - Item number.

void SetMainBackgroundColor ( vec4 color ) #

Sets the background color to be used for the widget's text box.

Arguments

  • vec4 color - Four-component vector specifying the color in the RGBA format.

vec4 GetMainBackgroundColor ( ) #

Returns the current background color used for the widget's text box.

Return value

Four-component vector specifying the color in the RGBA format.

void SetListBackgroundColor ( vec4 color ) #

Sets the background color to be used for the widget's list items.

Arguments

  • vec4 color - Four-component vector specifying the color in the RGBA format.

vec4 GetListBackgroundColor ( ) #

Returns the current background color used for the widget's list items.

Return value

Four-component vector specifying the color in the RGBA format.

void SetSelectionColor ( vec4 color ) #

Sets the color to be used to highlight the current selection for the widget.

Arguments

  • vec4 color - Four-component vector specifying the color in the RGBA format.

vec4 GetSelectionColor ( ) #

Returns the current color used to highlight the current selection for the widget.

Return value

Four-component vector specifying the color in the RGBA format.

void SetBorderColor ( vec4 color ) #

Sets the border color for the widget.

Arguments

  • vec4 color - Four-component vector specifying the color in the RGBA format.

vec4 GetBorderColor ( ) #

Returns the current border color for the widget.

Return value

Four-component vector specifying the color in the RGBA format.

void SetButtonColor ( vec4 color ) #

Sets the color for the widget's button.

Arguments

  • vec4 color - Four-component vector specifying the color in the RGBA format.

vec4 GetButtonColor ( ) #

Returns the current color for the widget's button.

Return value

Four-component vector specifying the color in the RGBA format.
Last update: 2020-07-24
Build: ()