From 5330c2c5e3bc0d911abae8eb8afdac81c6e0b003 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Mon, 28 Feb 2011 19:03:38 +0200 Subject: [PATCH] Add crosshair ring setting to menu --- data/qcsrc/client/View.qc | 6 +++--- .../menu/voret/dialog_multiplayer_playersetup_weapons.c | 9 ++++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/data/qcsrc/client/View.qc b/data/qcsrc/client/View.qc index bdfb160e..ca0fa126 100644 --- a/data/qcsrc/client/View.qc +++ b/data/qcsrc/client/View.qc @@ -1062,13 +1062,13 @@ void CSQC_UpdateView(float w, float h) wcross_name_alpha_goal_prev = f; // ring around crosshair representing bullets left in weapon clip + a = cvar("crosshair_ring_alpha"); weapon_clipload = getstati(STAT_WEAPON_CLIPLOAD); - if (weapon_clipload) + if (weapon_clipload && a) { - weapon_clipsize = getstati(STAT_WEAPON_CLIPSIZE); f = bound(0, weapon_clipload / weapon_clipsize, 1); ring_scale = cvar("crosshair_ring_size"); - a = cvar("crosshair_ring_alpha"); + weapon_clipsize = getstati(STAT_WEAPON_CLIPSIZE); DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", f, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE); } } diff --git a/data/qcsrc/menu/voret/dialog_multiplayer_playersetup_weapons.c b/data/qcsrc/menu/voret/dialog_multiplayer_playersetup_weapons.c index f7877271..7c30f9b3 100644 --- a/data/qcsrc/menu/voret/dialog_multiplayer_playersetup_weapons.c +++ b/data/qcsrc/menu/voret/dialog_multiplayer_playersetup_weapons.c @@ -6,7 +6,7 @@ CLASS(VoretWeaponsDialog) EXTENDS(VoretDialog) ATTRIB(VoretWeaponsDialog, title, string, "Weapon & Crosshair settings") ATTRIB(VoretWeaponsDialog, color, vector, SKINCOLOR_DIALOG_WEAPONS) ATTRIB(VoretWeaponsDialog, intendedWidth, float, 0.5) - ATTRIB(VoretWeaponsDialog, rows, float, 15) + ATTRIB(VoretWeaponsDialog, rows, float, 16) ATTRIB(VoretWeaponsDialog, columns, float, 4) ATTRIB(VoretWeaponsDialog, weaponsList, entity, NULL) ENDCLASS(VoretWeaponsDialog) @@ -42,8 +42,8 @@ void fillVoretWeaponsDialog(entity me) e.onClickEntity = me.weaponsList; me.TR(me); me.TDempty(me, 0.3); - me.TD(me, 1, 3, e = makeVoretCheckBox(0, "cl_weaponpriority_useforcycling", "Use priority list for weapon cycling"));*/ - /*me.TR(me); + me.TD(me, 1, 3, e = makeVoretCheckBox(0, "cl_weaponpriority_useforcycling", "Use priority list for weapon cycling")); + me.TR(me); me.TDempty(me, 0.3); me.TD(me, 1, 3, e = makeVoretCheckBox(0, "cl_autoswitch", "Auto switch weapons on pickup"));*/ @@ -87,6 +87,9 @@ void fillVoretWeaponsDialog(entity me) me.TD(me, 1, 2.5/3, e = makeVoretRadioButton(2, "crosshair_hittest", "0", "None")); me.TD(me, 1, 2.5/3, e = makeVoretRadioButton(2, "crosshair_hittest", "1", "TrueAim")); me.TD(me, 1, 2.5/3, e = makeVoretRadioButton(2, "crosshair_hittest", "1.25", "Enemies")); + me.TR(me); + me.TDempty(me, 0.3); + me.TD(me, 1, 2, e = makeVoretCheckBoxEx(0.5, 0, "crosshair_ring_alpha", "Crosshair ring")); me.TR(me); me.TR(me); -- 2.39.2