add BasePanel & add padding property to SplitBox
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user