Add crosshair ring setting to menu
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 28 Feb 2011 17:03:38 +0000 (19:03 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 28 Feb 2011 17:03:38 +0000 (19:03 +0200)
data/qcsrc/client/View.qc
data/qcsrc/menu/voret/dialog_multiplayer_playersetup_weapons.c

index bdfb160..ca0fa12 100644 (file)
@@ -1062,13 +1062,13 @@ void CSQC_UpdateView(float w, float h)
                                wcross_name_alpha_goal_prev = f;\r
 \r
                                // ring around crosshair representing bullets left in weapon clip\r
+                               a = cvar("crosshair_ring_alpha");\r
                                weapon_clipload = getstati(STAT_WEAPON_CLIPLOAD);\r
-                               if (weapon_clipload)\r
+                               if (weapon_clipload && a)\r
                                {\r
-                                       weapon_clipsize = getstati(STAT_WEAPON_CLIPSIZE);\r
                                        f = bound(0, weapon_clipload / weapon_clipsize, 1);\r
                                        ring_scale = cvar("crosshair_ring_size");\r
-                                       a = cvar("crosshair_ring_alpha");\r
+                                       weapon_clipsize = getstati(STAT_WEAPON_CLIPSIZE);\r
                                        DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", f, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE);\r
                                }\r
                        }\r
index f787727..7c30f9b 100644 (file)
@@ -6,7 +6,7 @@ CLASS(VoretWeaponsDialog) EXTENDS(VoretDialog)
        ATTRIB(VoretWeaponsDialog, title, string, "Weapon & Crosshair settings")\r
        ATTRIB(VoretWeaponsDialog, color, vector, SKINCOLOR_DIALOG_WEAPONS)\r
        ATTRIB(VoretWeaponsDialog, intendedWidth, float, 0.5)\r
-       ATTRIB(VoretWeaponsDialog, rows, float, 15)\r
+       ATTRIB(VoretWeaponsDialog, rows, float, 16)\r
        ATTRIB(VoretWeaponsDialog, columns, float, 4)\r
        ATTRIB(VoretWeaponsDialog, weaponsList, entity, NULL)\r
 ENDCLASS(VoretWeaponsDialog)\r
@@ -42,8 +42,8 @@ void fillVoretWeaponsDialog(entity me)
                        e.onClickEntity = me.weaponsList;\r
        me.TR(me);\r
                me.TDempty(me, 0.3);\r
-               me.TD(me, 1, 3, e = makeVoretCheckBox(0, "cl_weaponpriority_useforcycling", "Use priority list for weapon cycling"));*/\r
-       /*me.TR(me);\r
+               me.TD(me, 1, 3, e = makeVoretCheckBox(0, "cl_weaponpriority_useforcycling", "Use priority list for weapon cycling"));\r
+       me.TR(me);\r
                me.TDempty(me, 0.3);\r
                me.TD(me, 1, 3, e = makeVoretCheckBox(0, "cl_autoswitch", "Auto switch weapons on pickup"));*/\r
 \r
@@ -87,6 +87,9 @@ void fillVoretWeaponsDialog(entity me)
                me.TD(me, 1, 2.5/3, e = makeVoretRadioButton(2, "crosshair_hittest", "0",    "None"));\r
                me.TD(me, 1, 2.5/3, e = makeVoretRadioButton(2, "crosshair_hittest", "1",    "TrueAim"));\r
                me.TD(me, 1, 2.5/3, e = makeVoretRadioButton(2, "crosshair_hittest", "1.25", "Enemies"));\r
+       me.TR(me);\r
+               me.TDempty(me, 0.3);\r
+               me.TD(me, 1, 2, e = makeVoretCheckBoxEx(0.5, 0, "crosshair_ring_alpha", "Crosshair ring"));\r
 \r
        me.TR(me);\r
        me.TR(me);\r