add BasePanel & add padding property to SplitBox

This commit is contained in:
MihailRis
2025-03-11 00:39:59 +03:00
parent c86bad8def
commit 37c7ffa7b0
6 changed files with 90 additions and 56 deletions
+43
View File
@@ -0,0 +1,43 @@
#pragma once
#include "Container.hpp"
namespace gui {
class BasePanel : public Container {
public:
virtual ~BasePanel() = default;
virtual void setOrientation(Orientation orientation) {
this->orientation = orientation;
refresh();
}
Orientation getOrientation() const {
return orientation;
}
virtual void setPadding(glm::vec4 padding) {
this->padding = padding;
refresh();
}
glm::vec4 getPadding() const {
return padding;
}
protected:
BasePanel(
glm::vec2 size,
glm::vec4 padding = glm::vec4(0.0f),
float interval = 2.0f,
Orientation orientation = Orientation::vertical
)
: Container(std::move(size)),
padding(std::move(padding)),
interval(interval) {
}
Orientation orientation = Orientation::vertical;
glm::vec4 padding;
float interval = 2.0f;
};
}