Compare commits
	
		
			2 Commits
		
	
	
		
			9ad871da82
			...
			4624e64505
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 4624e64505 | |||
| 2118487a7c | 
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -3,3 +3,4 @@
 | 
				
			|||||||
.LSOverride
 | 
					.LSOverride
 | 
				
			||||||
media/
 | 
					media/
 | 
				
			||||||
dist/
 | 
					dist/
 | 
				
			||||||
 | 
					*.zip
 | 
				
			||||||
							
								
								
									
										12
									
								
								build.sh
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								build.sh
									
									
									
									
									
								
							@@ -79,6 +79,18 @@ echo "Max 8 package: $MAX8_DIR"
 | 
				
			|||||||
echo "Max 9 package: $MAX9_DIR"
 | 
					echo "Max 9 package: $MAX9_DIR"
 | 
				
			||||||
echo ""
 | 
					echo ""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Create zip files
 | 
				
			||||||
 | 
					echo "Creating zip archives..."
 | 
				
			||||||
 | 
					cd "$DIST_DIR/Max 8"
 | 
				
			||||||
 | 
					zip -r "../../${PACKAGE_NAME}_Max8.zip" "$PACKAGE_NAME" -q
 | 
				
			||||||
 | 
					cd "../Max 9"
 | 
				
			||||||
 | 
					zip -r "../../${PACKAGE_NAME}_Max9.zip" "$PACKAGE_NAME" -q
 | 
				
			||||||
 | 
					cd ../..
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo "✓ Created ${PACKAGE_NAME}_Max8.zip"
 | 
				
			||||||
 | 
					echo "✓ Created ${PACKAGE_NAME}_Max9.zip"
 | 
				
			||||||
 | 
					echo ""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Ask to install
 | 
					# Ask to install
 | 
				
			||||||
read -p "Install to Max Packages folders (~/Documents/Max <8|9>/Packages)? (y/n) " -n 1 -r
 | 
					read -p "Install to Max Packages folders (~/Documents/Max <8|9>/Packages)? (y/n) " -n 1 -r
 | 
				
			||||||
echo
 | 
					echo
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -120,7 +120,9 @@ var last_x, last_y, last_hovered = -1;
 | 
				
			|||||||
var last_hovered_is_preset_slot = false;
 | 
					var last_hovered_is_preset_slot = false;
 | 
				
			||||||
var y_offset = 0; // handle scrolling
 | 
					var y_offset = 0; // handle scrolling
 | 
				
			||||||
var drag_scroll = 0; // handle scrolling when dragging outside of boundaries
 | 
					var drag_scroll = 0; // handle scrolling when dragging outside of boundaries
 | 
				
			||||||
var shift_hold, option_hold = 0;
 | 
					var shift_hold = 0;
 | 
				
			||||||
 | 
					var option_hold = 0;
 | 
				
			||||||
 | 
					var control_hold = 0;
 | 
				
			||||||
var is_interpolating = 0;
 | 
					var is_interpolating = 0;
 | 
				
			||||||
var is_dragging = 0;    // Drag flag
 | 
					var is_dragging = 0;    // Drag flag
 | 
				
			||||||
var drag_slot = -1;     // Stores the slot that's being dragged
 | 
					var drag_slot = -1;     // Stores the slot that's being dragged
 | 
				
			||||||
