From 82f8bdb081b070f54c7d2f9a7a185da8c51c947b Mon Sep 17 00:00:00 2001 From: Brett Date: Mon, 15 Apr 2024 00:31:27 -0400 Subject: [PATCH] setters --- CMakeLists.txt | 2 +- include/blt/gfx/window.h | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1148f95..72f31bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.25) -set(BLT_GRAPHICS_VERSION 0.9.9) +set(BLT_GRAPHICS_VERSION 0.9.10) set(BLT_GRAPHICS_TEST_VERSION 0.0.1) project(BLT_WITH_GRAPHICS VERSION ${BLT_GRAPHICS_VERSION}) diff --git a/include/blt/gfx/window.h b/include/blt/gfx/window.h index f56efac..e1ac30f 100644 --- a/include/blt/gfx/window.h +++ b/include/blt/gfx/window.h @@ -41,6 +41,24 @@ namespace blt::gfx title(std::move(title)), width(width), height(height), init(std::move(init)), update(std::move(update)) {} + window_data& setHeight(int32_t new_height) + { + window_data::height = new_height; + return *this; + } + + window_data& setWidth(int32_t new_width) + { + window_data::width = new_width; + return *this; + } + + window_data& setTitle(const std::string& title_str) + { + window_data::title = title_str; + return *this; + } + window_data& setContext(const window_context& ctx) { context = ctx;