seta hud_panel_weapons_timeout_speed_in "" "speed that fading/moving onto the screen occurs"
seta hud_panel_weapons_timeout_speed_out "" "speed that fading/moving off of the screen occurs"
seta hud_panel_weapons_label "" "1 = show number of weapon, 2 = show bound key of weapon, 3 = show name of weapon"
+seta hud_panel_weapons_label_scale "" "scale of the weapon text label"
seta hud_panel_weapons_accuracy "" "show accuracy color as the weapon icon background; colors can be configured with accuracy_color* cvars"
seta hud_panel_weapons_ammo "" "show ammo as a status bar"
seta hud_panel_weapons_onlyowned "" "show only owned weapons"
seta hud_panel_weapons_bg_padding "4"
seta hud_panel_weapons_accuracy "1"
seta hud_panel_weapons_label "1"
+seta hud_panel_weapons_label_scale "0.5"
seta hud_panel_weapons_complainbubble "1"
seta hud_panel_weapons_complainbubble_padding "-1"
seta hud_panel_weapons_complainbubble_time "0"
seta hud_panel_weapons_bg_padding ""
seta hud_panel_weapons_accuracy "1"
seta hud_panel_weapons_label "1"
+seta hud_panel_weapons_label_scale "0.5"
seta hud_panel_weapons_complainbubble "1"
seta hud_panel_weapons_complainbubble_padding "-1"
seta hud_panel_weapons_complainbubble_time "0"
seta hud_panel_weapons_bg_padding ""
seta hud_panel_weapons_accuracy "1"
seta hud_panel_weapons_label "1"
+seta hud_panel_weapons_label_scale "0.5"
seta hud_panel_weapons_complainbubble "1"
seta hud_panel_weapons_complainbubble_padding "-1"
seta hud_panel_weapons_complainbubble_time "0"
seta hud_panel_weapons_bg_padding ""
seta hud_panel_weapons_accuracy "1"
seta hud_panel_weapons_label "1"
+seta hud_panel_weapons_label_scale "0.5"
seta hud_panel_weapons_complainbubble "1"
seta hud_panel_weapons_complainbubble_padding "-1"
seta hud_panel_weapons_complainbubble_time "0"
seta hud_panel_weapons_bg_padding "-5"
seta hud_panel_weapons_accuracy "1"
seta hud_panel_weapons_label "1"
+seta hud_panel_weapons_label_scale "0.5"
seta hud_panel_weapons_complainbubble "1"
seta hud_panel_weapons_complainbubble_padding "-1"
seta hud_panel_weapons_complainbubble_time "0"
float autocvar_hud_panel_weapons_complainbubble_padding;
float autocvar_hud_panel_weapons_complainbubble_time;
float autocvar_hud_panel_weapons_label;
+float autocvar_hud_panel_weapons_label_scale = 0.5;
float autocvar_hud_panel_weapons_onlyowned;
float autocvar_hud_panel_weapons_timeout;
float autocvar_hud_panel_weapons_timeout_effect;
if(autocvar_hud_panel_weapons_accuracy)
Accuracy_LoadColors();
+ // draw items
row = column = 0;
+ vector label_size = '1 1 0' * min(weapon_size_x, weapon_size_y) * bound(0, autocvar_hud_panel_weapons_label_scale, 1);
for(i = 0; i <= WEP_LAST-WEP_FIRST; ++i)
{
// retrieve information about the current weapon to be drawn
switch(autocvar_hud_panel_weapons_label)
{
case 1: // weapon number
- drawstring(weapon_pos, ftos(weapon_id), '1 1 0' * 0.5 * weapon_size_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawstring(weapon_pos, ftos(weapon_id), label_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
break;
case 2: // bind
- drawstring(weapon_pos, getcommandkey(ftos(weapon_id), strcat("weapon_group_", ftos(weapon_id))), '1 1 0' * 0.5 * weapon_size_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawstring(weapon_pos, getcommandkey(ftos(weapon_id), strcat("weapon_group_", ftos(weapon_id))), label_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
break;
case 3: // weapon name
- drawstring(weapon_pos, strtolower(self.message), '1 1 0' * 0.5 * weapon_size_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawstring(weapon_pos, strtolower(self.message), label_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
break;
default: // nothing
case HUD_PANEL_WEAPONS:
HUD_Write_PanelCvar_q("_accuracy");
HUD_Write_PanelCvar_q("_label");
+ HUD_Write_PanelCvar_q("_label_scale");
HUD_Write_PanelCvar_q("_complainbubble");
HUD_Write_PanelCvar_q("_complainbubble_padding");
HUD_Write_PanelCvar_q("_complainbubble_time");
ATTRIB(XonoticHUDWeaponsDialog, title, string, _("Weapons Panel"))
ATTRIB(XonoticHUDWeaponsDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
ATTRIB(XonoticHUDWeaponsDialog, intendedWidth, float, 0.4)
- ATTRIB(XonoticHUDWeaponsDialog, rows, float, 18)
+ ATTRIB(XonoticHUDWeaponsDialog, rows, float, 19)
ATTRIB(XonoticHUDWeaponsDialog, columns, float, 4)
ATTRIB(XonoticHUDWeaponsDialog, name, string, "HUDweapons")
ATTRIB(XonoticHUDWeaponsDialog, requiresConnection, float, TRUE)
me.TD(me, 1, 0.8, e = makeXonoticRadioButton(2, "hud_panel_weapons_label", "0", ZCTX(_("SHOWAS^None"))));
me.TD(me, 1, 0.8, e = makeXonoticRadioButton(2, "hud_panel_weapons_label", "1", _("Number")));
me.TD(me, 1, 0.8, e = makeXonoticRadioButton(2, "hud_panel_weapons_label", "2", _("Bind")));
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Weapon ID scale:")));
+ me.TD(me, 1, 2.4, e = makeXonoticSlider(0.1, 1, 0.05, "hud_panel_weapons_label_scale"));
+ setDependent(e, "hud_panel_weapons_label", 1, 2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 3.8/2, e = makeXonoticCheckBox(0, "hud_panel_weapons_accuracy", _("Show Accuracy")));
me.TD(me, 1, 3.8/2, e = makeXonoticCheckBox(0, "hud_panel_weapons_ammo", _("Show Ammo")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Ammo bar color:")));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString("hud_panel_weapons_ammo_color", "hud_panel_weapons_ammo_color"));
+ me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Ammo bar alpha:")));
+ me.TD(me, 1, 2.4, e = makeXonoticSlider(0.1, 1, 0.1, "hud_panel_weapons_ammo_alpha"));
setDependent(e, "hud_panel_weapons_ammo", 1, 1);
- me.TR(me);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Ammo bar alpha:")));
- me.TD(me, 1, 2.4, e = makeXonoticSlider(0.1, 1, 0.1, "hud_panel_weapons_ammo_alpha"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Ammo bar color:")));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString("hud_panel_weapons_ammo_color", "hud_panel_weapons_ammo_color"));
setDependent(e, "hud_panel_weapons_ammo", 1, 1);
+ me.TR(me);
}
#endif