From 5f76e72748f082a0593860155de19c7d70953b41 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Fri, 14 Nov 2025 20:56:11 +0300 Subject: [PATCH] cleanup --- src/graphics/ui/elements/BasePanel.hpp | 4 ++-- src/graphics/ui/elements/Canvas.cpp | 2 +- src/graphics/ui/elements/Canvas.hpp | 2 +- src/graphics/ui/elements/CheckBox.cpp | 2 +- src/graphics/ui/elements/CheckBox.hpp | 2 +- src/graphics/ui/elements/Container.cpp | 4 ++-- src/graphics/ui/elements/Container.hpp | 4 ++-- src/graphics/ui/elements/InlineFrame.cpp | 2 +- src/graphics/ui/elements/InlineFrame.hpp | 4 ++-- src/graphics/ui/elements/InputBindBox.hpp | 10 +++++----- src/graphics/ui/elements/InventoryView.cpp | 6 +++--- src/graphics/ui/elements/InventoryView.hpp | 8 ++++---- src/graphics/ui/elements/Panel.cpp | 2 +- src/graphics/ui/elements/SplitBox.cpp | 6 +++--- src/graphics/ui/elements/UINode.cpp | 8 ++++---- src/graphics/ui/elements/UINode.hpp | 8 ++++---- src/graphics/ui/elements/commons.hpp | 6 +++--- src/graphics/ui/gui_xml.cpp | 8 ++++---- 18 files changed, 44 insertions(+), 44 deletions(-) diff --git a/src/graphics/ui/elements/BasePanel.hpp b/src/graphics/ui/elements/BasePanel.hpp index 08761050..168776a9 100644 --- a/src/graphics/ui/elements/BasePanel.hpp +++ b/src/graphics/ui/elements/BasePanel.hpp @@ -30,14 +30,14 @@ namespace gui { glm::vec2 size, glm::vec4 padding = glm::vec4(0.0f), float interval = 2.0f, - Orientation orientation = Orientation::vertical + Orientation orientation = Orientation::VERTICAL ) : Container(gui, std::move(size)), padding(std::move(padding)), interval(interval) { } - Orientation orientation = Orientation::vertical; + Orientation orientation = Orientation::VERTICAL; glm::vec4 padding; float interval = 2.0f; }; diff --git a/src/graphics/ui/elements/Canvas.cpp b/src/graphics/ui/elements/Canvas.cpp index 6f43f944..b24066ed 100644 --- a/src/graphics/ui/elements/Canvas.cpp +++ b/src/graphics/ui/elements/Canvas.cpp @@ -20,7 +20,7 @@ void gui::Canvas::draw(const DrawContext& pctx, const Assets& assets) { batch->rect(pos.x, pos.y, size.x, size.y, 0, 0, 0, {}, false, false, col); } -void gui::Canvas::setSize(glm::vec2 size) { +void gui::Canvas::setSize(const glm::vec2& size) { UINode::setSize(size); data->extend(size.x, size.y); texture->reload(*data); diff --git a/src/graphics/ui/elements/Canvas.hpp b/src/graphics/ui/elements/Canvas.hpp index 63430b8f..7dcb4e2d 100644 --- a/src/graphics/ui/elements/Canvas.hpp +++ b/src/graphics/ui/elements/Canvas.hpp @@ -15,7 +15,7 @@ namespace gui { void draw(const DrawContext& pctx, const Assets& assets) override; - void setSize(glm::vec2 size) override; + void setSize(const glm::vec2& size) override; [[nodiscard]] auto getTexture() const { return texture; diff --git a/src/graphics/ui/elements/CheckBox.cpp b/src/graphics/ui/elements/CheckBox.cpp index 0af08e95..22741e45 100644 --- a/src/graphics/ui/elements/CheckBox.cpp +++ b/src/graphics/ui/elements/CheckBox.cpp @@ -52,7 +52,7 @@ FullCheckBox::FullCheckBox( checkbox(std::make_shared(gui, checked)), label(std::make_shared