From a212f3dd68dfd649502dd5c99fe5d691861e56e0 Mon Sep 17 00:00:00 2001 From: Rob Loach Date: Tue, 20 Aug 2019 00:45:42 -0400 Subject: [PATCH] Add Window functions --- include/raylib/Window.hpp | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/include/raylib/Window.hpp b/include/raylib/Window.hpp index 6515078..7e1a7fa 100644 --- a/include/raylib/Window.hpp +++ b/include/raylib/Window.hpp @@ -7,7 +7,7 @@ namespace raylib { class Window { public: - Window(int width, int height, const std::string& title = "raylib", bool lateInit = false) { + Window(int width = 800, int height = 450, const std::string& title = "raylib", bool lateInit = false) { if (!lateInit) { Init(width, height, title); } @@ -40,6 +40,42 @@ namespace raylib { ::EndDrawing(); } + bool IsMinimized() { + return ::IsWindowMinimized(); + } + bool IsResized() { + return ::IsWindowResized(); + } + bool IsHidden() { + return ::IsWindowHidden(); + } + void ToggleFullscreen() { + return ::ToggleFullscreen(); + } + void Unhide() { + return ::UnhideWindow(); + } + void Hide() { + return ::HideWindow(); + } + void SetIcon(Image image) { + SetWindowIcon(image); + } + void SetTitle(const std::string& title) { + ::SetWindowTitle(title.c_str()); + } + void SetPosition(int x, int y) { + ::SetWindowPosition(x, y); + } + void SetMonitor(int monitor) { + ::SetWindowMonitor(monitor); + } + void SetMinSize(int width, int height) { + ::SetWindowMinSize(width, height); + } + void SetSize(int width, int height) { + ::SetWindowSize(width, height); + } }; }