mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +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
|
|
@ -4,21 +4,25 @@
|
|||
|
||||
namespace gui {
|
||||
class Label;
|
||||
|
||||
|
||||
class InputBindBox : public Panel {
|
||||
protected:
|
||||
Binding& binding;
|
||||
glm::vec4 focusedColor {0.1f, 0.15f, 0.35f, 0.75f};
|
||||
std::shared_ptr<Label> label;
|
||||
public:
|
||||
InputBindBox(Binding& binding, glm::vec4 padding=glm::vec4(6.0f));
|
||||
|
||||
explicit InputBindBox(
|
||||
GUI& gui, Binding& binding, glm::vec4 padding = glm::vec4(6.0f)
|
||||
);
|
||||
|
||||
virtual void drawBackground(
|
||||
const DrawContext& pctx, const Assets& assets
|
||||
) override;
|
||||
|
||||
virtual void clicked(GUI*, mousecode button) override;
|
||||
virtual void clicked(mousecode button) override;
|
||||
virtual void keyPressed(keycode key) override;
|
||||
virtual bool isFocuskeeper() const override {return true;}
|
||||
virtual bool isFocuskeeper() const override {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue