mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 15:30:35 +00:00
5f9dfeea86
Previously, we would activate the debugger (if enabled), and then reactivate the main window. This meant if you switched to something, PPSSPP would demand focus once the game loaded.
45 lines
882 B
C++
45 lines
882 B
C++
#pragma once
|
|
|
|
#include "Common/CommonWindows.h"
|
|
|
|
class Dialog
|
|
{
|
|
public:
|
|
Dialog(LPCSTR res, HINSTANCE _hInstance, HWND _hParent);
|
|
virtual ~Dialog();
|
|
|
|
virtual void Show(bool _bShow, bool includeToTop = true);
|
|
virtual void Update() {}
|
|
|
|
HWND GetDlgHandle() {
|
|
return m_hDlg;
|
|
}
|
|
protected:
|
|
virtual void Create();
|
|
void Destroy();
|
|
|
|
HWND m_hParent;
|
|
HWND m_hDlg;
|
|
LPCSTR m_hResource;
|
|
bool m_bValid;
|
|
UINT m_bShowState = SW_HIDE;
|
|
|
|
virtual BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam) = 0;
|
|
static INT_PTR CALLBACK DlgProcStatic(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
|
|
|
private:
|
|
HINSTANCE m_hInstance;
|
|
};
|
|
|
|
|
|
class DialogManager
|
|
{
|
|
public:
|
|
static void AddDlg(Dialog *dialog);
|
|
static void RemoveDlg(Dialog *dialog);
|
|
static bool IsDialogMessage(LPMSG message);
|
|
static void EnableAll(BOOL enable);
|
|
static void DestroyAll();
|
|
static void UpdateAll();
|
|
};
|