This commit is contained in:
Jonathan Trottier 2023-10-02 15:58:08 -04:00
parent 90fdc8ed1b
commit 54e2f32aba

View File

@ -201,65 +201,6 @@ void Engine::ProcessNotificationQueue() {
}
//void Engine::ProcessNotificationQueue() {
// // Process the notification queue
// float yOffset = 0.0f; // Offset to stack notifications vertically
// while (!notificationQueue.empty()) {
// Notification currentNotification = notificationQueue.front();
//
// // Calculate the time since the notification was displayed
// float timeSinceDisplay = m_time - currentNotification.displayStartTime;
//
// // Check if it's time to remove the notification (display for 2 seconds)
// if (timeSinceDisplay < 5.0f) {
// glDisable(GL_STENCIL_TEST);
// glDisable(GL_DEPTH_TEST);
//
// glBlendFunc(GL_SRC_ALPHA, GL_ONE);
// glBlendEquation(GL_FUNC_ADD);
//
// glMatrixMode(GL_PROJECTION);
// glPushMatrix();
//
// glLoadIdentity();
// glOrtho(0, Width(), 0, Height(), -1, 1);
//
// glMatrixMode(GL_MODELVIEW);
// glPushMatrix();
// // Display the notification message with vertical offset
// m_textureFont.Bind();
// std::ostringstream ss;
// float scale = GetScale();
// unsigned int x = Width() / 25;
// unsigned int y = Height() - (Height() / 2.2) - yOffset;
//
// ss << currentNotification.message;
// PrintText(x, y, scale, ss.str());
//
// // Increase the vertical offset for the next notification
// yOffset += 20.0f; // Adjust as needed for spacing
// glBlendFunc(GL_CONSTANT_COLOR, GL_ONE_MINUS_CONSTANT_COLOR);
// glBlendEquation(GL_FUNC_SUBTRACT);
//
// glEnable(GL_STENCIL_TEST);
// glEnable(GL_DEPTH_TEST);
//
// glMatrixMode(GL_PROJECTION);
// glPopMatrix();
//
// glMatrixMode(GL_MODELVIEW);
// glPopMatrix();
// // Remove the top notification from the queue
// //notificationQueue.pop();
// break;
// }
// else {
// // No need to remove the notification; it has already expired
// notificationQueue.pop();
// }
// }
//}
void Engine::DisplayCrosshair() {