mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-25 04:45:00 +00:00
Message Dialog library (#767)
* system/MsgDialog: types & basic text display * system/MsgDialog: User message dialog * system/MsgDialog: RAII for MsgDialog ui * system/MsgDialog: Progress bar dialog * system/MsgDialog: System message texts * system/MsgDialog: copy all ui state to local memory handles when game release memory before close extracted all UI code to it's own file use single window instead of creating new one every single dialogOpen * system/MsgDialog: debug logging
This commit is contained in:
parent
035cb3eeaa
commit
446d8c4ff1
9 changed files with 716 additions and 153 deletions
27
src/imgui/imgui_std.h
Normal file
27
src/imgui/imgui_std.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <imgui.h>
|
||||
|
||||
#include "imgui_internal.h"
|
||||
|
||||
namespace ImGui {
|
||||
|
||||
inline void CentralizeWindow() {
|
||||
const auto display_size = GetIO().DisplaySize;
|
||||
SetNextWindowPos(display_size / 2.0f, ImGuiCond_Always, {0.5f});
|
||||
}
|
||||
|
||||
inline void KeepNavHighlight() {
|
||||
GetCurrentContext()->NavDisableHighlight = false;
|
||||
}
|
||||
|
||||
inline void SetItemCurrentNavFocus() {
|
||||
const auto ctx = GetCurrentContext();
|
||||
SetFocusID(ctx->LastItemData.ID, ctx->CurrentWindow);
|
||||
ctx->NavInitResult.Clear();
|
||||
}
|
||||
|
||||
} // namespace ImGui
|
Loading…
Add table
Add a link
Reference in a new issue