UI Implementation

From Unvanquished
Revision as of 14:38, 7 May 2013 by Ishq (Talk | contribs) (Data Sources (aka feeders))

Jump to: navigation, search

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.

Weapon icons

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

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.

Transition to libRocket

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 Progress

General

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

Data Sources (aka feeders)

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

Missing Elements

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

Ownerdraws

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



  • <btimer /> - Build timer display
  • <credits precision=(decimal places) /> - Credits/evos available.
  • <stamina /> - Available stamina
  • <boost /> - Boosted status and time remaining
  • <selected /> - Item selected
  • <weapon /> - selected weapon icon
  • <wallclimb /> - Wall climbing status indicator
  • <alien_sense /> - Alien radar
  • <scanner /> - Human radar
  • <useable_buildable /> - Indicator that you are near a usable buildable
  • <location /> - Player location text
  • <team_overlay /> - Team overlay which shows useful team info
  • <fps /> - Frames per second
  • <timer /> - Time since game began
  • <lagometer /> - Lagometer. Quality of connection
  • <speedometer /> - Wheeee. Current speed.
  • <crosshair_name /> - Name of player in crosshair
  • <stage_report /> - Stage report. % of mapcontrol needed for next stage
  • <demo /> - State of demo. eg, recording/playing