Back with clickable button.
This commit is contained in:
parent
3e53bd9e00
commit
70891ce7b4
20 changed files with 107 additions and 50 deletions
|
@ -26,7 +26,7 @@ Widget::Widget()
|
|||
mBorderColor(Color(0, 0, 0)),
|
||||
mVisible(true)
|
||||
{
|
||||
|
||||
mName = "Widget";
|
||||
}
|
||||
|
||||
Widget::~Widget()
|
||||
|
@ -111,7 +111,7 @@ void Widget::setBackgroundColor(const Color& color)
|
|||
{
|
||||
if (mBackgroundColor != color)
|
||||
{
|
||||
mBackgroundColor = std::move(color);
|
||||
mBackgroundColor = color;
|
||||
mMaterialDirty = true;
|
||||
}
|
||||
}
|
||||
|
@ -169,6 +169,8 @@ void Widget::onPaintEvent(const PaintEvent* event)
|
|||
|
||||
if (isDirty())
|
||||
{
|
||||
mRootNode->setName(mName);
|
||||
|
||||
doPaint(event);
|
||||
|
||||
mTransformDirty = false;
|
||||
|
@ -284,6 +286,8 @@ void Widget::updateBackground(const PaintEvent* event)
|
|||
|
||||
if (!mBackgroundNode)
|
||||
{
|
||||
mBackgroundNode = std::make_unique<RectangleNode>(DiscretePoint(locX, locY), deltaX, deltaY);
|
||||
mBackgroundNode->setName(mName + "_BackgroundNode");
|
||||
mRootNode->addChild(mBackgroundNode.get());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue