Add flashing effect to "STOP"

This commit is contained in:
grayson committed 2026-06-12 21:57:48 -05:00
1 parent 8882894f09
commit bb1d71b49a
2 files changed
+8

No files matched your search

+5
View File
@@ -31,6 +31,7 @@ namespace watchfuleye {
, m_overTime(false)
, m_maxMinutes(maximumMinutes)
, m_drive(driveToDetect)
, m_paintCounter(0)
, m_startTime()
, m_taskbarCreatedMessage(-1)
, m_region(nullptr)
@@ -276,9 +277,12 @@ namespace watchfuleye {
else { // Over time (red)
SelectObject(app->m_offscreenDC, app->m_lowerFont);
DrawText(app->m_offscreenDC, "Please Eject Your USB", -1, &lowerRect, DT_SINGLELINE | DT_NOCLIP | DT_CENTER | DT_VCENTER);
if (app->m_paintCounter % 5 > 1) {
SelectObject(app->m_offscreenDC, app->m_timeFont);
DrawText(app->m_offscreenDC, "STOP", -1, &timeRect, DT_SINGLELINE | DT_NOCLIP | DT_CENTER | DT_VCENTER);
}
}
if (remaining <= 0)
app->m_overTime = true;
@@ -288,6 +292,7 @@ namespace watchfuleye {
SelectObject(app->m_offscreenDC, prevBitmap);
EndPaint(hWnd, &ps);
app->m_paintCounter++;
return 0;
}
+3
View File
@@ -23,6 +23,7 @@ namespace watchfuleye {
void queryThreadFunction();
std::string m_appName, m_appVersion;
HWND m_window;
bool m_running; // Is the application running?
@@ -32,6 +33,8 @@ namespace watchfuleye {
unsigned int m_maxMinutes;
const char* m_drive;
uint8_t m_paintCounter;
TimePoint m_startTime;
UINT m_taskbarCreatedMessage;