Back with clickable button.
This commit is contained in:
parent
3e53bd9e00
commit
70891ce7b4
20 changed files with 107 additions and 50 deletions
|
@ -15,7 +15,7 @@ Button::Button()
|
|||
mClickedColor(Color(180, 180, 180)),
|
||||
mClickFunc()
|
||||
{
|
||||
|
||||
mName = "Button";
|
||||
}
|
||||
|
||||
std::unique_ptr<Button> Button::Create()
|
||||
|
@ -73,6 +73,8 @@ void Button::updateLabel(const PaintEvent* event)
|
|||
if (!mTextNode)
|
||||
{
|
||||
mTextNode = TextNode::Create(mLabel, middle);
|
||||
mTextNode->setName(mName + "_TextNode");
|
||||
mTextNode->setContent(mLabel);
|
||||
mRootNode->addChild(mTextNode.get());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue