mySize_y
);
- draw_teamradar_background(hud_panel_radar_background_alpha, hud_panel_radar_foreground_alpha);
+ draw_teamradar_background(hud_panel_radar_foreground_alpha);
for(tm = world; (tm = find(tm, classname, "radarlink")); )
draw_teamradar_link(tm.origin, tm.velocity, tm.team);
pos = (vid_conheight - numsize_y) * cvar("cl_showspeed_position");
drawfont = hud_bigfont;
- drawstringcenter(eX + pos * eY, speed, numsize, '1 1 1', hud_fg_alpha, DRAWFLAG_NORMAL);
+ drawstringcenter(eX + pos * eY, speed, numsize, '1 1 1', autocvar_hud_panel_fg_alpha, DRAWFLAG_NORMAL);
if (cvar("cl_showspeed_z") == 1) {
zspeed = strcat(ftos(fabs(floor( pmove_vel_z * conversion_factor + 0.5 ))), unit);
- drawstringcenter(eX + pos * eY + numsize_y * eY, zspeed, numsize * 0.5, '1 1 1', hud_fg_alpha, DRAWFLAG_NORMAL);
+ drawstringcenter(eX + pos * eY + numsize_y * eY, zspeed, numsize * 0.5, '1 1 1', autocvar_hud_panel_fg_alpha, DRAWFLAG_NORMAL);
}
drawfont = hud_font;
}
if (acceleration > 0)
- HUD_Panel_DrawProgressBar(pos, 0, acceleration * scale * '40 0 0' + sz * eY, rgb, alpha * hud_fg_alpha, DRAWFLAG_NORMAL);
+ HUD_Panel_DrawProgressBar(pos, 0, acceleration * scale * '40 0 0' + sz * eY, rgb, alpha * autocvar_hud_panel_fg_alpha, DRAWFLAG_NORMAL);
else if (acceleration < 0)
- HUD_Panel_DrawProgressBar(pos + acceleration * scale * '40 0 0', 0, -acceleration * scale * '40 0 0' + sz * eY, rgb, alpha * hud_fg_alpha, DRAWFLAG_NORMAL);
+ HUD_Panel_DrawProgressBar(pos + acceleration * scale * '40 0 0', 0, -acceleration * scale * '40 0 0' + sz * eY, rgb, alpha * autocvar_hud_panel_fg_alpha, DRAWFLAG_NORMAL);
}
void HUD_Reset (void)
menu_fade_alpha = 1;
else
menu_fade_alpha = (1 - autocvar__menu_alpha);
- hud_fg_alpha = cvar("hud_fg_alpha");
hud_border_thickness = bound(0, cvar("hud_border_thickness"), 5);
hud_accuracy_border_thickness = bound(0, cvar_or("hud_accuracy_border_thickness", 1), 5);
return v;
}
-void draw_teamradar_background(float bg, float fg)
+void draw_teamradar_background(float fg)
{
float fga;
vector fgc;
rgb2 = '1 1 1';
R_BeginPolygon("", 0);
- R_PolygonVertex(coord+v_forward*3, '0 0 0', rgb2, hud_fg_alpha);
- R_PolygonVertex(coord+v_right*4-v_forward*2.5, '0 1 0', rgb2, hud_fg_alpha);
- R_PolygonVertex(coord-v_forward*2, '1 0 0', rgb2, hud_fg_alpha);
- R_PolygonVertex(coord-v_right*4-v_forward*2.5, '1 1 0', rgb2, hud_fg_alpha);
+ R_PolygonVertex(coord+v_forward*3, '0 0 0', rgb2, autocvar_hud_panel_fg_alpha);
+ R_PolygonVertex(coord+v_right*4-v_forward*2.5, '0 1 0', rgb2, autocvar_hud_panel_fg_alpha);
+ R_PolygonVertex(coord-v_forward*2, '1 0 0', rgb2, autocvar_hud_panel_fg_alpha);
+ R_PolygonVertex(coord-v_right*4-v_forward*2.5, '1 1 0', rgb2, autocvar_hud_panel_fg_alpha);
R_EndPolygon();
R_BeginPolygon("", 0);
- R_PolygonVertex(coord+v_forward*2, '0 0 0', rgb, hud_fg_alpha);
- R_PolygonVertex(coord+v_right*3-v_forward*2, '0 1 0', rgb, hud_fg_alpha);
- R_PolygonVertex(coord-v_forward, '1 0 0', rgb, hud_fg_alpha);
- R_PolygonVertex(coord-v_right*3-v_forward*2, '1 1 0', rgb, hud_fg_alpha);
+ R_PolygonVertex(coord+v_forward*2, '0 0 0', rgb, autocvar_hud_panel_fg_alpha);
+ R_PolygonVertex(coord+v_right*3-v_forward*2, '0 1 0', rgb, autocvar_hud_panel_fg_alpha);
+ R_PolygonVertex(coord-v_forward, '1 0 0', rgb, autocvar_hud_panel_fg_alpha);
+ R_PolygonVertex(coord-v_right*3-v_forward*2, '1 1 0', rgb, autocvar_hud_panel_fg_alpha);
R_EndPolygon();
};
c1 = colormapPaletteColor((colors & 0xF0) / 0x10, FALSE);
R_BeginPolygon("", 0);
- R_PolygonVertex(start - norm, '0 0 0', c0, hud_fg_alpha);
- R_PolygonVertex(start + norm, '0 1 0', c0, hud_fg_alpha);
- R_PolygonVertex(end + norm, '1 1 0', c1, hud_fg_alpha);
- R_PolygonVertex(end - norm, '1 0 0', c1, hud_fg_alpha);
+ R_PolygonVertex(start - norm, '0 0 0', c0, autocvar_hud_panel_fg_alpha);
+ R_PolygonVertex(start + norm, '0 1 0', c0, autocvar_hud_panel_fg_alpha);
+ R_PolygonVertex(end + norm, '1 1 0', c1, autocvar_hud_panel_fg_alpha);
+ R_PolygonVertex(end - norm, '1 0 0', c1, autocvar_hud_panel_fg_alpha);
R_EndPolygon();
}
float hud_panel_radar_scale;
-float hud_panel_radar_background_alpha;
float hud_panel_radar_foreground_alpha;
float hud_panel_radar_rotation;
vector hud_panel_radar_size;
{
v_flipped = cvar("v_flipped");
hud_panel_radar_scale = cvar("hud_panel_radar_scale");
- hud_panel_radar_background_alpha = cvar("hud_panel_radar_background_alpha") * hud_fg_alpha;
- hud_panel_radar_foreground_alpha = cvar("hud_panel_radar_foreground_alpha") * hud_fg_alpha;
+ hud_panel_radar_foreground_alpha = cvar("hud_panel_radar_foreground_alpha") * autocvar_hud_panel_fg_alpha;
hud_panel_radar_rotation = cvar("hud_panel_radar_rotation");
hud_panel_radar_zoommode = cvar("hud_panel_radar_zoommode");
// others default to 0
// match this to defaultXonotic.cfg!
if(!hud_panel_radar_scale) hud_panel_radar_scale = 4096;
- if(!hud_panel_radar_background_alpha) hud_panel_radar_background_alpha = 0.4 * hud_fg_alpha;
- if(!hud_panel_radar_foreground_alpha) hud_panel_radar_foreground_alpha = 0.8 * hud_fg_alpha;
+ if(!hud_panel_radar_foreground_alpha) hud_panel_radar_foreground_alpha = 0.8 * autocvar_hud_panel_fg_alpha;
if(!hud_panel_radar_size_x) hud_panel_radar_size_x = 128;
if(!hud_panel_radar_size_y) hud_panel_radar_size_y = hud_panel_radar_size_x;