Merge remote-tracking branch 'origin/SP3-1-Rendering' into SP3-1-Rendering

This commit is contained in:
Brandon Mak 2022-10-02 00:00:07 +08:00
commit 32a3cc0674
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

@ -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;