From 75727ca792d28b1a0b6c9f50632da1a51564343c Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 18 May 2014 03:27:28 +0100 Subject: [PATCH] Add templated function --- dgl/Window.hpp | 1 + dgl/src/Window.cpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/dgl/Window.hpp b/dgl/Window.hpp index 9fead930..f23482a4 100644 --- a/dgl/Window.hpp +++ b/dgl/Window.hpp @@ -52,6 +52,7 @@ public: int getHeight() const noexcept; Size getSize() const noexcept; void setSize(uint width, uint height); + void setSize(Size size); void setTitle(const char* title); diff --git a/dgl/src/Window.cpp b/dgl/src/Window.cpp index 6d32d5f0..2ba6d0e6 100644 --- a/dgl/src/Window.cpp +++ b/dgl/src/Window.cpp @@ -876,6 +876,11 @@ void Window::setSize(uint width, uint height) pData->setSize(width, height); } +void Window::setSize(Size size) +{ + pData->setSize(size.getWidth(), size.getHeight()); +} + void Window::setTitle(const char* title) { pData->setTitle(title);