diff --git a/Sources/LyrebirdShoeGazeUI/PedalPaletteView.swift b/Sources/LyrebirdShoeGazeUI/PedalPaletteView.swift index 9a71d8b..2cb16db 100644 --- a/Sources/LyrebirdShoeGazeUI/PedalPaletteView.swift +++ b/Sources/LyrebirdShoeGazeUI/PedalPaletteView.swift @@ -160,15 +160,21 @@ public struct PedalPaletteView: View { } /// The `.amp` bucket on its own, or `nil` when no amp models are visible. Split out so the - /// horizontal picker can drop the (large) amp list into the ROUTING row instead of letting it - /// stretch the head of the effects row. + /// horizontal picker can drop the (large) amp list into the second row (with Routing and the + /// Cabinet) instead of letting it stretch the head of the effects row. private var ampGroup: (category: PedalCategory, names: [String])? { groupedVisiblePedals.first { $0.category == .amp } } - /// Visible pedal groups excluding the amp models — everything the effects row shows. + /// The `.cabinet` bucket on its own, or `nil` when no cabinet is visible. Sits on the second row + /// between Routing and the amp models (rig-structure controls grouped together). + private var cabinetGroup: (category: PedalCategory, names: [String])? { + groupedVisiblePedals.first { $0.category == .cabinet } + } + + /// Visible pedal groups excluding the amp models and the cabinet — the actual effects row (row 1). private var effectGroups: [(category: PedalCategory, names: [String])] { - groupedVisiblePedals.filter { $0.category != .amp } + groupedVisiblePedals.filter { $0.category != .amp && $0.category != .cabinet } } // MARK: - Body @@ -232,6 +238,16 @@ public struct PedalPaletteView: View { } } } + if let cabinet: (category: PedalCategory, names: [String]) = cabinetGroup { + VStack(alignment: .leading, spacing: PedalPaletteView.rowSpacing) { + categoryLabel(cabinet.category) + HStack(alignment: .top, spacing: PedalPaletteView.rowSpacing) { + ForEach(cabinet.names, id: \.self) { name in + pedalRow(name) + } + } + } + } if let amps: (category: PedalCategory, names: [String]) = ampGroup { VStack(alignment: .leading, spacing: PedalPaletteView.rowSpacing) { categoryLabel(amps.category)