Make GLFont its own pixHeight, so don't provide it in drawString() anymore

This commit is contained in:
vsonnier
2016-06-21 19:13:48 +02:00
parent 26bf1d9927
commit f52bad6196
8 changed files with 53 additions and 73 deletions
+4 -4
View File
@@ -35,9 +35,9 @@ void ScopeContext::DrawTunerTitles(bool ppmMode) {
glColor3f(0.65f, 0.65f, 0.65f);
GLFont::getFont(GLFont::GLFONT_SIZE12).drawString(ppmMode?"Device PPM":"Frequency", -0.66f, -1.0+hPos, 12, GLFont::GLFONT_ALIGN_CENTER, GLFont::GLFONT_ALIGN_CENTER, 0, 0, true);
GLFont::getFont(GLFont::GLFONT_SIZE12).drawString("Bandwidth", 0.0, -1.0+hPos, 12, GLFont::GLFONT_ALIGN_CENTER, GLFont::GLFONT_ALIGN_CENTER, 0, 0, true);
GLFont::getFont(GLFont::GLFONT_SIZE12).drawString("Center Frequency", 0.66f, -1.0+hPos, 12, GLFont::GLFONT_ALIGN_CENTER, GLFont::GLFONT_ALIGN_CENTER, 0, 0, true);
GLFont::getFont(GLFont::GLFONT_SIZE12).drawString(ppmMode?"Device PPM":"Frequency", -0.66f, -1.0+hPos, GLFont::GLFONT_ALIGN_CENTER, GLFont::GLFONT_ALIGN_CENTER, 0, 0, true);
GLFont::getFont(GLFont::GLFONT_SIZE12).drawString("Bandwidth", 0.0, -1.0+hPos, GLFont::GLFONT_ALIGN_CENTER, GLFont::GLFONT_ALIGN_CENTER, 0, 0, true);
GLFont::getFont(GLFont::GLFONT_SIZE12).drawString("Center Frequency", 0.66f, -1.0+hPos, GLFont::GLFONT_ALIGN_CENTER, GLFont::GLFONT_ALIGN_CENTER, 0, 0, true);
}
void ScopeContext::DrawDeviceName(std::string deviceName) {
@@ -47,7 +47,7 @@ void ScopeContext::DrawDeviceName(std::string deviceName) {
float hPos = (float) (viewHeight - 20) / viewHeight;
glColor3f(0.65f, 0.65f, 0.65f);
GLFont::getFont(GLFont::GLFONT_SIZE12).drawString(deviceName.c_str(), 1.0, hPos, 12, GLFont::GLFONT_ALIGN_RIGHT, GLFont::GLFONT_ALIGN_CENTER, 0, 0, true);
GLFont::getFont(GLFont::GLFONT_SIZE12).drawString(deviceName.c_str(), 1.0, hPos, GLFont::GLFONT_ALIGN_RIGHT, GLFont::GLFONT_ALIGN_CENTER, 0, 0, true);
}
void ScopeContext::DrawEnd() {