the shortcut

This commit is contained in:
MihailRis
2024-04-21 17:12:06 +03:00
parent 635e512142
commit 30a38035e2
35 changed files with 90 additions and 84 deletions
+40
View File
@@ -0,0 +1,40 @@
#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_