mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
ui: Add toggle to hide notifications
This commit is contained in:
committed by
mborgerson
parent
15bf68594f
commit
5055cc6401
@@ -133,6 +133,9 @@ display:
|
||||
show_menubar:
|
||||
type: bool
|
||||
default: true
|
||||
show_notifications:
|
||||
type: bool
|
||||
default: true
|
||||
use_animations:
|
||||
type: bool
|
||||
default: true
|
||||
|
||||
@@ -314,6 +314,8 @@ void MainMenuDisplayView::Draw()
|
||||
SectionTitle("Interface");
|
||||
Toggle("Show main menu bar", &g_config.display.ui.show_menubar,
|
||||
"Show main menu bar when mouse is activated");
|
||||
Toggle("Show notifications", &g_config.display.ui.show_notifications,
|
||||
"Display notifications in upper-right corner");
|
||||
|
||||
int ui_scale_idx;
|
||||
if (g_config.display.ui.auto_scale) {
|
||||
|
||||
@@ -89,6 +89,10 @@ void NotificationManager::Draw()
|
||||
|
||||
void NotificationManager::DrawNotification(float t, const char *msg)
|
||||
{
|
||||
if (!g_config.display.ui.show_notifications) {
|
||||
return;
|
||||
}
|
||||
|
||||
const float DISTANCE = 10.0f;
|
||||
static int corner = 1;
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
|
||||
Reference in New Issue
Block a user