![]() |
Nuclide
Software Development Kit for id Technology (BETA)
|
Truly versatile user interface, for menus and in-game surfaces. More...
Truly versatile user interface, for menus and in-game surfaces.
Nuclide ships with this component as the default interface library.
Its design goals were to be easily customizable through some common parameters, and a per-object based theme engine for anything more advanced. It also needed to be usable on in-game surfaces.
You can make trivial changes using external UI styling files, this is not following any specific spec and may be subject to change some day to adopt something more standardized.
Currently however you can modify the file (create them if they don't exist) named scripts/ui_style.txt
. Said file will contain a variety of key/value pairs:
If a file named scripts/client_style.txt
exists, it will be read instead by the client-game - but not by the main menu. That way you can have different colorschemes for both modules at the same time.
This file will give you a grey menu, with white text that's slightly transparent and has no icons, but rounded corners:
Theming an object through more advanced means is possible with vguiTheme. vguiTheme is responsible for theming everything, but it is also designed to co-exist with other theme engines.
Use vguiWidget::SetTheme() to override the theme engine any of your widgets are using with an instance of your own. For that, make a child-class of vguiTheme and override the methods you want changed within it. Then use the aforementioned method to override it on a per-object basis.
While you can theme individual elements, all of their child-widgets (e.g. the close button on a window) will inherit the theme of their parent by default.
Classes | |
class | vgui3DView |
VGUI Widget: 3D View. More... | |
class | vguiButton |
VGUI Widget: Button. More... | |
class | vguiCheckbox |
VGUI Widget: Checkbox. More... | |
class | vguiColor |
Container class that'll deal with handling colors via a variety of different means. More... | |
class | vguiCommandButton |
VGUI Widget: Command Menu Button. More... | |
class | vguiControl |
VGUI: Abstract Control Class. More... | |
class | vguiFrame |
VGUI Widget: Frame. More... | |
class | vguiLabel |
VGUI Widget: Label. More... | |
class | vguiList |
VGUI Widget: List. More... | |
class | vguiListBox |
VGUI Widget: List Box. More... | |
class | vguiMenuButton |
VGUI Widget: Menu Button. More... | |
class | vguiMenuTitle |
VGUI Widget: Menu Title. More... | |
class | vguiPic |
VGUI Widget: Picture Frame. More... | |
class | vguiProgressBar |
VGUI Widget: Frame. More... | |
class | vguiRadio |
VGUI Widget: Radio Button. More... | |
class | vguiRect |
VGUI Widget: Picture Frame. More... | |
class | vguiSlider |
VGUI Widget: Slider. More... | |
class | vguiTabView |
VGUI Widget: Tab View. More... | |
class | vguiTabViewItem |
VGUI Widget: Button. More... | |
class | vguiTextBox |
VGUI Widget: Text Box. More... | |
class | vguiTextView |
VGUI Widget: Text View. More... | |
class | vguiView |
VGUI Widget: Sub-view. More... | |
class | vguiWindow |
VGUI: Window. More... | |
Functions | |
bool | VGUI_Active (void) |
Return whether a VGUI panel is active on the 2D overlay level. More... | |
bool | Util_MouseAbove (vector vecMousePos, vector vecPos, vector vecSize) |
Returns whether our mouse cursor is in a specific region of the screen. More... | |
void | UISystem_Init (void) |
vguiWidget | UIClass_Spawn (string cname) |
vguiWidget UIClass_Spawn | ( | string | cname | ) |
void UISystem_Init | ( | void | ) |
bool Util_MouseAbove | ( | vector | vecMousePos, |
vector | vecPos, | ||
vector | vecSize | ||
) |
Returns whether our mouse cursor is in a specific region of the screen.
bool VGUI_Active | ( | void | ) |
Return whether a VGUI panel is active on the 2D overlay level.