Add 'R' toggle key + fixes from initial testing

This commit is contained in:
Charles J. Cliffe
2017-10-12 00:07:05 -04:00
parent f8e51df8cd
commit 38fab6ac51
8 changed files with 42 additions and 10 deletions
+18 -6
View File
@@ -104,17 +104,25 @@ void PrimaryGLContext::DrawDemodInfo(DemodulatorInstancePtr demod, RGBA4f color,
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
bool soloMode = wxGetApp().getSoloMode();
bool isRecording = demod->isRecording();
bool isSolo = soloMode && demod == wxGetApp().getDemodMgr().getLastActiveDemodulator();
RGBA4f labelBg(0, 0, 0, 0.35f);
if (isSolo) {
glColor4f(0.8f, 0.8f, 0, 0.35f);
labelBg.r = labelBg.g = 0.8f;
} else if (demod->isMuted()) {
glColor4f(0.8f, 0, 0, 0.35f);
labelBg.r = 0.8f;
} else if (soloMode) {
glColor4f(0.2f, 0, 0, 0.35f);
} else {
glColor4f(0, 0, 0, 0.35f);
labelBg.r = 0.2f;
}
// TODO: Better recording indicator... pulsating red circle?
if (isRecording) {
labelBg.g = 1.0f;
}
glColor4f(labelBg.r, labelBg.g, labelBg.b, labelBg.a);
glBegin(GL_QUADS);
glVertex3f(uxPos - ofsLeft, hPos + labelHeight, 0.0);
@@ -167,7 +175,11 @@ void PrimaryGLContext::DrawDemodInfo(DemodulatorInstancePtr demod, RGBA4f color,
if (demod->isDeltaLock()) {
demodLabel.append(" [V]");
}
if (isRecording) {
demodLabel.append(" [R]");
}
if (demod->getDemodulatorType() == "USB") {
GLFont::getFont(16, GLFont::getScaleFactor()).drawString(demodLabel, uxPos, hPos, GLFont::GLFONT_ALIGN_LEFT, GLFont::GLFONT_ALIGN_CENTER, 0, 0, true);
} else if (demod->getDemodulatorType() == "LSB") {