Fixed window for Windows.
This commit is contained in:
@@ -437,7 +437,7 @@ namespace ehs
|
||||
EHS_LOG_INT("Error", 0, "Failed to set window title with error #" + Str_8::FromNum(GetLastError()) + ".");
|
||||
}
|
||||
|
||||
Str_32 Window::GetTitle_32()
|
||||
Str_32 Window::GetTitle_32() const
|
||||
{
|
||||
int size = GetWindowTextLengthW(hdl);
|
||||
if (!size)
|
||||
@@ -474,7 +474,7 @@ namespace ehs
|
||||
EHS_LOG_INT("Error", 0, "Failed to set window title with error #" + Str_8::FromNum(GetLastError()) + ".");
|
||||
}
|
||||
|
||||
Str_16 Window::GetTitle_16()
|
||||
Str_16 Window::GetTitle_16() const
|
||||
{
|
||||
int size = GetWindowTextLengthW(hdl);
|
||||
if (!size)
|
||||
@@ -511,7 +511,7 @@ namespace ehs
|
||||
EHS_LOG_INT("Error", 0, "Failed to set window title with error #" + Str_8::FromNum(GetLastError()) + ".");
|
||||
}
|
||||
|
||||
Str_8 Window::GetTitle_8()
|
||||
Str_8 Window::GetTitle_8() const
|
||||
{
|
||||
int size = GetWindowTextLengthW(hdl);
|
||||
if (!size)
|
||||
@@ -590,15 +590,15 @@ namespace ehs
|
||||
return IsWindowEnabled(hdl);
|
||||
}
|
||||
|
||||
void Window::SetPos(int x, int y)
|
||||
void Window::SetPos(const Vec2_s32& newPos)
|
||||
{
|
||||
if (!created)
|
||||
return;
|
||||
|
||||
SetWindowPos(hdl, nullptr, x, y, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
|
||||
SetWindowPos(hdl, nullptr, newPos.x, newPos.y, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
|
||||
}
|
||||
|
||||
Vec2<Int_32> Window::GetPos()
|
||||
Vec2_s32 Window::GetPos() const
|
||||
{
|
||||
if (!created)
|
||||
return {};
|
||||
@@ -643,15 +643,15 @@ namespace ehs
|
||||
{
|
||||
}
|
||||
|
||||
void Window::SetSize(int w, int h)
|
||||
void Window::SetScale(const Vec2_u32& newScale)
|
||||
{
|
||||
if (!created)
|
||||
return;
|
||||
|
||||
SetWindowPos(hdl, nullptr, 0, 0, w, h, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
|
||||
SetWindowPos(hdl, nullptr, 0, 0, (int)newScale.x, (int)newScale.y, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
|
||||
}
|
||||
|
||||
Vec2<Int_32> Window::GetSize()
|
||||
Vec2_u32 Window::GetScale() const
|
||||
{
|
||||
if (!created)
|
||||
return {};
|
||||
@@ -659,7 +659,7 @@ namespace ehs
|
||||
RECT tmp = {};
|
||||
GetWindowRect(hdl, &tmp);
|
||||
|
||||
return {(Int_32)(tmp.right - tmp.left), (Int_32)(tmp.bottom - tmp.top)};
|
||||
return {(UInt_32)(tmp.right - tmp.left), (UInt_32)(tmp.bottom - tmp.top)};
|
||||
}
|
||||
|
||||
void Window::ShowCursor(bool toggle)
|
||||
@@ -717,6 +717,19 @@ namespace ehs
|
||||
cursorConstrained = toggle;
|
||||
}
|
||||
|
||||
Serializer<UInt_64> Window::GetClipboard()
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
void Window::SetClipboard(Serializer<UInt_64> data)
|
||||
{
|
||||
}
|
||||
|
||||
void Window::SetCursorImg(CursorImg img)
|
||||
{
|
||||
}
|
||||
|
||||
void Window::SendMsg(const UINT msg, const WPARAM wParam, const LPARAM lParam)
|
||||
{
|
||||
if (!hdl)
|
||||
|
Reference in New Issue
Block a user