@@ -498,22 +500,48 @@ function paint()
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        // Hovered slot
 | 
					        // Hovered slot
 | 
				
			||||||
        if (last_hovered > -1) {
 | 
					        if (last_hovered > -1) {
 | 
				
			||||||
            if (shift_hold && last_hovered_is_preset_slot) {
 | 
					            if (last_hovered_is_preset_slot) {
 | 
				
			||||||
                if (option_hold) {
 | 
					                if (shift_hold) {
 | 
				
			||||||
 | 
					                    if (control_hold && slots[last_hovered].name !== null) {
 | 
				
			||||||
 | 
					                        // About to lock/unlock
 | 
				
			||||||
 | 
					                        var bracket_size = slot_size * 0.2;
 | 
				
			||||||
 | 
					                        mgraphics.set_source_rgba(1, 1, 1, 0.8);
 | 
				
			||||||
 | 
					                        mgraphics.set_line_width(2);
 | 
				
			||||||
 | 
					                        mgraphics.move_to(slots[last_hovered].left + bracket_size, slots[last_hovered].top - 2);
 | 
				
			||||||
 | 
					                        mgraphics.rel_line_to(-bracket_size - 2, 0);
 | 
				
			||||||
 | 
					                        mgraphics.rel_line_to(0, slot_size + 4);
 | 
				
			||||||
 | 
					                        mgraphics.rel_line_to(bracket_size + 2, 0);
 | 
				
			||||||
 | 
					                        mgraphics.move_to(slots[last_hovered].right - bracket_size, slots[last_hovered].top - 2);
 | 
				
			||||||
 | 
					                        mgraphics.rel_line_to(2 + bracket_size, 0);
 | 
				
			||||||
 | 
					                        mgraphics.rel_line_to(0, slot_size + 4);
 | 
				
			||||||
 | 
					                        mgraphics.rel_line_to(- 2 - bracket_size, 0);
 | 
				
			||||||
 | 
					                        mgraphics.stroke();
 | 
				
			||||||
 | 
					                    } else if (option_hold && !control_hold  && slots[last_hovered].name !== null) {
 | 
				
			||||||
                        // About to delete
 | 
					                        // About to delete
 | 
				
			||||||
                        mgraphics.set_source_rgba(empty_slot_color[0], empty_slot_color[1], empty_slot_color[2], 0.8);
 | 
					                        mgraphics.set_source_rgba(empty_slot_color[0], empty_slot_color[1], empty_slot_color[2], 0.8);
 | 
				
			||||||
                        draw_slot_bubble(slots[last_hovered].left + 1, slots[last_hovered].top + 1, slot_size-2, slot_size-2);
 | 
					                        draw_slot_bubble(slots[last_hovered].left + 1, slots[last_hovered].top + 1, slot_size-2, slot_size-2);
 | 
				
			||||||
                        mgraphics.fill();
 | 
					                        mgraphics.fill();
 | 
				
			||||||
                } else {
 | 
					                    } else if (!control_hold && !option_hold){
 | 
				
			||||||
                        // About to store
 | 
					                        // About to store
 | 
				
			||||||
                        mgraphics.set_source_rgba(active_slot_color[0], active_slot_color[1], active_slot_color[2], 0.7);
 | 
					                        mgraphics.set_source_rgba(active_slot_color[0], active_slot_color[1], active_slot_color[2], 0.7);
 | 
				
			||||||
                        draw_slot_bubble(slots[last_hovered].left + 1, slots[last_hovered].top + 1, slot_size-2, slot_size-2);
 | 
					                        draw_slot_bubble(slots[last_hovered].left + 1, slots[last_hovered].top + 1, slot_size-2, slot_size-2);
 | 
				
			||||||
                        mgraphics.fill();
 | 
					                        mgraphics.fill();
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 | 
					                } else if (control_hold && slots[last_hovered].name !== null) {
 | 
				
			||||||
 | 
					                    // About to rename
 | 
				
			||||||
 | 
					                    mgraphics.set_source_rgba(1, 1, 1, 0.8);
 | 
				
			||||||
 | 
					                    mgraphics.set_line_width(2);
 | 
				
			||||||
 | 
					                    mgraphics.move_to(slots[last_hovered].left - 2, slots[last_hovered].top - 2);
 | 
				
			||||||
 | 
					                    mgraphics.rel_line_to(slot_size + 4, 0);
 | 
				
			||||||
 | 
					                    mgraphics.move_to(slots[last_hovered].left - 2, slots[last_hovered].bottom + 2);
 | 
				
			||||||
 | 
					                    mgraphics.rel_line_to(slot_size + 4, 0);
 | 
				
			||||||
 | 
					                    mgraphics.stroke();
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // Slot border
 | 
					            // Slot border
 | 
				
			||||||
            mgraphics.set_source_rgba(1, 1, 1, 0.8);
 | 
					            mgraphics.set_source_rgba(1, 1, 1, 0.8);
 | 
				
			||||||
 | 
					            mgraphics.set_line_width(1);
 | 
				
			||||||
            draw_slot_bubble(slots[last_hovered].left, slots[last_hovered].top, slot_size, slot_size);
 | 
					            draw_slot_bubble(slots[last_hovered].left, slots[last_hovered].top, slot_size, slot_size);
 | 
				
			||||||
            mgraphics.stroke();
 | 
					            mgraphics.stroke();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1451,9 +1479,10 @@ function onidle(x,y,but,cmd,shift,capslock,option,ctrl)
 | 
				
			|||||||
            redraw_flag = true;
 | 
					            redraw_flag = true;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if (shift_hold != shift || option_hold != option) {
 | 
					    if (shift_hold != shift || option_hold != option || control_hold != ctrl) {
 | 
				
			||||||
        shift_hold = shift;
 | 
					        shift_hold = shift;
 | 
				
			||||||
		option_hold = option;
 | 
							option_hold = option;
 | 
				
			||||||
 | 
					        control_hold = ctrl;
 | 
				
			||||||
        redraw_flag = true;
 | 
					        redraw_flag = true;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    last_hovered_is_preset_slot = scrollable && nbslot_edit && last_hovered > (true_slots_count_display - 2) ? false : true;
 | 
					    last_hovered_is_preset_slot = scrollable && nbslot_edit && last_hovered > (true_slots_count_display - 2) ? false : true;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user