From 064c6646b3d1f270422dba2caf09b6bc75a1b27d Mon Sep 17 00:00:00 2001 From: Ben Millwood Date: Wed, 14 Oct 2009 22:33:56 +0000 Subject: * New ownerdraw for speedometer - Controlled by cg_drawSpeed, which is a bitfield Bit 1 controls the text draw, bit 2 controls the graph, and bit 4 ignores vertical speed in the calculation. --- assets/ui/menudef.h | 1 + assets/ui/tremulous_common_hud.h | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) (limited to 'assets') diff --git a/assets/ui/menudef.h b/assets/ui/menudef.h index a5f77468..3adc8a1a 100644 --- a/assets/ui/menudef.h +++ b/assets/ui/menudef.h @@ -182,6 +182,7 @@ enum CG_TIMER_SECS, CG_SNAPSHOT, CG_LAGOMETER, + CG_SPEEDOMETER, CG_PLAYER_CROSSHAIRNAMES, CG_STAGE_REPORT_TEXT, CG_ALIENS_SCORE_LABEL, diff --git a/assets/ui/tremulous_common_hud.h b/assets/ui/tremulous_common_hud.h index a5f53356..37610ead 100644 --- a/assets/ui/tremulous_common_hud.h +++ b/assets/ui/tremulous_common_hud.h @@ -90,6 +90,22 @@ itemDef ownerdraw CG_LAGOMETER } +//SPEEDOMETER +itemDef +{ + name "speedometer" + rect (320-(STAT_W/2)) 350 STAT_W STAT_H + aspectBias ALIGN_CENTER + type ITEM_TYPE_OWNERDRAW + ownerdraw CG_SPEEDOMETER + style WINDOW_STYLE_EMPTY + visible MENU_TRUE + decoration + backColor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.2 + foreColor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.8 + textscale 0.3 +} + //CLOCK itemDef { -- cgit