diff --git a/demos/art/gui/golden.ase b/demos/art/gui/golden.ase index 17f0297..d6147fb 100644 Binary files a/demos/art/gui/golden.ase and b/demos/art/gui/golden.ase differ diff --git a/engine/joint/v4k.h b/engine/joint/v4k.h index 62d6a58..5ca9f9d 100644 --- a/engine/joint/v4k.h +++ b/engine/joint/v4k.h @@ -359072,7 +359072,7 @@ bool gui_slider_id(int id, vec4 rect, const char *skin, float min, float max, fl *value = posx2slider(usablerect, min, max, input(MOUSE_X), step); } float sliderx = slider2posx(min, max, *value, step, usablerect.z); - vec2 cursorpos = vec2(sliderx+usablerect.x*.5f-cursorsize.x*.5f, (slidersize.y*.5f - cursorsize.y*.5f)); + vec2 cursorpos = vec2(sliderx+usablerect.x*.5f-cursorsize.x*.75f, (slidersize.y*.5f - cursorsize.y*.5f)); vec4 cursorrect = rect; cursorrect.x += cursorpos.x; cursorrect.y += cursorpos.y; diff --git a/engine/split/v4k_gui.c b/engine/split/v4k_gui.c index 2811546..1fbf33f 100644 --- a/engine/split/v4k_gui.c +++ b/engine/split/v4k_gui.c @@ -227,7 +227,7 @@ bool gui_slider_id(int id, vec4 rect, const char *skin, float min, float max, fl *value = posx2slider(usablerect, min, max, input(MOUSE_X), step); } float sliderx = slider2posx(min, max, *value, step, usablerect.z); - vec2 cursorpos = vec2(sliderx+usablerect.x*.5f-cursorsize.x*.5f, (slidersize.y*.5f - cursorsize.y*.5f)); + vec2 cursorpos = vec2(sliderx+usablerect.x*.5f-cursorsize.x*.75f, (slidersize.y*.5f - cursorsize.y*.5f)); vec4 cursorrect = rect; cursorrect.x += cursorpos.x; cursorrect.y += cursorpos.y; diff --git a/engine/v4k.c b/engine/v4k.c index 8ff251a..9d0ebc9 100644 --- a/engine/v4k.c +++ b/engine/v4k.c @@ -11237,7 +11237,7 @@ bool gui_slider_id(int id, vec4 rect, const char *skin, float min, float max, fl *value = posx2slider(usablerect, min, max, input(MOUSE_X), step); } float sliderx = slider2posx(min, max, *value, step, usablerect.z); - vec2 cursorpos = vec2(sliderx+usablerect.x*.5f-cursorsize.x*.5f, (slidersize.y*.5f - cursorsize.y*.5f)); + vec2 cursorpos = vec2(sliderx+usablerect.x*.5f-cursorsize.x*.75f, (slidersize.y*.5f - cursorsize.y*.5f)); vec4 cursorrect = rect; cursorrect.x += cursorpos.x; cursorrect.y += cursorpos.y;