This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
资源工作流程
版本控制
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
材质和着色器
Rebuilding the Engine Tools
GUI
VR Development
双精度坐标
应用程序接口
Animations-Related Classes
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
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
VR-Related Classes
创建内容
内容优化
材质
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Widgets

Samples in this section illustrate the use of the GUI-Related classes.本节中的示例演示了GUI相关的类的使用。

UserInterfaceUserInterface#

Creating a user interface and assigning callbacks via C++ API.创建一个用户界面,并通过С++ API分配回调。

WidgetCallbacksWidgetCallbacks#

Working with widget callbacks via C++ API.通过С++ API处理小部件回调。

WidgetCanvasWidgetCanvas#

Creating a widget canvas via C++ API by using the WidgetCanvas class.通过С++ API使用WidgetCanvas类创建一个小部件画布。

WidgetDialogWidgetDialog#

Creating widget dialog windows and assigning callbacks via C++ API.创建小部件对话框窗口,并通过С++ API分配回调。

WidgetExternWidgetExtern#

Creating a custom widget based on WidgetExternBase via C++ API and exporting it to UngineScript.通过С++ API创建基于WidgetExternBase的自定义小部件,并将其导出为UngineScript

WidgetLifetimeWidgetLifetime#

The sample demonstrates managing the widget lifetime in three ways: while the world is loaded (LIFETIME_WORLD), while the window containing the widgets is open (LIFETIME_WINDOW), and while the engine is running (LIFETIME_ENGINE).该示例演示了以三种方式管理小部件生命周期:在世界处于加载状态时(LIFETIME_WORLD),在包含小部件的窗口打开时(LIFETIME_WINDOW),以及在引擎运行时(LIFETIME_ENGINE)。

The main window named World Lifetime Widgets contains widgets with LIFETIME_WORLD — these widgets are deleted as the world is closed or reloaded. The console will display the corresponding callback messages (world hbox hierarchy removed, world user interface group removed, world button removed).主窗口World Lifetime Widgets包含带有LIFETIME_WORLD的小部件,这些小部件在世界关闭或重新加载时被删除。控制台将显示相应的回调消息(world hbox hierarchy removed, world user interface group removed, world button removed)。

The widgets in the Window Lifetime Widgets window are deleted as soon as this window is closed. This action is also followed by the corresponding console messages.Window Lifetime Widgets窗口中的小部件将在该窗口关闭后立即删除。此操作之后还有相应的控制台消息。

The widgets in the Engine Lifetime Widgets window are only deleted on the engine shutdown. The corresponding callback messages can be seen in the log.txt file.Engine Lifetime Widgets 窗口中的小部件仅在引擎关闭时删除。相应的回调消息可以在log.txt文件中看到。

Manual managing (LIFETIME_MANUAL) of the widget lifetime is not illustrated in this sample.本示例中没有说明使用LIFETIME_MANUAL管理小部件生命周期。

WidgetWindowWidgetWindow#

Creating a widget window and assigning callbacks on edit line and button press events.创建一个小部件窗口并在 行编辑按钮按下 事件上分配回调。

最新更新: 2023-12-19
Build: ()