COLOR_SLIDER_F '1 1 1'
COLOR_SLIDER_N '1 1 1'
COLOR_SLIDER_S '1 1 1'
-TOLERANCE_SLIDER '0.2 2 0'
WIDTH_SLIDERTEXT 0.333333333333
// tooltip
COLOR_SLIDER_D '1 1 1'
COLOR_SLIDER_S '1 1 1'
WIDTH_SLIDERTEXT 0.333333333333
-TOLERANCE_SLIDER '0.2 2 0'
COLOR_SLIDER_D '1 1 1'
COLOR_SLIDER_S '0.25 0.25 0.25'
WIDTH_SLIDERTEXT 0.333333333333
-TOLERANCE_SLIDER '0.2 2 0'
COLOR_SLIDER_D '1 1 1'
COLOR_SLIDER_S '1 1 1'
WIDTH_SLIDERTEXT 0.333333333333
-TOLERANCE_SLIDER '0.2 2 0'
if (me.pressed == 1)
{
hit = 1;
- if (pos.x < 1 - me.controlWidth - me.tolerance.y * me.controlWidth) hit = 0;
- if (pos.y < 0 - me.tolerance.x) hit = 0;
- if (pos.x >= 1 + me.tolerance.y * me.controlWidth) hit = 0;
- if (pos.y >= 1 + me.tolerance.x) hit = 0;
+ if (pos.x < 1 - me.controlWidth - me.tolerance.x * me.controlWidth) hit = 0;
+ if (pos.y < 0 - me.tolerance.y) hit = 0;
+ if (pos.x >= 1 + me.tolerance.x * me.controlWidth) hit = 0;
+ if (pos.y >= 1 + me.tolerance.y) hit = 0;
if (hit)
{
// calculate new pos to v
ATTRIB(Slider, pressed, float, 0);
ATTRIB(Slider, pressOffset, float, 0);
ATTRIB(Slider, previousValue, float, 0);
- ATTRIB(Slider, tolerance, vector, '0 0 0');
+ ATTRIB(Slider, tolerance, vector, '0 0 0'); // drag tolerance
ATTRIB(Slider, disabled, float, 0);
ATTRIB(Slider, color, vector, '1 1 1');
ATTRIB(Slider, color2, vector, '1 1 1');
SKINVECTOR(COLOR_SLIDER_D, '1 1 1');
SKINVECTOR(COLOR_SLIDER_S, '1 1 1');
SKINFLOAT(WIDTH_SLIDERTEXT, 0.333333333333);
- SKINVECTOR(TOLERANCE_SLIDER, '0.2 2 0');
SKINEND
ATTRIB(XonoticListBox, fontSize, float, SKINFONTSIZE_NORMAL);
ATTRIB(XonoticListBox, scrollbarWidth, float, SKINWIDTH_SCROLLBAR);
ATTRIB(XonoticListBox, src, string, SKINGFX_SCROLLBAR);
- ATTRIB(XonoticListBox, tolerance, vector, SKINTOLERANCE_SLIDER);
+ ATTRIB(XonoticListBox, tolerance, vector, '2 0.2 0');
ATTRIB(XonoticListBox, rowsPerItem, float, 1);
METHOD(XonoticListBox, resizeNotify, void(entity, vector, vector, vector, vector));
ATTRIB(XonoticListBox, color, vector, SKINCOLOR_SCROLLBAR_N);
ATTRIB(XonoticSlider, fontSize, float, SKINFONTSIZE_NORMAL);
ATTRIB(XonoticSlider, valueSpace, float, SKINWIDTH_SLIDERTEXT);
ATTRIB(XonoticSlider, image, string, SKINGFX_SLIDER);
- ATTRIB(XonoticSlider, tolerance, vector, SKINTOLERANCE_SLIDER);
+ ATTRIB(XonoticSlider, tolerance, vector, '0.2 2 0');
ATTRIB(XonoticSlider, align, float, 0.5);
ATTRIB(XonoticSlider, color, vector, SKINCOLOR_SLIDER_N);
ATTRIB(XonoticSlider, colorC, vector, SKINCOLOR_SLIDER_C);
ATTRIB(XonoticTextSlider, fontSize, float, SKINFONTSIZE_NORMAL);
ATTRIB(XonoticTextSlider, valueSpace, float, SKINWIDTH_SLIDERTEXT);
ATTRIB(XonoticTextSlider, image, string, SKINGFX_SLIDER);
- ATTRIB(XonoticTextSlider, tolerance, vector, SKINTOLERANCE_SLIDER);
+ ATTRIB(XonoticTextSlider, tolerance, vector, '0.2 2 0');
ATTRIB(XonoticTextSlider, align, float, 0.5);
ATTRIB(XonoticTextSlider, color, vector, SKINCOLOR_SLIDER_N);
ATTRIB(XonoticTextSlider, colorC, vector, SKINCOLOR_SLIDER_C);