// Radar (#6)
+void HUD_Radar_Export(entity panel, int fh)
+{
+ // allow saving cvars that aesthetically change the panel into hud skin files
+ HUD_Write_Cvar("hud_panel_radar_foreground_alpha");
+ HUD_Write_Cvar("hud_panel_radar_rotation");
+ HUD_Write_Cvar("hud_panel_radar_zoommode");
+ HUD_Write_Cvar("hud_panel_radar_scale");
+ HUD_Write_Cvar("hud_panel_radar_maximized_scale");
+ HUD_Write_Cvar("hud_panel_radar_maximized_size");
+ HUD_Write_Cvar("hud_panel_radar_maximized_rotation");
+ HUD_Write_Cvar("hud_panel_radar_maximized_zoommode");
+}
+
bool HUD_Radar_Clickable()
{
return hud_panel_radar_mouse && !hud_panel_radar_temp_hidden;
{
if (clickable)
{
- if(autocvar_hud_cursormode)
- setcursormode(1);
hud_panel_radar_mouse = 1;
// we must unset the player's buttons, as they aren't released elsewhere
{
hud_panel_radar_mouse = 0;
mouseClicked = 0;
- if(autocvar_hud_cursormode)
- if(!mv_active)
- setcursormode(0);
}
}
void HUD_Radar_Hide_Maximized()
return;
}
- if (!autocvar_hud_cursormode)
- update_mousepos();
-
panel = HUD_PANEL(RADAR);
HUD_Panel_LoadCvars();
HUD_Radar_Hide_Maximized();
return;
}
-
-
- draw_cursor_normal(mousepos, '1 1 1', 0.8);
}
void HUD_Radar()
IL_EACH(g_radaricons, it.teamradar_icon, {
if ( hud_panel_radar_mouse )
- if ( GetResourceAmount(it, RESOURCE_HEALTH) >= 0 )
- if ( it.team == myteam + 1 || gametype == MAPINFO_TYPE_RACE || !teamplay )
+ if ( GetResource(it, RES_HEALTH) >= 0 )
+ if ( it.team == myteam + 1 || ISGAMETYPE(RACE) || !teamplay )
{
vector coord = teamradar_texcoord_to_2dcoord(teamradar_3dcoord_to_texcoord(it.origin));
if(vdist((mousepos - coord), <, 8))
if ( hud_panel_radar_mouse )
{
- string message = "Click to select teleport destination";
+ string message = _("Click to select teleport destination");
if ( STAT(HEALTH) <= 0 )
{
- message = "Click to select spawn location";
+ message = _("Click to select spawn location");
}
drawcolorcodedstring(pos + '0.5 0 0' * (mySize_x - stringwidth(message, true, hud_fontsize)) - '0 1 0' * hud_fontsize_y * 2,