VGUI Documentation(01)

Overview

概况

The VGUI2 library (vgui2.dll) is a proprietary graphic user interface (GUI) provided by the Source Engine.

VGUI2 (vgui2.dll) 是一个由Source引擎提供的专有图形用户接口(图形用户接口)

All Source & Steam applications use VGUI for displaying windows, dialogs or menus.

所有的Source & Steam应用程序都使用 VGUI 显示窗户,会话或菜单。

The object architecture is hierarchical and all implemented elements drive from VGUI base classes.

这个库是分级构建的并且所有的实现元素都继承自 VGUI 的基础类。

The keyboard & mouse input system is event driven and quite similar to other GUI libraries (like Java Swing or .NET forms).

键盘和鼠标输入系统的事件驱动模式和其他的图形用户接口是非常相似的。 ( 类似于JAVA Swing和.Net forms)

Implementations for the most common GUI elements like buttons, text fields or images are provided by the VGUI controls library (vgui_controls.lib).

VGUI controls (vgui_controls.lib),实现常用的GUI元素如按钮、文字区域或图片。

Besides drawing GUI elements and processing input, VGUI also handles localization for displaying text in the preferred user language.

除绘制GUI元素和处理输入之外,VGUI还处理语言的本地化。

All VGUI base interface headers are located in \public\vgui\, control elements are defined in \public\vgui_controls\.

所有的VGUI基础接口头文件位于 in\ public\vgui\目录, 控制元素则被定义在 in\ public\vgui_control\目录。

 

As a mod author you will most likely use VGUI in the client.dll project to show menus, HUD elements or for in-game displays (on weapons or computer terminals etc).

如果你是一个Mod开发者你可能将非常喜欢使用VGUI库在client.dll 项目中显示菜单HUD 元素或在游戏中其他显示的运用。 ( 在武器或客户端……)

The base class all VGUI elements derive from is vgui::Panel, which defines an area on your screen that has a specific size and position, can draw itself and process input events.

所有的VGUI 元素基础类都继承自 vgui::Panel, 这些基础类型可以在你的屏幕上定义一个指定大小位置区域,并能绘制本身且处理对应的输入事件。

Dialog windows, text fields and buttons are all VGUI panels in a hierarchical parent-child relationship.

会话窗、文本域和按钮与所有的VGUI面板类是继承关系。

The very first panel is the root panel and is provided by the Source engine.

最初面板是一个基础面板,它由Source引擎提供。

The client root panel covers the whole screen, but doesn't show anything.

这个基础面板覆盖整个屏幕,但不能显示任何东西。

Even though you could use the client root panel, most client panels use the shared BaseViewport panel as parent ( g_pClientMode->GetViewport() ).

大多数的客户端面板都继承自shared BaseViewport panel(g_pClientMode->GetViewport())

 

This diagram shows a part of the client panel hierarchy.

这一个图表展示了客户端面板的层次结构。

An arrow from panel a to panel b means that a is parent of b :

对象A指向对象B ,表示A是B的父类 :

 

To browse through the VGUI panel hierarchy during runtime, you can open the VGUI Hierarchy tool by executing in developer console vgui_drawtree 1.

为了要在运行时间期间浏览 VGUI 面板嵌板组织结构,你可以由在开发者控制台中输入 vgui_drawtree 1 命令,运行VGUI组织结构工具。

All panels are listed in an expandable tree view.

所有的面板列表在可展开成书型显示。

面板名字颜色:

white

面板不可用

grey

面板隐藏

yellow

弹出面板 (Frame)

green

当前面板

The following options are available:

Show Visible

list all visible panels

Show Hidden

list all hidden panels

Popups only

list only Popup panels (Frames)

Highlight Mouse Over

Panels are highlighted with a colored border when you move the mouse cursor over. The panel tree will be expanded to show the current panel.

Freeze

Locks current tree view

Show Addresses

shows panel memory address

Show Alpha

show panel alpha value, 0 = translucent, 255 = opaque

In Render Order

posted on 2007-06-07 17:04 找东西 阅读(472) 评论(0)  编辑 收藏 引用 所属分类: 工作日志


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理


<2007年6月>
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

导航

统计

常用链接

留言簿(1)

随笔分类(5)

随笔档案(5)

文章分类(4)

文章档案(4)

收藏夹

友情链接

搜索

最新评论

阅读排行榜

评论排行榜