This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
Setting Up Properties
照明
Landscape Tool
Sandworm (Experimental)
使用编辑器工具执行特定任务
Extending Editor Functionality
嵌入式节点类型
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Objects
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
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
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine.WidgetTabBox Class

Inherits: Widget

This class creates a box with several tabs.

WidgetTabBox Class

Properties

int CurrentTab#

The number of the current tab.
set
Makes a given tab current.
set value - Tab number in range from 0 to the total number of tabs.

int NumTabs#

The total number of tabs in the box.

string Texture#

The path to the tab icons atlas texture. this atlas is a vertical strip of square icons.
set
Sets a texture to be used as tab icons atlas. This atlas is a vertical strip of square icons.
set value - Path to the atlas texture.

int PaddingBottom#

The current bottom padding for the widget content.

int PaddingTop#

The current top padding for the widget content.

int PaddingRight#

The current right-side padding for the widget content.

int PaddingLeft#

The current left-side padding for the widget content.

int SpaceY#

The vertical space between the widgets in the box and between them and the box border.

int SpaceX#

The horizontal space between the widgets in the box and between them and the box border.

vec4 BorderColor#

Widget's border color.
set
Sets the border color for the widget.
set value - Four-component vector specifying the color in the RGBA format.

vec4 ButtonColor#

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.

Members


static WidgetTabBox ( Gui gui, int x = 0, int y = 0 ) #

Constructor. Creates a tabbed box with given parameters and adds it to the specified GUI.

Arguments

  • Gui gui - GUI, to which the new box will belong.
  • int x - Horizontal space between the widgets in the box and between them and the box border. This is an optional parameter.
  • int y - Vertical space between the widgets in the box and between them and the box border. This is an optional parameter.

static WidgetTabBox ( int x = 0, int y = 0 ) #

Constructor. Creates a tabbed box with given parameters and adds it to the Engine GUI.

Arguments

  • int x - Horizontal space between the widgets in the box and between them and the box border. This is an optional parameter.
  • int y - Vertical space between the widgets in the box and between them and the box border. This is an optional parameter.

string GetCurrentTabData ( ) #

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

Return value

Tab data.

string GetCurrentTabText ( ) #

Returns the title of the current tab.

Return value

Tab title.

void SetImage ( Image image ) #

Sets a tab icons atlas image. This atlas is a vertical strip of square icons.

Arguments

  • Image image - Tabs atlas.

Image GetImage ( ) #

Returns the tab icons atlas image. This atlas is a vertical strip of square icons.

Return value

Tabs atlas.

void SetPadding ( int l, int r, int t, int b ) #

Sets widget paddings for all sides. Padding clears an area around the content of a widget (inside of it).

Arguments

  • int l - Left-side padding in pixels.
  • int r - Right-side padding in pixels.
  • int t - Top padding in pixels.
  • int b - Bottom padding in pixels.

void SetSpace ( int x, int y ) #

Sets a space between the widgets in the box and between them and the box border.

Arguments

  • int x - Horizontal space. If a negative value is provided, 0 will be used instead.
  • int y - Vertical space. If a negative value is provided, 0 will be used instead.

void SetTabData ( int num, string str ) #

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

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.
  • string str - Data to set.

string GetTabData ( int num ) #

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

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.

Return value

Tab data.

void SetTabHidden ( int num, bool hidden ) #

Sets a value indicating that a specified tab should not be rendered visible. By default all widget tabs are visible.

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.
  • bool hidden - 1 for the tab to be invisible; otherwise, 0.

bool IsTabHidden ( int num ) #

Returns a value indicating if the specified tab is invisible.

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.

Return value

1 if the specified tab is invisible; otherwise, 0.

void SetTabText ( int num, string str ) #

Sets a title for the current tab.

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.
  • string str - Tab title.

string GetTabText ( int num ) #

Returns the title of a given tab.

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.

Return value

Tab title.

void SetTabTexture ( int num, int texture ) #

Sets an icon for the specified tab.

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.
  • int texture - Zero-based ID of the icon (icon number in the atlas column). -1 specifies that a tab has no icon.

int GetTabTexture ( int num ) #

Returns the icon of the specified tab.

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.

Return value

Zero-based ID of the icon (icon number in the atlas column). -1 specifies that a tab has no icon.

void SetTabToolTip ( int num, string str ) #

Sets a tooltip for the specified tab.

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.
  • string str - Tooltip to display.

string GetTabToolTip ( int num ) #

Returns the tooltip of the given tab.

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.

Return value

Displayed tooltip.

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

Adds a new tab with a given title and icon to the box.

Arguments

  • string str - Tab title.
  • int texture - Zero-based ID of the icon (icon number in the atlas column). -1 means that a tab has no icon.

Return value

Number of the added tab.

void Clear ( ) #

Removes all tabs from the box.

void RemoveTab ( int num ) #

Removes a given tab from the box.

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.
Last update: 2020-11-24
Build: ()