From: MirceaKitsune Date: Sun, 6 Nov 2011 15:21:02 +0000 (+0200) Subject: Use the new color picker for crosshair color X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6ece9a61f001edabe93659dd5431b9d40d05b0ff;p=voretournament%2Fvoretournament.git Use the new color picker for crosshair color --- diff --git a/data/qcsrc/client/View.qc b/data/qcsrc/client/View.qc index 0927a5a1..f82cc299 100644 --- a/data/qcsrc/client/View.qc +++ b/data/qcsrc/client/View.qc @@ -1261,12 +1261,8 @@ void CSQC_UpdateView(float w, float h) } } else - { - wcross_color_x = cvar("crosshair_color_red"); - wcross_color_y = cvar("crosshair_color_green"); - wcross_color_z = cvar("crosshair_color_blue"); - } - wcross_alpha = cvar("crosshair_color_alpha"); + wcross_color = stov(cvar_string("crosshair_color")); + wcross_alpha = cvar("crosshair_alpha"); wcross_resolution = cvar("crosshair_size"); if(!activeweapon) diff --git a/data/qcsrc/menu/voret/crosshairbutton.c b/data/qcsrc/menu/voret/crosshairbutton.c index 228b2652..2ff1a347 100644 --- a/data/qcsrc/menu/voret/crosshairbutton.c +++ b/data/qcsrc/menu/voret/crosshairbutton.c @@ -63,8 +63,8 @@ void drawVoretCrosshairButton(entity me) vector sz, rgb; float a; - rgb = eX * cvar("crosshair_color_red") + eY * cvar("crosshair_color_green") + eZ * cvar("crosshair_color_blue"); - a = cvar("crosshair_color_alpha"); + rgb = stov(cvar_string("crosshair_color")); + a = cvar("crosshair_alpha"); if(!me.checked && !me.focused) { diff --git a/data/qcsrc/menu/voret/dialog_multiplayer_playersetup_weapons.c b/data/qcsrc/menu/voret/dialog_multiplayer_playersetup_weapons.c index e4dcf04c..1e1f6871 100644 --- a/data/qcsrc/menu/voret/dialog_multiplayer_playersetup_weapons.c +++ b/data/qcsrc/menu/voret/dialog_multiplayer_playersetup_weapons.c @@ -93,29 +93,16 @@ void fillVoretWeaponsDialog(entity me) me.TR(me); me.TDempty(me, 0.3); me.TD(me, 1, 1.25, e = makeVoretTextLabel(0, "Crosshair Alpha:")); - me.TD(me, 1, 2.5, e = makeVoretSlider(0, 1, 0.01, "crosshair_color_alpha")); + me.TD(me, 1, 2.5, e = makeVoretSlider(0, 1, 0.01, "crosshair_alpha")); me.TR(me); me.TDempty(me, 0.3); - me.TD(me, 1, 1.25, e = makeVoretTextLabel(0, "Crosshair ^1Red^7:")); - setDependent(e, "crosshair_color_by_health", 0, 0); - me.TD(me, 1, 2.5, e = makeVoretSlider(0, 1, 0.01, "crosshair_color_red")); - setDependent(e, "crosshair_color_by_health", 0, 0); - me.TR(me); - me.TDempty(me, 0.3); - me.TD(me, 1, 1.25, e = makeVoretTextLabel(0, "Crosshair ^2Green^7:")); - setDependent(e, "crosshair_color_by_health", 0, 0); - me.TD(me, 1, 2.5, e = makeVoretSlider(0, 1, 0.01, "crosshair_color_green")); + me.TD(me, 1, 1.25, e = makeVoretTextLabel(0, "Crosshair Color:")); + me.TD(me, 2, 2, e = makeVoretColorpickerString("crosshair_color", "crosshair_color")); setDependent(e, "crosshair_color_by_health", 0, 0); me.TR(me); - me.TDempty(me, 0.3); - me.TD(me, 1, 1.25, e = makeVoretTextLabel(0, "Crosshair ^4Blue^7:")); - setDependent(e, "crosshair_color_by_health", 0, 0); - me.TD(me, 1, 2.5, e = makeVoretSlider(0, 1, 0.01, "crosshair_color_blue")); - setDependent(e, "crosshair_color_by_health", 0, 0); me.TR(me); - me.TDempty(me, 0.6); + me.TDempty(me, 1.5); me.TD(me, 1, 2, e = makeVoretCheckBox(0, "crosshair_color_by_health", "Colorize by health")); - me.gotoRC(me, 0, 4); me.setFirstColumn(me, me.currentColumn); me.TD(me, 1, 3, makeVoretTextLabel(0, "Crosshair effects:")); me.TR(me);