return if gui_slider was changed

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

View File

@ -359060,7 +359060,7 @@ bool gui_slider_id(int id, vec4 rect, const char *skin, float min, float max, fl
entry->hover = false; entry->hover = false;
} }
float old_value = *value;
if (last_skin->drawrect) last_skin->drawrect(last_skin->userdata, skin, rect); if (last_skin->drawrect) last_skin->drawrect(last_skin->userdata, skin, rect);
vec2 slidersize={0}, cursorsize={0}; vec2 slidersize={0}, cursorsize={0};
@ -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 false; return (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

@ -215,7 +215,7 @@ bool gui_slider_id(int id, vec4 rect, const char *skin, float min, float max, fl
entry->hover = false; entry->hover = false;
} }
float old_value = *value;
if (last_skin->drawrect) last_skin->drawrect(last_skin->userdata, skin, rect); if (last_skin->drawrect) last_skin->drawrect(last_skin->userdata, skin, rect);
vec2 slidersize={0}, cursorsize={0}; vec2 slidersize={0}, cursorsize={0};
@ -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 false; return (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

@ -11225,7 +11225,7 @@ bool gui_slider_id(int id, vec4 rect, const char *skin, float min, float max, fl
entry->hover = false; entry->hover = false;
} }
float old_value = *value;
if (last_skin->drawrect) last_skin->drawrect(last_skin->userdata, skin, rect); if (last_skin->drawrect) last_skin->drawrect(last_skin->userdata, skin, rect);
vec2 slidersize={0}, cursorsize={0}; vec2 slidersize={0}, cursorsize={0};
@ -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 false; return (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) {