diff --git a/SHADE_Engine/src/Graphics/Windowing/SHWindow.cpp b/SHADE_Engine/src/Graphics/Windowing/SHWindow.cpp index 4d8dae72..a4569c75 100644 --- a/SHADE_Engine/src/Graphics/Windowing/SHWindow.cpp +++ b/SHADE_Engine/src/Graphics/Windowing/SHWindow.cpp @@ -378,6 +378,12 @@ namespace SHADE { wndData.width = static_cast(size.cx); wndData.height = static_cast(size.cy); + + if (type == SIZE_MINIMIZED) + { + wndData.isMinimised = true; + } + for (auto const& entry : windowResizeCallbacks) { entry.second(static_cast(wndData.width), static_cast(wndData.height)); diff --git a/SHADE_Engine/src/Graphics/Windowing/SHWindow.h b/SHADE_Engine/src/Graphics/Windowing/SHWindow.h index 1e08dcb0..8f15bb60 100644 --- a/SHADE_Engine/src/Graphics/Windowing/SHWindow.h +++ b/SHADE_Engine/src/Graphics/Windowing/SHWindow.h @@ -18,7 +18,7 @@ namespace SHADE }; struct WindowData - { + { unsigned x = 0; unsigned y = 0; @@ -42,7 +42,7 @@ namespace SHADE bool closable = true; bool minimizable = true; - + bool maximizable = true; //bool canFullscreen = true; @@ -56,11 +56,13 @@ namespace SHADE bool shadowEnabled = true; bool isVisible = true; - + bool isFullscreen = false; bool modal = false; + bool isMinimised = false; + std::wstring title = L"SHADE ENGINE"; std::wstring name = L"SHADEEngineApp"; @@ -103,7 +105,7 @@ namespace SHADE void SetMousePosition(unsigned x, unsigned y); //unsigned GetBGColor(); - + void SetBGColor(unsigned color); void Minimize(); @@ -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;