Allow custom color and alpha values for the crosshair picker (like it is for the...
authorterencehill <piuntn@gmail.com>
Sun, 3 May 2015 16:11:03 +0000 (18:11 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 3 May 2015 16:11:03 +0000 (18:11 +0200)
gfx/menu/luma/skinvalues.txt
gfx/menu/luminos/skinvalues.txt
gfx/menu/wickedx/skinvalues.txt
gfx/menu/xaw/skinvalues.txt
qcsrc/menu/xonotic/crosshairpicker.qc

index d521800..5a36d90 100644 (file)
@@ -34,6 +34,10 @@ COLOR_CAMPAIGN_SELECTABLE     '0.96 0.99 1'
 ALPHA_CHARMAP_CHAR            0.85
 COLOR_CHARMAP_CHAR            '1 1 1'
 
+// crosshairpicker
+ALPHA_CROSSHAIRPICKER_CROSSHAIR 0.85
+COLOR_CROSSHAIRPICKER_CROSSHAIR '1 1 1'
+
 // checkbox
 COLOR_CHECKBOX_C              '1 1 1'
 COLOR_CHECKBOX_D              '1 1 1'
index cce5255..b9c6980 100755 (executable)
@@ -222,6 +222,10 @@ ALPHA_KEYGRABBER_KEYS           0.7
 ALPHA_CHARMAP_CHAR              0.85
 COLOR_CHARMAP_CHAR              '1 1 1'
 
+// item: crosshairpicker
+ALPHA_CROSSHAIRPICKER_CROSSHAIR 0.85
+COLOR_CROSSHAIRPICKER_CROSSHAIR '1 1 1'
+
 // item: radio button
 //   uses "radiobutton" images
 COLOR_RADIOBUTTON_N             '1 1 1'
index 6eecd78..09ded4b 100644 (file)
@@ -222,6 +222,10 @@ ALPHA_KEYGRABBER_KEYS           0.7
 ALPHA_CHARMAP_CHAR              0.85
 COLOR_CHARMAP_CHAR              '1 1 1'
 
+// item: crosshairpicker
+ALPHA_CROSSHAIRPICKER_CROSSHAIR 0.85
+COLOR_CROSSHAIRPICKER_CROSSHAIR '1 1 1'
+
 // item: radio button
 //   uses "radiobutton" images
 COLOR_RADIOBUTTON_N             '1 1 1'
index bb6b78d..00df324 100644 (file)
@@ -177,6 +177,10 @@ ALPHA_MODELTITLE                1
 ALPHA_CHARMAP_CHAR              0.85
 COLOR_CHARMAP_CHAR              '1 1 1'
 
+// item: crosshairpicker
+ALPHA_CROSSHAIRPICKER_CROSSHAIR 0.85
+COLOR_CROSSHAIRPICKER_CROSSHAIR '1 1 1'
+
 // item: radio button
 //   uses "radiobutton" images
 COLOR_RADIOBUTTON_N             '1 1 1'
index 1441ebc..2f2c355 100644 (file)
@@ -58,7 +58,7 @@ bool XonoticCrosshairPicker_cellIsValid(entity me, vector cell)
 
 void XonoticCrosshairPicker_cellDraw(entity me, vector cell, vector cellPos)
 {
-       vector sz, rgb;
+       vector sz;
        string cross = strcat("/gfx/crosshair", crosshairpicker_cellToCrosshair(me, cell));
        sz = draw_PictureSize(cross);
        sz = globalToBoxSize(sz, me.size);
@@ -68,12 +68,10 @@ void XonoticCrosshairPicker_cellDraw(entity me, vector cell, vector cellPos)
        sz.y = sz.x / ar;
        sz = sz * 0.95;
 
-       rgb = '1 1 1';
-
        vector crosshairPos = cellPos + 0.5 * me.realCellSize;
-       draw_Picture(crosshairPos - 0.5 * sz, cross, sz, rgb, me.alpha);
+       draw_Picture(crosshairPos - 0.5 * sz, cross, sz, SKINCOLOR_CROSSHAIRPICKER_CROSSHAIR, SKINALPHA_CROSSHAIRPICKER_CROSSHAIR);
 
        if(cvar("crosshair_dot"))
-               draw_Picture(crosshairPos - 0.5 * sz * cvar("crosshair_dot_size"), "/gfx/crosshairdot", sz * cvar("crosshair_dot_size"), rgb, me.alpha);
+               draw_Picture(crosshairPos - 0.5 * sz * cvar("crosshair_dot_size"), "/gfx/crosshairdot", sz * cvar("crosshair_dot_size"), SKINCOLOR_CROSSHAIRPICKER_CROSSHAIR, SKINALPHA_CROSSHAIRPICKER_CROSSHAIR);
 }
 #endif