24 int envCount = 0, warnCount = 0, cautionCount = 0, advisoryCount = 0, statusCount = 0;
25 bool messageFlashState = fmodf(static_cast<float>(
bus->
ProgramTime), 2.0f) > 1.0f;
33 if (!
bus->
messages.at(i).acknowledged && messageFlashState)
35 m_clr = D3DXCOLOR(1.0f, 1.0f, 1.0f, 1.0f);
44 m_clr = D3DXCOLOR(1.0f, 0.0f, 1.0f, 1.0f);
46 DrawText(
bus->
messages.at(i).text.c_str(), xx, yy, DT_NOCLIP, m_clr, 0,
"EnvironmentalAlertMessageStack");
57 if (!
bus->
messages.at(i).acknowledged && messageFlashState)
59 m_clr = D3DXCOLOR(1.0f, 1.0f, 1.0f, 1.0f);
68 m_clr = D3DXCOLOR(1.0f, 0.0f, 0.0f, 1.0f);
70 DrawText(
bus->
messages.at(i).text.c_str(), xx, yy, DT_NOCLIP, m_clr, 0,
"WarningAlertMessageStack");
81 if (!
bus->
messages.at(i).acknowledged && messageFlashState)
83 m_clr = D3DXCOLOR(0.0f, 0.0f, 0.0f, 1.0f);
92 m_clr = D3DXCOLOR(1.0f, 1.0f, 0.0f, 1.0f);
94 DrawText(
bus->
messages.at(i).text.c_str(), xx, yy, DT_NOCLIP, m_clr, 0,
"CautionAlertMessageStack");
105 if (!
bus->
messages.at(i).acknowledged && messageFlashState)
107 m_clr = D3DXCOLOR(1.0f, 1.0f, 1.0f, 1.0f);
116 m_clr = D3DXCOLOR(0.0f, 1.0f, 1.0f, 1.0f);
118 DrawText(
bus->
messages.at(i).text.c_str(), xx, yy, DT_NOCLIP, m_clr, 0,
"AdvisoryAlertMessageStack");
128 D3DXCOLOR m_clr = D3DXCOLOR(1.0f, 1.0f, 1.0f, 1.0f);
129 DrawText(
bus->
messages.at(i).text.c_str(), xx, yy, DT_NOCLIP, m_clr, 0,
"StatusAlertMessageStack");
135 D3DXCOLOR m_clr = D3DXCOLOR(1.0f, 1.0f, 1.0f, 1.0f);
136 DrawTextW(L
" END", xx, yy, DT_NOCLIP, m_clr, 0,
"AlertMessageStack");
std::vector< Message > messages
virtual void Initialize(Bus *prmBus, Logger *prmLogger, DEVICE_OBJECT *prmDevice, int prmScreenWidth, int prmScreenHeight, std::vector< Font > *prmFonts, bool prmFlip)
void Initialize(Bus *prmBus, Logger *prmLogger, DEVICE_OBJECT *prmDevice, int prmScreenWidth, int prmScreenHeight, std::vector< Font > *prmFonts, bool prmFlip) override
double ProgramTime
Identified a need for these in modules.
void DrawText(const WCHAR *str, int x, int y, int flags, D3DXCOLOR color, int font, std::string elementName)
Abstract base class for instrumentation By definition, instruments don't do any of the work (they don...
AlertMessageStack(int prmX, int prmY, float prmXScale, float prmYScale)
void Render(float fElapsed) override
std::string pathAndFilename
void Initialize(Logger *prmLogger, Bus *prmBus, DEVICE_OBJECT *prmpDevice, int prmScreenHeight, int prmElementX, int prmElementY, bool prmFlip)