Renderer: Replaced RenderTarget::Get[Height|Width] by RenderTarget::GetSize

Utility: Removed Window::Get[Height|Width] methods
This commit is contained in:
Lynix
2017-10-28 23:26:22 +02:00
parent bf8ebbd046
commit d688cecbde
20 changed files with 44 additions and 102 deletions

View File

@@ -148,7 +148,10 @@ namespace Ndk
Nz::Vector2ui windowDimensions;
if (info.window->IsValid())
windowDimensions.Set(info.window->GetWidth(), info.window->GetHeight() / 4);
{
windowDimensions = info.window->GetSize();
windowDimensions.y /= 4;
}
else
windowDimensions.MakeZero();
@@ -212,7 +215,8 @@ namespace Ndk
overlay->resizedSlot.Connect(info.renderTarget->OnRenderTargetSizeChange, [&consoleRef] (const Nz::RenderTarget* renderTarget)
{
consoleRef.SetSize({float(renderTarget->GetWidth()), renderTarget->GetHeight() / 4.f});
Nz::Vector2ui size = renderTarget->GetSize();
consoleRef.SetSize({float(size.x), size.y / 4.f});
});
info.console = std::move(overlay);