Browse Source

grid layout scrollable, auto-scroll when drag outside of window

main
TFLCL 3 months ago
parent
commit
3b387c66d2
  1. 43
      code/tc.preset.js
  2. 2
      docs/tc.preset.maxref.xml
  3. 8
      extras/tc.preset Launch.maxpat
  4. 60
      help/tc.preset.maxhelp
  5. 221
      snippets/tc.preset all-in-one-color.maxsnip
  6. 2
      snippets/tc.preset all-in-one.maxsnip

43
code/tc.preset.js

@ -71,8 +71,8 @@ var display_interp = 1; // Enable/disable the UI feedback when interpolating
var ignore_slot_zero = 1; // Makes previous_active_slot and interpolation display to ignore slot 0. Can be usefull when using slot 0 as a temporary step for interpolation.
var auto_writeagain = 0; // When enabled, will send a "writeagain" to pattrstorage any time a preset is stored/deleted/moved/renamed/(un)locked
var menu_number_only = 0; // Populates the umenu connected to 2nd outlet with stored preset number only, instead of number and name
var scrollable = 1; // Defines weither the object can be scrolled or not
var min_rows = 50; // Minimum number of rows to display if scrollable is enabled
var scrollable = 0; // Defines weither the object can be scrolled or not
var min_rows = 10; // Minimum number of rows to display if scrollable is enabled
var color_mode = 0; // Change the way the filled slots (stored presets) color is handeld. 0: stored_slot_color. 1: looping through color_1 to color_6. 2: Freely assign colors 1 to 6. 3: Set any color to any preset
var select_mode = 0; // 0: single click to select and recall the slot. 1: single click to select the slot, double click to recall it.
@ -101,6 +101,7 @@ var is_painting_base = 0;
var half_slot_size, half_margin, half_spacing;
var last_x, last_y, last_hovered = -1;
var y_offset = 0; // handle scrolling
var drag_scroll = 0; // handle scrolling when dragging outside of boundaries
var shift_hold, option_hold = 0;
var is_interpolating = 0;
var is_dragging = 0; // Drag flag
@ -174,15 +175,17 @@ function calc_rows_columns() {
if (layout == 0) {
columns = Math.floor((ui_width - margin + spacing) / (slot_size + spacing));
rows = Math.floor((ui_height - margin + spacing) / (slot_size + spacing));
slots_count_display = columns * rows;
if (scrollable) {
rows = Math.max(rows, Math.max(min_rows, Math.ceil(slots_highest/columns)));
}
} else {
columns = 1;
rows = Math.floor((ui_height - margin + spacing) / (slot_size + spacing));
if (scrollable) {
rows = Math.max(rows, Math.max(min_rows, slots_highest));
}
slots_count_display = columns * rows;
}
slots_count_display = columns * rows;
for (var i = 0; i < rows; i++) {
var top = margin + i * (spacing+slot_size);
@ -192,23 +195,15 @@ function calc_rows_columns() {
var right = left + slot_size;
var cur = 1 + i * columns + j;
// var prev_name = null;
// var prev_lock = 0;
// var prev_interp = -1;
var prev_state = new slot();
prev_state.init();
if (typeof slots[cur] !== 'undefined') {
prev_state = slots[cur];
// prev_name = slots[cur].name;
// prev_lock = slots[cur].lock;
// prev_interp = slots[cur].interp;
}
slots[cur] = new slot(left, top, right, bottom, prev_state.name, prev_state.lock, prev_state.interp, prev_state.color_index, prev_state.color_custom);
}
}
if (slots_count_display < slots_highest) {
for (var i = slots_count_display + 1; i <= slots_highest; i++) {
slots[i] = new slot();
@ -870,13 +865,13 @@ function recallmulti() {
function store(v) {
v = Math.floor(v);
if (v >= 0) {
if (slots[v].lock > 0) {
if (slots[v] && slots[v].lock > 0) {
error('cannot overwrite locked slot ' + v + '\n');
} else {
var recalc_rows_flag = scrollable && v > slots_highest;
if (color_pattr) {
//Initialize preset color to default for new preset
//Initialize preset color pattr to default for new preset (otherwise, previously set color is used)
color_pattr.message(0);
}
@ -1194,13 +1189,13 @@ function ondrag(x,y,but,cmd,shift,capslock,option,ctrl)
if (dist_from_start > 10) {
is_dragging = 1;
drag_slot = last_hovered;
last_x_drag = x;
last_y_drag = y+y_offset;
paint_base();
}
} else if (is_dragging == 1) {
last_hovered = get_slot_index(x, y);
last_x = x;
last_y = y;
if (!but) {
// When the button is released, the dragging ceases
if (last_hovered > 0 && last_hovered != drag_slot) {
@ -1262,8 +1257,24 @@ function ondrag(x,y,but,cmd,shift,capslock,option,ctrl)
}
} else {
// Click still hold, we keep dragging
if (scrollable) {
// Auto-scroll if mouse out of bounds
if (y+y_offset < 0 && y-(last_y-drag_scroll) < 0) {
drag_scroll = 2;
} else if (y+y_offset > ui_height && y-(last_y-drag_scroll) > 0) {
drag_scroll = -2;
} else {
drag_scroll = 0;
}
y_offset += drag_scroll;
y_offset = Math.min(y_offset, 0);
y_offset = Math.max(y_offset, -1 * (bg_height - ui_height));
}
mgraphics.redraw();
}
last_x = x;
last_y = y;
}
}
}

2
docs/tc.preset.maxref.xml

@ -182,7 +182,7 @@
</attribute>
<attribute name='scrollable' get='1' set='1' type='int' size='1' >
<digest>Scroll through your presets</digest>
<description>When set to 1, you can through the jsui to see all your presets, or at least up to the slot number defined by the min_rows attributes. Currently only works with the list layout.
<description>When set to 1, you can through the jsui to see all your presets, or at least up to the row defined by the min_rows attributes.
</description>
</attribute>
<attribute name='select_mode' get='1' set='1' type='int' size='1' >

8
extras/tc.preset Launch.maxpat

@ -4,7 +4,7 @@
"appversion" : {
"major" : 8,
"minor" : 6,
"revision" : 3,
"revision" : 4,
"architecture" : "x64",
"modernui" : 1
}
@ -26,7 +26,7 @@
"toptoolbarpinned" : 2,
"righttoolbarpinned" : 2,
"bottomtoolbarpinned" : 2,
"toolbars_unpinned_last_save" : 0,
"toolbars_unpinned_last_save" : 15,
"tallnewobj" : 0,
"boxanimatetime" : 200,
"enablehscroll" : 0,
@ -80,7 +80,7 @@
}
, {
"box" : {
"embedstate" : [ [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "autowriteagain", 0 ], [ "layout", 1 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "empty_slot_color", 0.349, 0.349, 0.349, 1 ], [ "color_mode", 0 ], [ "stored_slot_color", 0.502, 0.502, 0.502, 1 ], [ "active_slot_color", 0.808, 0.898, 0.91, 1 ], [ "bgcolor", 0.2, 0.2, 0.2, 1 ], [ "slot_round", 0 ], [ "margin", 4 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "fontsize", 14 ], [ "text_color", 0.129, 0.129, 0.129, 1 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "scrollable", 1 ], [ "fontname", "Arial" ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "ignoreslotzero", 1 ], [ "min_rows", 50 ], [ "text_bg_color", 1, 1, 1, 0.5 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "display_interp", 1 ], [ "bubblesize", 14 ], [ "spacing", 4 ], [ "select_mode", 0 ] ],
"embedstate" : [ [ "spacing", 4 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "text_bg_color", 1, 1, 1, 0.5 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "select_mode", 0 ], [ "scrollable", 0 ], [ "bubblesize", 14 ], [ "margin", 4 ], [ "fontsize", 14 ], [ "color_mode", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "ignoreslotzero", 1 ], [ "min_rows", 10 ], [ "stored_slot_color", 0.502, 0.502, 0.502, 1 ], [ "fontname", "Arial" ], [ "empty_slot_color", 0.349, 0.349, 0.349, 1 ], [ "text_color", 0.129, 0.129, 0.129, 1 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "display_interp", 1 ], [ "bgcolor", 0.2, 0.2, 0.2, 1 ], [ "slot_round", 0 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "active_slot_color", 0.808, 0.898, 0.91, 1 ], [ "autowriteagain", 0 ], [ "layout", 1 ] ],
"filename" : "tc.preset",
"id" : "obj-8",
"maxclass" : "jsui",
@ -134,7 +134,7 @@
}
, {
"box" : {
"embedstate" : [ [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "autowriteagain", 0 ], [ "layout", 0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "empty_slot_color", 0.349, 0.349, 0.349, 1 ], [ "color_mode", 0 ], [ "stored_slot_color", 0.502, 0.502, 0.502, 1 ], [ "active_slot_color", 0.808, 0.898, 0.91, 1 ], [ "bgcolor", 0.2, 0.2, 0.2, 1 ], [ "slot_round", 0 ], [ "margin", 4 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "fontsize", 14 ], [ "text_color", 0.129, 0.129, 0.129, 1 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "scrollable", 1 ], [ "fontname", "Arial" ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "ignoreslotzero", 1 ], [ "min_rows", 50 ], [ "text_bg_color", 1, 1, 1, 0.5 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "display_interp", 1 ], [ "bubblesize", 14 ], [ "spacing", 4 ], [ "select_mode", 0 ] ],
"embedstate" : [ [ "spacing", 4 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "text_bg_color", 1, 1, 1, 0.5 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "select_mode", 0 ], [ "scrollable", 0 ], [ "bubblesize", 14 ], [ "margin", 4 ], [ "fontsize", 14 ], [ "color_mode", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "ignoreslotzero", 1 ], [ "min_rows", 10 ], [ "stored_slot_color", 0.502, 0.502, 0.502, 1 ], [ "fontname", "Arial" ], [ "empty_slot_color", 0.349, 0.349, 0.349, 1 ], [ "text_color", 0.129, 0.129, 0.129, 1 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "display_interp", 1 ], [ "bgcolor", 0.2, 0.2, 0.2, 1 ], [ "slot_round", 0 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "active_slot_color", 0.808, 0.898, 0.91, 1 ], [ "autowriteagain", 0 ], [ "layout", 0 ] ],
"filename" : "tc.preset",
"id" : "obj-3",
"maxclass" : "jsui",

60
help/tc.preset.maxhelp

@ -814,7 +814,7 @@
, {
"box" : {
"border" : 0,
"embedstate" : [ [ "bubblesize", 14 ], [ "spacing", 4 ], [ "scrollable", 1 ], [ "ignoreslotzero", 1 ], [ "layout", 0 ], [ "text_color", 0.129, 0.129, 0.129, 1 ], [ "empty_slot_color", 0.349, 0.349, 0.349, 1 ], [ "min_rows", 50 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "bgcolor", 0.2, 0.2, 0.2, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "slot_round", 0 ], [ "color_mode", 0 ], [ "display_interp", 1 ], [ "margin", 4 ], [ "active_slot_color", 0.808, 0.898, 0.91, 1 ], [ "fontsize", 14 ], [ "select_mode", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "text_bg_color", 1, 1, 1, 0.5 ], [ "fontname", "Arial" ], [ "pattrstorage", "test" ], [ "stored_slot_color", 0.502, 0.502, 0.502, 1 ], [ "autowriteagain", 0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "color_1", 0.743, 0.41, 0.501, 1 ] ],
"embedstate" : [ [ "spacing", 4 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "text_bg_color", 1, 1, 1, 0.5 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "select_mode", 0 ], [ "scrollable", 0 ], [ "bubblesize", 14 ], [ "margin", 4 ], [ "fontsize", 14 ], [ "color_mode", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "ignoreslotzero", 1 ], [ "min_rows", 10 ], [ "stored_slot_color", 0.502, 0.502, 0.502, 1 ], [ "fontname", "Arial" ], [ "pattrstorage", "test" ], [ "empty_slot_color", 0.349, 0.349, 0.349, 1 ], [ "text_color", 0.129, 0.129, 0.129, 1 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "display_interp", 1 ], [ "bgcolor", 0.2, 0.2, 0.2, 1 ], [ "slot_round", 0 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "active_slot_color", 0.808, 0.898, 0.91, 1 ], [ "autowriteagain", 0 ], [ "layout", 0 ] ],
"filename" : "tc.preset.js",
"id" : "obj-10",
"maxclass" : "jsui",
@ -1187,7 +1187,7 @@
, {
"box" : {
"border" : 0,
"embedstate" : [ [ "bubblesize", 14 ], [ "spacing", 4 ], [ "scrollable", 1 ], [ "ignoreslotzero", 1 ], [ "layout", 0 ], [ "text_color", 0.129, 0.129, 0.129, 1 ], [ "empty_slot_color", 0.349, 0.349, 0.349, 1 ], [ "min_rows", 50 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "bgcolor", 0.2, 0.2, 0.2, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "slot_round", 0 ], [ "color_mode", 0 ], [ "display_interp", 1 ], [ "margin", 4 ], [ "active_slot_color", 0.808, 0.898, 0.91, 1 ], [ "fontsize", 14 ], [ "select_mode", 1 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "text_bg_color", 1, 1, 1, 0.5 ], [ "fontname", "Arial" ], [ "pattrstorage", "test" ], [ "stored_slot_color", 0.502, 0.502, 0.502, 1 ], [ "autowriteagain", 0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "color_1", 0.743, 0.41, 0.501, 1 ] ],
"embedstate" : [ [ "spacing", 4 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "text_bg_color", 1, 1, 1, 0.5 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "select_mode", 1 ], [ "scrollable", 0 ], [ "bubblesize", 14 ], [ "margin", 4 ], [ "fontsize", 14 ], [ "color_mode", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "ignoreslotzero", 1 ], [ "min_rows", 10 ], [ "stored_slot_color", 0.502, 0.502, 0.502, 1 ], [ "fontname", "Arial" ], [ "pattrstorage", "test" ], [ "empty_slot_color", 0.349, 0.349, 0.349, 1 ], [ "text_color", 0.129, 0.129, 0.129, 1 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "display_interp", 1 ], [ "bgcolor", 0.2, 0.2, 0.2, 1 ], [ "slot_round", 0 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "active_slot_color", 0.808, 0.898, 0.91, 1 ], [ "autowriteagain", 0 ], [ "layout", 0 ] ],
"filename" : "tc.preset.js",
"id" : "obj-10",
"maxclass" : "jsui",
@ -1266,7 +1266,7 @@
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 288.0, 282.0, 249.0, 60.0 ],
"patching_rect" : [ 332.0, 262.0, 249.0, 60.0 ],
"text" : "Makes displayed previous active slot and interpolation status to ignore slot 0. Can be convenient when using slot 0 as a temporary step for interpolation. It is enabled by default."
}
@ -1279,7 +1279,7 @@
"numoutlets" : 1,
"outlettype" : [ "int" ],
"parameter_enable" : 0,
"patching_rect" : [ 268.0, 87.0, 24.0, 24.0 ]
"patching_rect" : [ 312.0, 67.0, 24.0, 24.0 ]
}
}
@ -1291,7 +1291,7 @@
"numoutlets" : 1,
"outlettype" : [ "int" ],
"parameter_enable" : 0,
"patching_rect" : [ 288.0, 227.0, 24.0, 24.0 ]
"patching_rect" : [ 332.0, 207.0, 24.0, 24.0 ]
}
}
@ -1302,7 +1302,7 @@
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 268.0, 142.0, 241.0, 60.0 ],
"patching_rect" : [ 312.0, 122.0, 241.0, 60.0 ],
"text" : "When enabled, sends writeagain to pattrstrage when a preset has been stored/renamed/deleted/moved/(un)locked, keeping the json file always up to date."
}
@ -1316,7 +1316,7 @@
"numoutlets" : 1,
"outlettype" : [ "" ],
"parameter_enable" : 0,
"patching_rect" : [ 268.0, 118.0, 122.0, 22.0 ]
"patching_rect" : [ 312.0, 98.0, 122.0, 22.0 ]
}
}
@ -1329,7 +1329,7 @@
"numoutlets" : 1,
"outlettype" : [ "" ],
"parameter_enable" : 0,
"patching_rect" : [ 288.0, 258.0, 121.0, 22.0 ]
"patching_rect" : [ 332.0, 238.0, 121.0, 22.0 ]
}
}
@ -1954,7 +1954,7 @@
, {
"box" : {
"border" : 0,
"embedstate" : [ [ "bubblesize", 14 ], [ "spacing", 4 ], [ "scrollable", 1 ], [ "ignoreslotzero", 1 ], [ "layout", 0 ], [ "text_color", 0.129, 0.129, 0.129, 1 ], [ "empty_slot_color", 0.349, 0.349, 0.349, 1 ], [ "min_rows", 50 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "bgcolor", 0.2, 0.2, 0.2, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "slot_round", 0 ], [ "color_mode", 0 ], [ "display_interp", 1 ], [ "margin", 4 ], [ "active_slot_color", 0.808, 0.898, 0.91, 1 ], [ "fontsize", 14 ], [ "select_mode", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "text_bg_color", 1, 1, 1, 0.5 ], [ "fontname", "Arial" ], [ "pattrstorage", "mypat" ], [ "stored_slot_color", 0.502, 0.502, 0.502, 1 ], [ "autowriteagain", 0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "color_1", 0.743, 0.41, 0.501, 1 ] ],
"embedstate" : [ [ "spacing", 4 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "text_bg_color", 1, 1, 1, 0.5 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "select_mode", 0 ], [ "scrollable", 0 ], [ "bubblesize", 14 ], [ "margin", 4 ], [ "fontsize", 14 ], [ "color_mode", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "ignoreslotzero", 1 ], [ "min_rows", 10 ], [ "stored_slot_color", 0.502, 0.502, 0.502, 1 ], [ "fontname", "Arial" ], [ "pattrstorage", "mypat" ], [ "empty_slot_color", 0.349, 0.349, 0.349, 1 ], [ "text_color", 0.129, 0.129, 0.129, 1 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "display_interp", 1 ], [ "bgcolor", 0.2, 0.2, 0.2, 1 ], [ "slot_round", 0 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "active_slot_color", 0.808, 0.898, 0.91, 1 ], [ "autowriteagain", 0 ], [ "layout", 0 ] ],
"filename" : "tc.preset.js",
"id" : "obj-10",
"maxclass" : "jsui",
@ -2109,7 +2109,7 @@
}
,
"classnamespace" : "box",
"rect" : [ 0.0, 26.0, 678.0, 554.0 ],
"rect" : [ 100.0, 126.0, 678.0, 554.0 ],
"bglocked" : 0,
"openinpresentation" : 0,
"default_fontsize" : 12.0,
@ -2146,21 +2146,10 @@
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 10.0, 294.0, 129.0, 22.0 ],
"patching_rect" : [ 10.0, 298.0, 129.0, 22.0 ],
"text" : "loadmess savemode 0"
}
}
, {
"box" : {
"id" : "obj-5",
"maxclass" : "preset",
"numinlets" : 1,
"numoutlets" : 5,
"outlettype" : [ "preset", "int", "preset", "int", "" ],
"patching_rect" : [ 466.0, 399.0, 100.0, 40.0 ]
}
}
, {
"box" : {
@ -2210,7 +2199,7 @@
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 229.0, 192.0, 77.0, 22.0 ],
"text" : "loadmess 50"
"text" : "loadmess 10"
}
}
@ -2276,7 +2265,7 @@
, {
"box" : {
"border" : 0,
"embedstate" : [ [ "bubblesize", 14 ], [ "spacing", 4 ], [ "scrollable", 1 ], [ "ignoreslotzero", 1 ], [ "layout", 1 ], [ "text_color", 0.129, 0.129, 0.129, 1 ], [ "empty_slot_color", 0.349, 0.349, 0.349, 1 ], [ "min_rows", 50 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "bgcolor", 0.2, 0.2, 0.2, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "slot_round", 0 ], [ "color_mode", 0 ], [ "display_interp", 1 ], [ "margin", 4 ], [ "active_slot_color", 0.808, 0.898, 0.91, 1 ], [ "fontsize", 14 ], [ "select_mode", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "text_bg_color", 1, 1, 1, 0.5 ], [ "fontname", "Arial" ], [ "pattrstorage", "test" ], [ "stored_slot_color", 0.502, 0.502, 0.502, 1 ], [ "autowriteagain", 0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "color_1", 0.743, 0.41, 0.501, 1 ] ],
"embedstate" : [ [ "spacing", 4 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "text_bg_color", 1, 1, 1, 0.5 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "select_mode", 0 ], [ "scrollable", 1 ], [ "bubblesize", 14 ], [ "margin", 4 ], [ "fontsize", 14 ], [ "color_mode", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "ignoreslotzero", 1 ], [ "min_rows", 10 ], [ "stored_slot_color", 0.502, 0.502, 0.502, 1 ], [ "fontname", "Arial" ], [ "pattrstorage", "test" ], [ "empty_slot_color", 0.349, 0.349, 0.349, 1 ], [ "text_color", 0.129, 0.129, 0.129, 1 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "display_interp", 1 ], [ "bgcolor", 0.2, 0.2, 0.2, 1 ], [ "slot_round", 0 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "active_slot_color", 0.808, 0.898, 0.91, 1 ], [ "autowriteagain", 0 ], [ "layout", 1 ] ],
"filename" : "tc.preset.js",
"id" : "obj-10",
"maxclass" : "jsui",
@ -2333,7 +2322,7 @@
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 427.0, 107.0, 231.0, 91.0 ],
"patching_rect" : [ 448.0, 74.0, 231.0, 91.0 ],
"text" : "...and: bgcolor, empty_slot_color, stored_slot_color, interp_slot_color, active_slot_color, fontname, fontsize, text_bg_color, text_color\n(see the tc.preset attributes in the inspector or in its Reference page)"
}
@ -2341,24 +2330,23 @@
, {
"box" : {
"id" : "obj-65",
"linecount" : 6,
"linecount" : 2,
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 278.0, 181.0, 153.0, 87.0 ],
"text" : "Minimum number of slots to display when scrollable is enabled. If a preset is stored in a slot higher than that value, then it is ignored."
"patching_rect" : [ 278.0, 218.5, 196.0, 33.0 ],
"text" : "Minimum number of rows to display when scrollable is enabled."
}
}
, {
"box" : {
"id" : "obj-62",
"linecount" : 2,
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 172.0, 81.0, 211.0, 33.0 ],
"text" : "Enable to scroll through your presets! (Only work in list mode currently)"
"patching_rect" : [ 172.0, 87.5, 211.0, 20.0 ],
"text" : "Enable to scroll through your presets! "
}
}
@ -2482,7 +2470,7 @@
"numoutlets" : 2,
"outlettype" : [ "", "bang" ],
"parameter_enable" : 0,
"patching_rect" : [ 304.0, 294.0, 50.0, 22.0 ]
"patching_rect" : [ 303.0, 294.0, 50.0, 22.0 ]
}
}
@ -2754,7 +2742,7 @@
}
,
"classnamespace" : "box",
"rect" : [ 100.0, 126.0, 678.0, 554.0 ],
"rect" : [ 0.0, 26.0, 678.0, 554.0 ],
"bglocked" : 0,
"openinpresentation" : 0,
"default_fontsize" : 12.0,
@ -4008,7 +3996,7 @@
"numoutlets" : 3,
"outlettype" : [ "", "", "" ],
"patching_rect" : [ 322.0, 400.0, 40.0, 22.0 ],
"restore" : [ 0.43, 0.34, -0.47, 0.92, -0.77, -0.56, -0.16, -0.03, -0.74, 0.06, -0.81, 0.97, -0.39, 0.47, 0.73, -0.63 ],
"restore" : [ -0.51, -0.05, 0.22, 0.9, -0.21, -0.87, -0.33, -0.81, 0.41, -0.74, 0.67, -0.85, -0.15, -0.92, -0.6, 0.05 ],
"saved_object_attributes" : {
"parameter_enable" : 0,
"parameter_mappable" : 0
@ -4346,7 +4334,7 @@
, {
"box" : {
"border" : 0,
"embedstate" : [ [ "bubblesize", 14 ], [ "spacing", 4 ], [ "scrollable", 1 ], [ "ignoreslotzero", 1 ], [ "layout", 0 ], [ "text_color", 0.129, 0.129, 0.129, 1 ], [ "empty_slot_color", 0.349, 0.349, 0.349, 1 ], [ "min_rows", 50 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "bgcolor", 0.2, 0.2, 0.2, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "slot_round", 0 ], [ "color_mode", 3 ], [ "display_interp", 1 ], [ "margin", 4 ], [ "active_slot_color", 0.808, 0.898, 0.91, 1 ], [ "fontsize", 14 ], [ "select_mode", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "text_bg_color", 1, 1, 1, 0.5 ], [ "fontname", "Arial" ], [ "pattrstorage", "colors" ], [ "stored_slot_color", 0.502, 0.502, 0.502, 1 ], [ "autowriteagain", 0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "color_1", 0.743, 0.41, 0.501, 1 ] ],
"embedstate" : [ [ "spacing", 4 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "text_bg_color", 1, 1, 1, 0.5 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "select_mode", 0 ], [ "scrollable", 0 ], [ "bubblesize", 14 ], [ "margin", 4 ], [ "fontsize", 14 ], [ "color_mode", 1 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "ignoreslotzero", 1 ], [ "min_rows", 10 ], [ "stored_slot_color", 0.502, 0.502, 0.502, 1 ], [ "fontname", "Arial" ], [ "pattrstorage", "colors" ], [ "empty_slot_color", 0.349, 0.349, 0.349, 1 ], [ "text_color", 0.129, 0.129, 0.129, 1 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "display_interp", 1 ], [ "bgcolor", 0.2, 0.2, 0.2, 1 ], [ "slot_round", 0 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "active_slot_color", 0.808, 0.898, 0.91, 1 ], [ "autowriteagain", 0 ], [ "layout", 0 ] ],
"filename" : "tc.preset.js",
"id" : "obj-10",
"maxclass" : "jsui",
@ -4632,7 +4620,7 @@
, {
"box" : {
"border" : 0,
"embedstate" : [ [ "bubblesize", 14 ], [ "spacing", 4 ], [ "scrollable", 1 ], [ "ignoreslotzero", 1 ], [ "layout", 0 ], [ "text_color", 0.129, 0.129, 0.129, 1 ], [ "empty_slot_color", 0.349, 0.349, 0.349, 1 ], [ "min_rows", 50 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "bgcolor", 0.2, 0.2, 0.2, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "slot_round", 0 ], [ "color_mode", 0 ], [ "display_interp", 1 ], [ "margin", 4 ], [ "active_slot_color", 0.808, 0.898, 0.91, 1 ], [ "fontsize", 14 ], [ "select_mode", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "text_bg_color", 1, 1, 1, 0.5 ], [ "fontname", "Arial" ], [ "pattrstorage", "test" ], [ "stored_slot_color", 0.502, 0.502, 0.502, 1 ], [ "autowriteagain", 0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "color_1", 0.743, 0.41, 0.501, 1 ] ],
"embedstate" : [ [ "spacing", 4 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "text_bg_color", 1, 1, 1, 0.5 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "select_mode", 0 ], [ "scrollable", 0 ], [ "bubblesize", 14 ], [ "margin", 4 ], [ "fontsize", 14 ], [ "color_mode", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "ignoreslotzero", 1 ], [ "min_rows", 10 ], [ "stored_slot_color", 0.502, 0.502, 0.502, 1 ], [ "fontname", "Arial" ], [ "pattrstorage", "test" ], [ "empty_slot_color", 0.349, 0.349, 0.349, 1 ], [ "text_color", 0.129, 0.129, 0.129, 1 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "display_interp", 1 ], [ "bgcolor", 0.2, 0.2, 0.2, 1 ], [ "slot_round", 0 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "active_slot_color", 0.808, 0.898, 0.91, 1 ], [ "autowriteagain", 0 ], [ "layout", 0 ] ],
"filename" : "tc.preset.js",
"id" : "obj-10",
"maxclass" : "jsui",

221
snippets/tc.preset all-in-one-color.maxsnip

File diff suppressed because one or more lines are too long

2
snippets/tc.preset all-in-one.maxsnip

@ -400,7 +400,7 @@
"numinlets" : 1,
"filename" : "tc.preset.js",
"numoutlets" : 4,
"embedstate" : [ [ "bgcolor", 0.2, 0.2, 0.2, 1 ], [ "active_slot_color", 0.808, 0.898, 0.91, 1 ], [ "fontname", "Arial" ], [ "pattrstorage", "mypat" ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "text_bg_color", 1, 1, 1, 0.5 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "layout", 0 ], [ "spacing", 4 ], [ "autowriteagain", 0 ], [ "scrollable", 1 ], [ "empty_slot_color", 0.349, 0.349, 0.349, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "ignoreslotzero", 1 ], [ "slot_round", 0 ], [ "stored_slot_color", 0.502, 0.502, 0.502, 1 ], [ "bubblesize", 14 ], [ "min_rows", 50 ], [ "display_interp", 1 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "text_color", 0.129, 0.129, 0.129, 1 ], [ "margin", 4 ], [ "select_mode", 0 ], [ "fontsize", 14 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "color_mode", 0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ] ]
"embedstate" : [ [ "bgcolor", 0.2, 0.2, 0.2, 1 ], [ "active_slot_color", 0.808, 0.898, 0.91, 1 ], [ "fontname", "Arial" ], [ "pattrstorage", "mypat" ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "text_bg_color", 1, 1, 1, 0.5 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "layout", 0 ], [ "spacing", 4 ], [ "autowriteagain", 0 ], [ "scrollable", 0 ], [ "empty_slot_color", 0.349, 0.349, 0.349, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "ignoreslotzero", 1 ], [ "slot_round", 0 ], [ "stored_slot_color", 0.502, 0.502, 0.502, 1 ], [ "bubblesize", 14 ], [ "min_rows", 10 ], [ "display_interp", 1 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "text_color", 0.129, 0.129, 0.129, 1 ], [ "margin", 4 ], [ "select_mode", 0 ], [ "fontsize", 14 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "color_mode", 0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ] ]
}
}

Loading…
Cancel
Save