vector sz, rgb;
float a;
- rgb = stov(cvar_string("crosshair_color"));
- a = cvar("crosshair_alpha");
- if(!me.checked && !me.focused && me.cvarValueFloat != -1)
+ if(me.cvarValueFloat == -1)
+ {
+ rgb = stov(cvar_string("crosshair_color"));
+ a = cvar("crosshair_alpha");
+ }
+ else if(me.checked || me.focused)
+ {
+ a = 1;
+ rgb = '1 1 1';
+ }
+ else
{
- a *= me.disabledAlpha;
+ a = me.disabledAlpha;
rgb = '1 1 1';
}
SUPER(XonoticCrosshairButton).draw(me);
sz = draw_PictureSize(me.src3);
- sz = globalToBoxSize(sz, draw_scale);
+ sz = globalToBoxSize(sz, me.size);
if(me.cvarValueFloat == -1)
{
- sz = (6 * '1 1 0' + sz * cvar("crosshair_size")) * 0.08; // (6 * '1 1 0' + ...) * 0.08 here to make visible size changes happen also at bigger sizes
+ sz = sz * cvar("crosshair_size"); // (6 * '1 1 0' + ...) * 0.08 here to make visible size changes happen also at bigger sizes
+ /*
if(sz_x > 0.95)
sz = sz * (0.95 / sz_x);
if(sz_y > 0.95)
sz = sz * (0.95 / sz_y);
+ */
}
else // show the crosshair picker at full size
sz = '0.95 0.95 0';