mirror of
https://github.com/xemu-project/xemu.git
synced 2024-06-02 20:18:25 -04:00
ui: Add toggle to hide notifications
This commit is contained in:
parent
15bf68594f
commit
5055cc6401
|
@ -133,6 +133,9 @@ display:
|
||||||
show_menubar:
|
show_menubar:
|
||||||
type: bool
|
type: bool
|
||||||
default: true
|
default: true
|
||||||
|
show_notifications:
|
||||||
|
type: bool
|
||||||
|
default: true
|
||||||
use_animations:
|
use_animations:
|
||||||
type: bool
|
type: bool
|
||||||
default: true
|
default: true
|
||||||
|
|
|
@ -314,6 +314,8 @@ void MainMenuDisplayView::Draw()
|
||||||
SectionTitle("Interface");
|
SectionTitle("Interface");
|
||||||
Toggle("Show main menu bar", &g_config.display.ui.show_menubar,
|
Toggle("Show main menu bar", &g_config.display.ui.show_menubar,
|
||||||
"Show main menu bar when mouse is activated");
|
"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;
|
int ui_scale_idx;
|
||||||
if (g_config.display.ui.auto_scale) {
|
if (g_config.display.ui.auto_scale) {
|
||||||
|
|
|
@ -89,6 +89,10 @@ void NotificationManager::Draw()
|
||||||
|
|
||||||
void NotificationManager::DrawNotification(float t, const char *msg)
|
void NotificationManager::DrawNotification(float t, const char *msg)
|
||||||
{
|
{
|
||||||
|
if (!g_config.display.ui.show_notifications) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const float DISTANCE = 10.0f;
|
const float DISTANCE = 10.0f;
|
||||||
static int corner = 1;
|
static int corner = 1;
|
||||||
ImGuiIO& io = ImGui::GetIO();
|
ImGuiIO& io = ImGui::GetIO();
|
||||||
|
|
Loading…
Reference in a new issue