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;
if (patchwin[cid]) {
indicator = get_item(cid, tag + "indicator");
if (indicator) {
configure_item(indicator, { configure_item(indicator, {
x1: p1 - basex, x1: p1 - basex,
y1: p2 - basey, y1: p2 - basey,
x2: p3 - basex, x2: p3 - basex,
y2: p4 - basey y2: p4 - basey
}); });
}
}
} }
function gui_slider_indicator_color(cid, tag, color) { function gui_slider_indicator_color(cid, tag, color) {
......
Supports Markdown
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