only trigger slider change if changed by user

main
Dominik Madarász 2023-11-28 14:36:44 +01:00
parent 44e1bce7b6
commit 3ed712c8b5
3 changed files with 3 additions and 3 deletions

View File

@ -359080,7 +359080,7 @@ bool gui_slider_id(int id, vec4 rect, const char *skin, float min, float max, fl
cursorrect.w = cursorsize.y; cursorrect.w = cursorsize.y;
if (last_skin->drawrect) last_skin->drawrect(last_skin->userdata, cursorskin, cursorrect); if (last_skin->drawrect) last_skin->drawrect(last_skin->userdata, cursorskin, cursorrect);
return (old_value!=*value); return entry->held && (old_value!=*value);
} }
void gui_rect_id(int id, vec4 r, const char *skin) { void gui_rect_id(int id, vec4 r, const char *skin) {

View File

@ -235,7 +235,7 @@ bool gui_slider_id(int id, vec4 rect, const char *skin, float min, float max, fl
cursorrect.w = cursorsize.y; cursorrect.w = cursorsize.y;
if (last_skin->drawrect) last_skin->drawrect(last_skin->userdata, cursorskin, cursorrect); if (last_skin->drawrect) last_skin->drawrect(last_skin->userdata, cursorskin, cursorrect);
return (old_value!=*value); return entry->held && (old_value!=*value);
} }
void gui_rect_id(int id, vec4 r, const char *skin) { void gui_rect_id(int id, vec4 r, const char *skin) {

View File

@ -11245,7 +11245,7 @@ bool gui_slider_id(int id, vec4 rect, const char *skin, float min, float max, fl
cursorrect.w = cursorsize.y; cursorrect.w = cursorsize.y;
if (last_skin->drawrect) last_skin->drawrect(last_skin->userdata, cursorskin, cursorrect); if (last_skin->drawrect) last_skin->drawrect(last_skin->userdata, cursorskin, cursorrect);
return (old_value!=*value); return entry->held && (old_value!=*value);
} }
void gui_rect_id(int id, vec4 r, const char *skin) { void gui_rect_id(int id, vec4 r, const char *skin) {