UI Implementation

From Unvanquished
Jump to: navigation, search

Legacy

Information 48x48.png

Note

Please be aware that the information in this section describes the legacy (menu file–based) GUI.

User interface code runs in its own virtual machine. Source code for handling user interface controls and loading UI files may be found in src/gamelogic/ui/; the actual UI content is controlled by configuration files found in main/ui/. The list of menu files is found in main/ui/menus.txt. The game will not run without this file present.

Editing tools

There is a Quake 3 HUD editor called q3cmpa hud editor (which is no longer maintained), and a newer version called SuperHud Editor, which appears to be built using wxWidgets.

Troubleshooting

Game crashes for an unknown reason

Your main/ui/menudef.h file may be out of date.

Implementation-Independent GUI Behavior

This information applies to both the legacy and libRocket GUI implementations.

Weapon icons

Weapon icons are controlled by the icon entry in the weapon's configuration file.

libRocket GUI

A move to use libRocket has been planned with support underway. This middleware will allow creating the user interface using HTML and CSS. If you are interested in assisting with the transition, please contact a member of the team to find out how to help.

libRocket Integration Progress

General

  • Get libRocket to play nicely with q3 shaders [woo, done]
  • Clean up the generic RocketElement class used to draw all the ownerdraws [75%]
  • Remove ui_shared.c cgame dependence [50%]
  • Analyze potential of adding future animations [waaaaaaaaaay in the future, if at all] DukeNukem3D Megaton

Data Sources (aka feeders)

Name Description Status
Resolutions list of resolutions Implemented
VoIP Input Input devices for OpenAL Implemented
AL Output Output devices for OpenAL Implemented
HUDS List of HUDs to choose from Not Implemented
Languages List of languages Implemented
Mods List of mods Implemented
Demos List of demos Implemented
Maps List of maps Implemented
Players on team List of players on each team Implemented
Players List of players. This and above can probably be combined. Combined with the above
Server status Detailed information on a server // Probably can implement without a feeder. Implemented
Find player Results for a multiserver player search. Not Implemented
Team list List of available teams Implemented
Classes List of classes per team Implemented
Items List of available items per team Implemented
Armory items List of items. Can probably be merged with above. Implemented
Alien evo classes List of classes that can be evo'd to. Implemented
Buildable menu List of buildables that can be built Implemented
Ignore List of players/patterns player has ignored Not Implemented
Help List of help topics Not Implementing.

Missing Elements

  • Chat field - Field for chat.
  • Selectable datagrid - Selectable table, essentially. Warsow has this. Can probably port. [done]
  • Model view - Display a model. Low priority imo. Won't do unless there is demand.
  • Key select - Detect which key is pressed. For binds. [done]

HUD Elements

The health element

End tag: Required

Renders the player's current health.



The bar element

End tag: Required

Draws a progress bar.

item = cvar

The name of the cvar that determines the current value of the progress bar.


maxValue = cvar

The name of the cvar that specifies the maximum value of the progress bar; when item reaches this value, the progress bar will be rendered completely full.


img = string

If a solid bar is not desired, the image that will be used to render the bar.


direction = left|right|up|down

The direction that the bar decreases.


The ammo element

End tag: Required

Current ammo value.

type = all|clip

Determines whether to show current clip's ammo or total ammo.


The clips element

End tag: Required

Current number of clips



The btimer element

End tag: Required

Displays a build timer.



The credits element

End tag: Required

Credits/evos available.

precision = integer

Determines the number of leading decimal places (?)


The stamina element

End tag: Required

Available stamina



The boost element

End tag: Required

Displays the current status of the boost and the time remaining before it is lost.



The selected element

End tag: Required

Displays the icon of the currently selected item.



The weapon element

End tag: Required

Displays the icon of the currently equipped weapon.



The wallclimb element

End tag: Required

Wall climbing status indicator.



The alien_sense element

End tag: Required

Alien radar.



The scanner element

End tag: Required

Human radar.



The useable_buildable element

End tag: Required

Indicates to the player when they are within range of a usable buildable.



The location element

End tag: Required

Displays the name of the location in which the player is currently occupying, as set by the map author.



The team_overlay element

End tag: Required

Team overlay which shows useful team info



The fps element

End tag: Required

Displays the current framerate, in frames per second.



The timer element

End tag: Required

Displays the time since the game began.



The lagometer element

End tag: Required

Displays a scrolling graph of the quality of the player's connection over time.



The speedometer element

End tag: Required

Displays the player's current speed.



The crosshair_name element

End tag: Required

Displays the name of the player currently in the crosshair, if it is appropriate to show.



The stage_report element

End tag: Required

Indicates what percentage of map control is needed to advance to the next stage.



The demo element

End tag: Required

Displays the state of demo recording or playback.