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