Make color of timing markers themable

This commit is contained in:
Martchus 2023-07-03 23:04:43 +02:00
parent 4af7d8b55e
commit 2ed72c1439
3 changed files with 3 additions and 1 deletions

View File

@ -71,6 +71,7 @@ void ColorTheme::load(BuiltInColorTheme builtInColorTheme)
playingZoneMiddle = CColor(0.0f, 0.0f, 0.4f);
playingZoneBorder = CColor(0.0f, 0.0f, 0.8f);
textColor = CColor(0.0, 0.0, 0.0); // black
timingMarkerColor = textColor;
break;
default:
*this = ColorTheme();

View File

@ -105,6 +105,7 @@ struct ColorTheme
CColor playingZoneMiddle = CColor(0.0f, 0.0f, 0.8f);
CColor playingZoneBorder = CColor(0.0f, 0.0f, 0.6f);
CColor textColor = CColor(1.0f, 1.0f, 1.0f);
CColor timingMarkerColor = CColor(1.0f, 1.0f, 1.0f);
};
/*!

View File

@ -788,7 +788,7 @@ void CDraw::drawSymbol(CSymbol symbol, float x, float y, CSlot* slot)
{
auto pianistX = static_cast<float>(symbol.getPianistTiming());
pianistX = x + pianistX * HORIZONTAL_SPACING_FACTOR;
drColor(CColor(1.0, 1.0, 1.0));
drColor(colorTheme.timingMarkerColor);
glLineWidth (2.0f);
glBegin(GL_LINES);
glVertex2f( 4.0f + pianistX, 4.0f + y);