]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Use the new color picker for crosshair color
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 6 Nov 2011 15:21:02 +0000 (17:21 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 6 Nov 2011 15:21:02 +0000 (17:21 +0200)
data/qcsrc/client/View.qc
data/qcsrc/menu/voret/crosshairbutton.c
data/qcsrc/menu/voret/dialog_multiplayer_playersetup_weapons.c

index 0927a5a11f4683fa5fd362fcb9669d23be1e3eee..f82cc299e6e3114067e0eae710ef24ac4e44ab2b 100644 (file)
@@ -1261,12 +1261,8 @@ void CSQC_UpdateView(float w, float h)
                                        }\r
                                }\r
                                else\r
-                               {\r
-                                       wcross_color_x = cvar("crosshair_color_red");\r
-                                       wcross_color_y = cvar("crosshair_color_green");\r
-                                       wcross_color_z = cvar("crosshair_color_blue");\r
-                               }\r
-                               wcross_alpha = cvar("crosshair_color_alpha");\r
+                                       wcross_color = stov(cvar_string("crosshair_color"));\r
+                               wcross_alpha = cvar("crosshair_alpha");\r
                                wcross_resolution = cvar("crosshair_size");\r
 \r
                                if(!activeweapon)\r
index 228b265287e565b69a4dc160e114b97cd232cd76..2ff1a347cf289e5b595ab8f26fb262f9c89dba7b 100644 (file)
@@ -63,8 +63,8 @@ void drawVoretCrosshairButton(entity me)
        vector sz, rgb;\r
        float a;\r
 \r
-       rgb = eX * cvar("crosshair_color_red") + eY * cvar("crosshair_color_green") + eZ * cvar("crosshair_color_blue");\r
-       a = cvar("crosshair_color_alpha");\r
+       rgb = stov(cvar_string("crosshair_color"));\r
+       a = cvar("crosshair_alpha");\r
 \r
        if(!me.checked && !me.focused)\r
        {\r
index e4dcf04c98640d8c51c670e2b41ef2706abc0d5d..1e1f68719aacf040c8e15425f7d244776f33cc8f 100644 (file)
@@ -93,29 +93,16 @@ void fillVoretWeaponsDialog(entity me)
        me.TR(me);\r
                me.TDempty(me, 0.3);\r
                me.TD(me, 1, 1.25, e = makeVoretTextLabel(0, "Crosshair Alpha:"));\r
-               me.TD(me, 1, 2.5, e = makeVoretSlider(0, 1, 0.01, "crosshair_color_alpha"));\r
+               me.TD(me, 1, 2.5, e = makeVoretSlider(0, 1, 0.01, "crosshair_alpha"));\r
        me.TR(me);\r
                me.TDempty(me, 0.3);\r
-               me.TD(me, 1, 1.25, e = makeVoretTextLabel(0, "Crosshair ^1Red^7:"));\r
-               setDependent(e, "crosshair_color_by_health", 0, 0);\r
-               me.TD(me, 1, 2.5, e = makeVoretSlider(0, 1, 0.01, "crosshair_color_red"));\r
-               setDependent(e, "crosshair_color_by_health", 0, 0);\r
-       me.TR(me);\r
-               me.TDempty(me, 0.3);\r
-               me.TD(me, 1, 1.25, e = makeVoretTextLabel(0, "Crosshair ^2Green^7:"));\r
-               setDependent(e, "crosshair_color_by_health", 0, 0);\r
-               me.TD(me, 1, 2.5, e = makeVoretSlider(0, 1, 0.01, "crosshair_color_green"));\r
+               me.TD(me, 1, 1.25, e = makeVoretTextLabel(0, "Crosshair Color:"));\r
+               me.TD(me, 2, 2, e = makeVoretColorpickerString("crosshair_color", "crosshair_color"));\r
                setDependent(e, "crosshair_color_by_health", 0, 0);\r
        me.TR(me);\r
-               me.TDempty(me, 0.3);\r
-               me.TD(me, 1, 1.25, e = makeVoretTextLabel(0, "Crosshair ^4Blue^7:"));\r
-               setDependent(e, "crosshair_color_by_health", 0, 0);\r
-               me.TD(me, 1, 2.5, e = makeVoretSlider(0, 1, 0.01, "crosshair_color_blue"));\r
-               setDependent(e, "crosshair_color_by_health", 0, 0);\r
        me.TR(me);\r
-               me.TDempty(me, 0.6);\r
+               me.TDempty(me, 1.5);\r
                me.TD(me, 1, 2, e = makeVoretCheckBox(0, "crosshair_color_by_health", "Colorize by health"));\r
-\r
        me.gotoRC(me, 0, 4); me.setFirstColumn(me, me.currentColumn);\r
        me.TD(me, 1, 3, makeVoretTextLabel(0, "Crosshair effects:"));\r
        me.TR(me);\r