Convert visual layers to scene nodes.
This commit is contained in:
parent
798cb365d7
commit
3e53bd9e00
64 changed files with 863 additions and 551 deletions
|
@ -8,6 +8,7 @@
|
|||
|
||||
class PaintEvent;
|
||||
class MouseEvent;
|
||||
class TextNode;
|
||||
|
||||
class Button : public Widget
|
||||
{
|
||||
|
@ -25,13 +26,19 @@ public:
|
|||
protected:
|
||||
void onMyMouseEvent(const MouseEvent* event) override;
|
||||
|
||||
void onPaintEvent(const PaintEvent* event) override;
|
||||
bool isDirty() const override;
|
||||
void doPaint(const PaintEvent* event) override;
|
||||
|
||||
void updateLabel(const PaintEvent* event);
|
||||
|
||||
private:
|
||||
std::string mLabel;
|
||||
clickFunc mClickFunc;
|
||||
Color mCachedColor;
|
||||
Color mClickedColor;
|
||||
|
||||
std::unique_ptr<TextNode> mTextNode;
|
||||
bool mContentDirty{true};
|
||||
};
|
||||
|
||||
using ButtonUPtr = std::unique_ptr<Button>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue