commit bddbcf89e00e299078b93c7658e7a1688cc9abc4
parent e0009dfedb6d65c213c46d873adfc9d6c3672b1e
Author: Christopher A. Oliver <caowasteland@gmail.com>
Date: Sat, 28 Nov 2015 12:40:47 -0500
Nasty hack to work around Z order redraw ambiguity in scopes & noise labels
Diffstat:
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/UI/ADnoteUI.fl b/src/UI/ADnoteUI.fl
@@ -214,6 +214,7 @@ else
case 0:
whitenoiselabel->hide();
pinknoiselabel->hide();
+ oscil->Overlay = NULL;
voiceresonanceenabled->activate();
detunevalueoutput->activate();
voicedetune->activate();
@@ -223,10 +224,12 @@ else
case 1:
whitenoiselabel->show();
pinknoiselabel->hide();
+ oscil->Overlay = whitenoiselabel;
break;
default:
pinknoiselabel->show();
whitenoiselabel->hide();
+ oscil->Overlay = pinknoiselabel;
}
voiceresonanceenabled->deactivate();
@@ -820,9 +823,9 @@ o->redraw();}
} {}
Fl_Choice {} {
callback {switch (o->value()) {
- case 0: voicemodegroup->activate(); whitenoiselabel->hide(); pinknoiselabel->hide(); break;
- case 1: voicemodegroup->deactivate(); whitenoiselabel->show(); pinknoiselabel->hide(); break;
- default: voicemodegroup->deactivate(); whitenoiselabel->hide(); pinknoiselabel->show(); break;
+ case 0: voicemodegroup->activate(); whitenoiselabel->hide(); pinknoiselabel->hide(); osc->Overlay=NULL; break;
+ case 1: voicemodegroup->deactivate(); whitenoiselabel->show(); pinknoiselabel->hide(); osc->Overlay=whitenoiselabel; break;
+ default: voicemodegroup->deactivate(); whitenoiselabel->hide(); pinknoiselabel->show(); osc->Overlay=pinknoiselabel; break;
}} open
tooltip {Oscillator Type (sound/noise)} xywh {5 515 65 20} down_box BORDER_BOX labelsize 10 textfont 1 textsize 10
code0 {o->init("Type");}
diff --git a/src/UI/Fl_Oscilloscope.h b/src/UI/Fl_Oscilloscope.h
@@ -17,7 +17,8 @@ class Fl_Oscilloscope : public Fl_Box, public Fl_Osc_Widget
{
public:
Fl_Oscilloscope(int x,int y, int w, int h, const char *label=0)
- :Fl_Box(x,y,w,h,label), Fl_Osc_Widget(this), smps(0), oscilsize(0)
+ :Fl_Box(x,y,w,h,label), Fl_Osc_Widget(this), smps(0), oscilsize(0),
+ Overlay(NULL)
{
phase=64;
box(FL_FLAT_BOX);
@@ -129,6 +130,8 @@ class Fl_Oscilloscope : public Fl_Box, public Fl_Osc_Widget
fl_rect(ox-1,oy-1,lx+2,ly+2);
fl_line_style(FL_SOLID,0);
+ if (Overlay)
+ Overlay->redraw();
}
//allows UI to manipuate phase of displayed waveform
@@ -149,4 +152,6 @@ class Fl_Oscilloscope : public Fl_Box, public Fl_Osc_Widget
float *smps;
int oscilsize;
Fl_Color bkgnd;
+ public:
+ Fl_Box *Overlay;
};