merged GUI elements into vb01

This commit is contained in:
devZoGok
2023-08-13 12:12:25 +03:00
parent 217fc53edd
commit a2472c8929
11 changed files with 929 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
#ifndef CHECKBOX_H
#define CHECKBOX_H
#include "button.h"
namespace vb01{
class Quad;
class Node;
class Text;
}
namespace vb01Gui{
class Checkbox {
public:
Checkbox(vb01::Vector2, std::string);
~Checkbox();
void update(){}
virtual void check();
virtual bool isChecked(){return checked;}
private:
class CheckboxButton : public Button {
public:
CheckboxButton(Checkbox*, vb01::Vector2, vb01::Vector2, std::string, bool);
void onClick();
private:
Checkbox *checkbox = nullptr;
};
const int length = 15;
bool checked = false;
vb01::Vector2 pos;
CheckboxButton *checkboxButton;
vb01::Node *checkNode = nullptr;
public:
inline CheckboxButton* getCheckboxButton(){return checkboxButton;}
};
}
#endif