Add center line for hovered/new/move state modems

This commit is contained in:
Charles J. Cliffe
2016-03-07 19:25:12 -05:00
parent b250825595
commit 29d411cead
4 changed files with 31 additions and 8 deletions
+17 -2
View File
@@ -59,7 +59,7 @@ PrimaryGLContext::PrimaryGLContext(wxGLCanvas *canvas, wxGLContext *sharedContex
//#endif
}
void PrimaryGLContext::DrawDemodInfo(DemodulatorInstance *demod, RGBA4f color, long long center_freq, long long srate) {
void PrimaryGLContext::DrawDemodInfo(DemodulatorInstance *demod, RGBA4f color, long long center_freq, long long srate, bool centerline) {
if (!demod) {
return;
}
@@ -143,6 +143,13 @@ void PrimaryGLContext::DrawDemodInfo(DemodulatorInstance *demod, RGBA4f color, l
glEnd();
}
if (centerline) {
glColor4f(color.r, color.g, color.b, 0.5);
glBegin(GL_LINES);
glVertex3f(uxPos, 1.0, 0.0);
glVertex3f(uxPos, -1.0, 0.0);
glEnd();
}
glColor4f(1.0, 1.0, 1.0, 0.8);
@@ -170,7 +177,7 @@ void PrimaryGLContext::DrawDemodInfo(DemodulatorInstance *demod, RGBA4f color, l
}
void PrimaryGLContext::DrawFreqBwInfo(long long freq, int bw, RGBA4f color, long long center_freq, long long srate, bool stack) {
void PrimaryGLContext::DrawFreqBwInfo(long long freq, int bw, RGBA4f color, long long center_freq, long long srate, bool stack, bool centerline) {
if (!srate) {
srate = wxGetApp().getSampleRate();
}
@@ -231,6 +238,14 @@ void PrimaryGLContext::DrawFreqBwInfo(long long freq, int bw, RGBA4f color, long
glVertex3f(uxPos + ofsRight, hPos + labelHeight, 0.0);
glEnd();
}
if (centerline) {
glColor4f(color.r, color.g, color.b, 0.5);
glBegin(GL_LINES);
glVertex3f(uxPos, 1.0, 0.0);
glVertex3f(uxPos, -1.0, 0.0);
glEnd();
}
glColor4f(1.0, 1.0, 1.0, 0.8);