|
|
|
@@ -56,7 +56,7 @@ var stored_slot_color = max.getcolor("theme_accentcolor"); //[0.502, 0.502, 0.50
|
|
|
|
var interp_slot_color = [1.0, 1.0, 1.0, 0.8];
|
|
|
|
var interp_slot_color = [1.0, 1.0, 1.0, 0.8];
|
|
|
|
var border_color = [1.0, 1.0, 1.0, 0.85];
|
|
|
|
var border_color = [1.0, 1.0, 1.0, 0.85];
|
|
|
|
var text_color = max.getcolor("theme_textcolor"); //[0.129, 0.129, 0.129, 1];
|
|
|
|
var text_color = max.getcolor("theme_textcolor"); //[0.129, 0.129, 0.129, 1];
|
|
|
|
var text_bg_color = set_text_bg_color();
|
|
|
|
var text_bg_color; set_text_bg_color();
|
|
|
|
var edited_color = [1, 0.49, 0.263, 1];
|
|
|
|
var edited_color = [1, 0.49, 0.263, 1];
|
|
|
|
|
|
|
|
|
|
|
|
var color_1 = [0.743, 0.41, 0.501, 1]; // Color set for the filled slots. I don't like how this is declared. More info in color_wheel() declaration
|
|
|
|
var color_1 = [0.743, 0.41, 0.501, 1]; // Color set for the filled slots. I don't like how this is declared. More info in color_wheel() declaration
|
|
|
|
@@ -95,6 +95,7 @@ var poll_edited = 0; // If >0, check if current preset is edited every X
|
|
|
|
var nbslot_edit = true; // If nbslot_edit and scrollable are enabled, the last two visible slots are replaced by buttons to add or remove lines of slot.
|
|
|
|
var nbslot_edit = true; // If nbslot_edit and scrollable are enabled, the last two visible slots are replaced by buttons to add or remove lines of slot.
|
|
|
|
|
|
|
|
|
|
|
|
// (WORK)
|
|
|
|
// (WORK)
|
|
|
|
|
|
|
|
var is_jsui = this.box.maxclass === "jsui";
|
|
|
|
var pattrstorage_name = null;
|
|
|
|
var pattrstorage_name = null;
|
|
|
|
var pattrstorage_obj = null;
|
|
|
|
var pattrstorage_obj = null;
|
|
|
|
|
|
|
|
|
|
|
|
@@ -500,7 +501,9 @@ function paint()
|
|
|
|
var cur_size = mgraphics.size;
|
|
|
|
var cur_size = mgraphics.size;
|
|
|
|
if (cur_size[0] != ui_width || cur_size[1] != ui_height) {
|
|
|
|
if (cur_size[0] != ui_width || cur_size[1] != ui_height) {
|
|
|
|
onresize(cur_size[0], cur_size[1]);
|
|
|
|
onresize(cur_size[0], cur_size[1]);
|
|
|
|
} else {
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
mgraphics.select_font_face(font_name);
|
|
|
|
mgraphics.select_font_face(font_name);
|
|
|
|
mgraphics.set_font_size(font_size);
|
|
|
|
mgraphics.set_font_size(font_size);
|
|
|
|
mgraphics.translate(0, y_offset);
|
|
|
|
mgraphics.translate(0, y_offset);
|
|
|
|
@@ -557,7 +560,6 @@ function paint()
|
|
|
|
|
|
|
|
|
|
|
|
// Interpolated slots
|
|
|
|
// Interpolated slots
|
|
|
|
if (is_dragging !== 1 && display_interp && is_interpolating) {
|
|
|
|
if (is_dragging !== 1 && display_interp && is_interpolating) {
|
|
|
|
|
|
|
|
|
|
|
|
for (var i = 1; i <= slots_count_display; i++) {
|
|
|
|
for (var i = 1; i <= slots_count_display; i++) {
|
|
|
|
var slot = slots[i];
|
|
|
|
var slot = slots[i];
|
|
|
|
var interp = slot.interp;
|
|
|
|
var interp = slot.interp;
|
|
|
|
@@ -740,7 +742,7 @@ function paint()
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
paint.local = 0;
|
|
|
|
paint.local = 0;
|
|
|
|
|
|
|
|
|
|
|
|
@@ -2110,11 +2112,13 @@ onresize.local = 1;
|
|
|
|
if (ui_width == 64 && ui_height == 64) {
|
|
|
|
if (ui_width == 64 && ui_height == 64) {
|
|
|
|
box.setboxattr("patching_rect", box.rect[0], box.rect[1], 130, 58);
|
|
|
|
box.setboxattr("patching_rect", box.rect[0], box.rect[1], 130, 58);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Allows for dynamic resizing even in presentation mode (addressing the limitation of onresize())
|
|
|
|
// Allows for dynamic resizing even in presentation mode (addressing the limitation of onresize() in jsui)
|
|
|
|
|
|
|
|
if (is_jsui) {
|
|
|
|
var pres_rect = new MaxobjListener(this.box,"presentation_rect",get_prect);
|
|
|
|
var pres_rect = new MaxobjListener(this.box,"presentation_rect",get_prect);
|
|
|
|
|
|
|
|
}
|
|
|
|
function get_prect(prect) {
|
|
|
|
function get_prect(prect) {
|
|
|
|
// post(this.patcher.wind.assoc.getattr("globalpatchername") == max.frontpatcher.wind.assoc.getattr("globalpatchername") ? 1 : 0, "\n")
|
|
|
|
// post(this.patcher.wind.assoc.getattr("globalpatchername") == max.frontpatcher.wind.assoc.getattr("globalpatchername") ? 1 : 0, "\n")
|
|
|
|
onresize(prect.value[2], prect.value[3])
|
|
|
|
onresize(prect.value[2], prect.value[3], "from_maxobjlistener");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
get_prect.local = 1;
|
|
|
|
get_prect.local = 1;
|
|
|
|
|
|
|
|
|
|
|
|
|