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
+1 -20
View File
@@ -5,9 +5,7 @@
using namespace gui;
Panel::Panel(glm::vec2 size, glm::vec4 padding, float interval)
: Container(size),
padding(padding),
interval(interval)
: BasePanel(size, padding, interval, Orientation::vertical)
{
setColor(glm::vec4(0.0f, 0.0f, 0.0f, 0.75f));
}
@@ -31,15 +29,6 @@ int Panel::getMinLength() const {
return minLength;
}
void Panel::setPadding(glm::vec4 padding) {
this->padding = padding;
refresh();
}
glm::vec4 Panel::getPadding() const {
return padding;
}
void Panel::cropToContent() {
if (maxLength > 0.0f) {
setSize(glm::vec2(
@@ -109,11 +98,3 @@ void Panel::refresh() {
actualLength = size.y;
}
}
void Panel::setOrientation(Orientation orientation) {
this->orientation = orientation;
}
Orientation Panel::getOrientation() const {
return orientation;
}