@@ -769,6 +769,7 @@ class CampioneUI : public UI
769769 preDrumMapZones_ = zones_;
770770 pendingDrumDialog_ = true ;
771771 setState (kStateKeyMapDrum , " 1" );
772+ flashBtn (kFlashDrum );
772773 showStatus (" Analyzing drums\xe2\x80\xa6 " );
773774 return true ;
774775 }
@@ -788,6 +789,7 @@ class CampioneUI : public UI
788789 pushZoneUpdate (static_cast <std::size_t >(zi));
789790 }
790791 }
792+ flashBtn (kFlashSpread );
791793 repaint ();
792794 return true ;
793795 }
@@ -1713,33 +1715,44 @@ class CampioneUI : public UI
17131715 Clock::now () - flashedBtnAt_).count ();
17141716 const bool flashActive = (flashedBtn_ != kFlashNone && flashAge < 200 );
17151717
1716- // drawActionBtn: colored teal style, brightens briefly when flashing
1717- auto drawActionBtn = [&](Rect& out, const char * label, int btnId) {
1718+ // drawActionBtn: theme 0= teal (zone ops), 1=amber (drum), 2=blue (spread)
1719+ auto drawActionBtn = [&](Rect& out, const char * label, int btnId, int theme ) {
17181720 out = { bx, ay, btnW, kActionH };
17191721 const bool lit = flashActive && (flashedBtn_ == btnId);
1722+ struct { int bgR,bgG,bgB, stR,stG,stB, txR,txG,txB; } c;
1723+ if (theme == 1 ) { // amber — drum analysis
1724+ c = lit ? decltype (c){90 , 65 , 22 , 210 , 155 , 65 , 255 , 228 , 145 }
1725+ : decltype (c){55 , 38 , 12 , 130 , 95 , 35 , 215 , 175 , 100 };
1726+ } else if (theme == 2 ) { // blue — keyboard spread
1727+ c = lit ? decltype (c){35 , 58 ,108 , 95 , 170 ,230 , 195 , 230 , 255 }
1728+ : decltype (c){18 , 32 , 62 , 50 , 105 ,165 , 135 , 195 , 240 };
1729+ } else { // teal — zone edits (default)
1730+ c = lit ? decltype (c){38 , 88 , 80 , 80 , 190 ,170 , 200 , 255 , 240 }
1731+ : decltype (c){18 , 55 , 52 , 45 , 120 ,110 , 110 , 215 , 195 };
1732+ }
17201733 beginPath ();
1721- fillColor (lit ? 38 : 18 , lit ? 88 : 55 , lit ? 80 : 52 , 240 );
1734+ fillColor (c. bgR , c. bgG , c. bgB , 240 );
17221735 roundedRect (out.x , out.y , out.w , out.h , 4 .0f );
17231736 fill ();
17241737 closePath ();
17251738 beginPath ();
1726- strokeColor (lit ? 80 : 45 , lit ? 190 : 120 , lit ? 170 : 110 , lit ? 255 : 200 );
1739+ strokeColor (c. stR , c. stG , c. stB , lit ? 255 : 200 );
17271740 strokeWidth (lit ? 1 .5f : 1 .0f );
17281741 roundedRect (out.x , out.y , out.w , out.h , 4 .0f );
17291742 stroke ();
17301743 closePath ();
17311744 fontSize (9 .0f );
17321745 textAlign (ALIGN_CENTER | ALIGN_MIDDLE );
1733- fillColor (lit ? 200 : 110 , lit ? 255 : 215 , lit ? 240 : 195 , 255 );
1746+ fillColor (c. txR , c. txG , c. txB , 255 );
17341747 text (out.x + out.w * 0 .5f , out.y + out.h * 0 .5f , label, nullptr );
17351748 bx += btnW + gap;
17361749 };
17371750
1738- drawActionBtn (waveNormBtn_, " Normalize" , kFlashNorm );
1739- drawActionBtn (waveTrimBtn_, " Trim" , kFlashTrim );
1740- drawActionBtn (waveFadeBtn_, " Fade" , kFlashFade );
1741- drawActionBtn (waveRevBtn_, " Reverse" , kFlashRev );
1742- drawActionBtn (waveRandBtn_, " Shuffle" , kFlashRand );
1751+ drawActionBtn (waveNormBtn_, " Normalize" , kFlashNorm , 0 );
1752+ drawActionBtn (waveTrimBtn_, " Trim" , kFlashTrim , 0 );
1753+ drawActionBtn (waveFadeBtn_, " Fade" , kFlashFade , 0 );
1754+ drawActionBtn (waveRevBtn_, " Reverse" , kFlashRev , 0 );
1755+ drawActionBtn (waveRandBtn_, " Shuffle" , kFlashRand , 0 );
17431756
17441757 // Slice controls: [−][N][+] [Slice ▸]
17451758 {
@@ -1770,13 +1783,13 @@ class CampioneUI : public UI
17701783 drawSpinBtn (waveSliceIncBtn_, bx, " +" );
17711784 bx += spinW + gap;
17721785 // Slice trigger button
1773- drawActionBtn (waveSliceBtn_, " Slice \xe2\x96\xb8 " );
1786+ drawActionBtn (waveSliceBtn_, " Slice \xe2\x96\xb8 " , kFlashNone , 0 );
17741787 }
17751788
17761789 // Zone-layout buttons (operate on all zones)
17771790 bx += gap;
1778- drawActionBtn (drumBtn_, " Drum" );
1779- drawActionBtn (spreadBtn_, " Spread" );
1791+ drawActionBtn (drumBtn_, " Drum" , kFlashDrum , 1 );
1792+ drawActionBtn (spreadBtn_, " Spread" , kFlashSpread , 2 );
17801793 }
17811794
17821795 // ADSR + filter row (bottom 50px of waveform panel)
@@ -2746,7 +2759,7 @@ class CampioneUI : public UI
27462759 Rect waveRevBtn_ {};
27472760 Rect waveRandBtn_ {};
27482761 // Flash state: which action button was last clicked and when
2749- enum { kFlashNone =0 , kFlashNorm , kFlashTrim , kFlashFade , kFlashRev , kFlashRand };
2762+ enum { kFlashNone =0 , kFlashNorm , kFlashTrim , kFlashFade , kFlashRev , kFlashRand , kFlashDrum , kFlashSpread };
27502763 int flashedBtn_ = kFlashNone ;
27512764 std::chrono::steady_clock::time_point flashedBtnAt_;
27522765 Rect waveSliceBtn_ {};
0 commit comments