add window isMinimized

This commit is contained in:
Sri Sham Haran 2022-10-01 23:56:45 +08:00
parent 1a14e5241b
commit 77653ebde5
2 changed files with 13 additions and 4 deletions

View File

@ -378,6 +378,12 @@ namespace SHADE
{
wndData.width = static_cast<unsigned>(size.cx);
wndData.height = static_cast<unsigned>(size.cy);
if (type == SIZE_MINIMIZED)
{
wndData.isMinimised = true;
}
for (auto const& entry : windowResizeCallbacks)
{
entry.second(static_cast<uint32_t>(wndData.width), static_cast<uint32_t>(wndData.height));

View File

@ -61,6 +61,8 @@ namespace SHADE
bool modal = false;
bool isMinimised = false;
std::wstring title = L"SHADE ENGINE";
std::wstring name = L"SHADEEngineApp";
@ -163,6 +165,7 @@ namespace SHADE
void OnSize(UINT msg, UINT type, SIZE size);
void OnPosChange(LPWINDOWPOS pos);
void OnPaint(HDC hdc, LPPAINTSTRUCT paint);
bool IsMinimized() const { return wndData.isMinimised; }
};
static SHWindowMap windowMap;
static SHWindow* windowBeingCreated = nullptr;