mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
40 lines
1 KiB
C++
40 lines
1 KiB
C++
#ifndef GRAPHICS_UI_ELEMENTS_PANEL_HPP_
|
|
#define GRAPHICS_UI_ELEMENTS_PANEL_HPP_
|
|
|
|
#include "commons.hpp"
|
|
#include "Container.hpp"
|
|
|
|
namespace gui {
|
|
class Panel : public Container {
|
|
protected:
|
|
Orientation orientation = Orientation::vertical;
|
|
glm::vec4 padding {2.0f};
|
|
float interval = 2.0f;
|
|
int maxLength = 0;
|
|
public:
|
|
Panel(
|
|
glm::vec2 size,
|
|
glm::vec4 padding=glm::vec4(2.0f),
|
|
float interval=2.0f
|
|
);
|
|
virtual ~Panel();
|
|
|
|
virtual void cropToContent();
|
|
|
|
virtual void setOrientation(Orientation orientation);
|
|
Orientation getOrientation() const;
|
|
|
|
virtual void add(std::shared_ptr<UINode> node) override;
|
|
|
|
virtual void refresh() override;
|
|
virtual void fullRefresh() override;
|
|
|
|
virtual void setMaxLength(int value);
|
|
int getMaxLength() const;
|
|
|
|
virtual void setPadding(glm::vec4 padding);
|
|
glm::vec4 getPadding() const;
|
|
};
|
|
}
|
|
|
|
#endif // GRAPHICS_UI_ELEMENTS_PANEL_HPP_
|