[UI] Implemented Host Notifications

Splitted clases into:
 - ImGuiNotification
 - ImGuiHostNotification
 - ImGuiGuestNotification

To differentiate between Xenia toast notifications and notifications from titles itself

Adhoc:
Changed Screenshot into toast notification and switched from being binded to F10 to F12
This commit is contained in:
Gliniak
2024-08-25 14:00:34 +02:00
parent 4abbfa0b04
commit d6f0ab6a7e
9 changed files with 470 additions and 218 deletions

View File

@@ -467,8 +467,22 @@ void ImGuiDrawer::Draw(UIDrawContext& ui_draw_context) {
dialog_loop_next_index_ = SIZE_MAX;
if (!notifications_.empty()) {
// We only care about drawing next notification.
notifications_.at(0)->Draw();
bool was_guest_notification_drawn = false;
bool was_host_notification_drawn = false;
for (const auto& notification : notifications_) {
if (notification->GetNotificationType() == NotificationType::Guest &&
!was_guest_notification_drawn) {
was_guest_notification_drawn = true;
notification->Draw();
}
if (notification->GetNotificationType() == NotificationType::Host &&
!was_host_notification_drawn) {
was_host_notification_drawn = true;
notification->Draw();
}
}
}
ImGui::Render();