![]() |
Nuclide
Software Development Kit for id Technology (BETA)
|
Trinity Menu File (ui/.menu files) handler.
This class handles the creation of interfaces (Menus, HUDs, in-world interactive displays) using external, plain text scripts.
Opens a named menu.
Closes a named menu. Only affects menus opened with trMenuOpen. When a name is not specified, it's going to close all of the ones that are currently open, including hidden windows.
The original implementation of this script syntax can be found in Quake III: Team Arena (2000), it was shortly after overhauled in the game Return to Castle Wolfenstein (2001), adding the ability to use custom fonts and more.
It then went on to appear primarily in the Call of Duty series, where the syntax itself received almost no modifications from its RtCW origins.
We are currently sticking to a minimal subset of the original implementations (more will be added over time) but also are allowing people to override rendering of items and menus in both the Client Game and the HudC progs.
This way you can write lean, specialized code routines for custom items without having to sub-class. This way the client-game can provide items for use in a game, and a custom HudC progs can then-again override them.
This should allow for sturdy re-use of elements, built on a proven track-record in many best-selling games.
While we've evaluated other ways of defining interface resources, many were incomplete in comparison and would have meant gluing different systems together.
Doom 3 has a slightly more advanced variant, in that it also has means of handling state. The syntax in that implementation has also changed in ways that make it incompatible with our implementation.
Since we can allocate console variables on the fly, we already have means of storing our own state. Currently exploring options.
Public Member Functions | |
| nonvirtual vguiTrUIMenu | CreateFromMenuFile (vguiWidget parent, string filePath) |
| nonvirtual void | CloseAll (void) |
| nonvirtual int | InterpretLine (vguiWidget parent, int i, int lineNr, float wordsPerLine) |
| nonvirtual void | InterpretCommand (vguiWidget originWidget, string commandString) |
| void vguiTrUIMenu::CloseAll | ( | void | ) |
| vguiTrUIMenu vguiTrUIMenu::CreateFromMenuFile | ( | vguiWidget | parent, |
| string | filePath | ||
| ) |
| void vguiTrUIMenu::InterpretCommand | ( | vguiWidget | originWidget, |
| string | commandString | ||
| ) |
| int vguiTrUIMenu::InterpretLine | ( | vguiWidget | parent, |
| int | i, | ||
| int | lineNr, | ||
| float | wordsPerLine | ||
| ) |