Skip to content

Commit 72892f5

Browse files
committed
Initial implementation of Harp barcode decoding
1 parent 759700a commit 72892f5

3 files changed

Lines changed: 614 additions & 24 deletions

File tree

Source/Processors/Parameter/ParameterEditor.cpp

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -909,15 +909,65 @@ void SyncControlButton::paintButton (Graphics& g, bool isMouseOver, bool isButto
909909
}
910910
break;
911911
}
912+
case SyncStatus::HARP_DETECTING:
913+
{
914+
if (isMouseOver)
915+
{
916+
//LIGHT PURPLE - analyzing for Harp barcodes
917+
g.setColour (Colour (200, 150, 255));
918+
}
919+
else
920+
{
921+
//DARK PURPLE - analyzing for Harp barcodes
922+
g.setColour (Colour (147, 112, 219));
923+
}
924+
break;
925+
}
926+
case SyncStatus::HARP_CLOCK:
927+
{
928+
Colour harpClockColour = Colour (255, 20, 147); // Deep pink/magenta for Harp synchronization
929+
930+
// If the acquisition is not running, use a muted colour
931+
if (! CoreServices::getAcquisitionStatus())
932+
harpClockColour = harpClockColour.withAlpha (0.4f);
933+
934+
if (isMouseOver)
935+
{
936+
// HARP PINK - slightly contrasting
937+
g.setColour (harpClockColour.contrasting (0.1f));
938+
}
939+
else
940+
{
941+
// HARP PINK
942+
g.setColour (harpClockColour);
943+
}
944+
break;
945+
}
912946
}
913947

914948
g.fillRoundedRectangle (2, 2, getWidth() - 4, getHeight() - 4, 3);
915949

950+
// Draw text indicators
951+
g.setColour (Colour (255, 255, 255));
952+
g.setFont (FontOptions ("Inter", "Regular", 12.0f));
953+
916954
if (node->isMainDataStream (streamKey))
917955
{
918-
g.setColour (Colour (255, 255, 255));
919-
g.setFont (FontOptions ("Inter", "Regular", 12.0f));
920-
g.drawText ("M", getLocalBounds().reduced (3), juce::Justification::centred);
956+
if (node->synchronizer.isHarpStream (streamKey))
957+
{
958+
// Main Harp stream - show both indicators
959+
g.drawText ("MH", getLocalBounds().reduced (3), juce::Justification::centred);
960+
}
961+
else
962+
{
963+
// Main stream
964+
g.drawText ("M", getLocalBounds().reduced (3), juce::Justification::centred);
965+
}
966+
}
967+
else if (node->synchronizer.isHarpStream (streamKey))
968+
{
969+
// Harp stream (not main)
970+
g.drawText ("H", getLocalBounds().reduced (3), juce::Justification::centred);
921971
}
922972
}
923973

0 commit comments

Comments
 (0)