Adding new gui to Sketch3d
This commit is contained in:
parent
ccdc8efd99
commit
87d8ce84dc
6 changed files with 134 additions and 10 deletions
|
|
@ -8,6 +8,18 @@ namespace tp {
|
|||
class ButtonWidget : public Widget<Events, Canvas> {
|
||||
public:
|
||||
ButtonWidget() {
|
||||
this->mArea = { 0, 0, 100, 100 };
|
||||
this->createConfig("Button");
|
||||
this->addColor("Pressed", "Action");
|
||||
this->addColor("Hovered", "Interaction");
|
||||
this->addColor("Default", "Accent");
|
||||
this->addValue("Rounding", "Rounding");
|
||||
}
|
||||
|
||||
ButtonWidget(const String& label, const tp::RectF& aArea) {
|
||||
this->mArea = aArea;
|
||||
this->mLabel.mLabel = label;
|
||||
|
||||
this->createConfig("Button");
|
||||
this->addColor("Pressed", "Action");
|
||||
this->addColor("Hovered", "Interaction");
|
||||
|
|
|
|||
|
|
@ -132,6 +132,12 @@ namespace tp {
|
|||
this->addValue("Padding", "Padding");
|
||||
}
|
||||
|
||||
~ScrollableWindow() {
|
||||
for (auto content : mContents) {
|
||||
delete content.data();
|
||||
}
|
||||
}
|
||||
|
||||
// takes whole area
|
||||
void proc(const Events& events, const tp::RectF& areaParent, const tp::RectF& aArea) override {
|
||||
this->mArea = aArea;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue