Commit 37de99d5 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

fix #295: sliders can become unresponse at patch load time

parent 29a751f2
...@@ -2637,13 +2637,18 @@ function gui_slider_new(cid, tag, color, p1, p2, p3, p4, basex, basey) { ...@@ -2637,13 +2637,18 @@ function gui_slider_new(cid, tag, color, p1, p2, p3, p4, basex, basey) {
} }
function gui_slider_update(cid, tag, p1, p2, p3, p4, basex, basey) { function gui_slider_update(cid, tag, p1, p2, p3, p4, basex, basey) {
var indicator = get_item(cid, tag + "indicator"); var indicator;
configure_item(indicator, { if (patchwin[cid]) {
x1: p1 - basex, indicator = get_item(cid, tag + "indicator");
y1: p2 - basey, if (indicator) {
x2: p3 - basex, configure_item(indicator, {
y2: p4 - basey x1: p1 - basex,
}); y1: p2 - basey,
x2: p3 - basex,
y2: p4 - basey
});
}
}
} }
function gui_slider_indicator_color(cid, tag, color) { function gui_slider_indicator_color(cid, tag, color) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment