mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 12:31:51 +00:00
refactor: add GUI instance reference to UI nodes
This commit is contained in:
parent
74a94f869c
commit
4c48afbb90
70 changed files with 1133 additions and 832 deletions
|
|
@ -7,7 +7,7 @@
|
|||
#include <vector>
|
||||
|
||||
namespace gui {
|
||||
class Container : public UINode, public util::ObjectsKeeper {
|
||||
class Container : public UINode, public ::util::ObjectsKeeper {
|
||||
int prevScrollY = -1;
|
||||
protected:
|
||||
std::vector<std::shared_ptr<UINode>> nodes;
|
||||
|
|
@ -22,7 +22,7 @@ namespace gui {
|
|||
return prevScrollY != -1;
|
||||
}
|
||||
public:
|
||||
Container(glm::vec2 size);
|
||||
Container(GUI& gui, glm::vec2 size);
|
||||
virtual ~Container();
|
||||
|
||||
virtual void act(float delta) override;
|
||||
|
|
@ -44,8 +44,8 @@ namespace gui {
|
|||
virtual void refresh() override;
|
||||
void setScroll(int scroll);
|
||||
|
||||
virtual void mouseMove(GUI*, int x, int y) override;
|
||||
virtual void mouseRelease(GUI*, int x, int y) override;
|
||||
virtual void mouseMove(int x, int y) override;
|
||||
virtual void mouseRelease(int x, int y) override;
|
||||
|
||||
const std::vector<std::shared_ptr<UINode>>& getNodes() const;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue