From: terencehill Date: Sun, 3 May 2015 16:11:03 +0000 (+0200) Subject: Allow custom color and alpha values for the crosshair picker (like it is for the... X-Git-Tag: xonotic-v0.8.1~55^2~4 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=65e5996b5b301f71ed2ed199c5b2e47fe34aa8c9;p=xonotic%2Fxonotic-data.pk3dir.git Allow custom color and alpha values for the crosshair picker (like it is for the charmap) --- diff --git a/gfx/menu/luma/skinvalues.txt b/gfx/menu/luma/skinvalues.txt index d521800a0..5a36d90e0 100644 --- a/gfx/menu/luma/skinvalues.txt +++ b/gfx/menu/luma/skinvalues.txt @@ -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' diff --git a/gfx/menu/luminos/skinvalues.txt b/gfx/menu/luminos/skinvalues.txt index cce525534..b9c69802e 100755 --- a/gfx/menu/luminos/skinvalues.txt +++ b/gfx/menu/luminos/skinvalues.txt @@ -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' diff --git a/gfx/menu/wickedx/skinvalues.txt b/gfx/menu/wickedx/skinvalues.txt index 6eecd78cc..09ded4b08 100644 --- a/gfx/menu/wickedx/skinvalues.txt +++ b/gfx/menu/wickedx/skinvalues.txt @@ -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' diff --git a/gfx/menu/xaw/skinvalues.txt b/gfx/menu/xaw/skinvalues.txt index bb6b78d16..00df32498 100644 --- a/gfx/menu/xaw/skinvalues.txt +++ b/gfx/menu/xaw/skinvalues.txt @@ -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' diff --git a/qcsrc/menu/xonotic/crosshairpicker.qc b/qcsrc/menu/xonotic/crosshairpicker.qc index 1441ebcb3..2f2c35507 100644 --- a/qcsrc/menu/xonotic/crosshairpicker.qc +++ b/qcsrc/menu/xonotic/crosshairpicker.qc @@ -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