aboutsummaryrefslogtreecommitdiff
path: root/src/ui/controls/button.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2018-12-06 05:44:38 +0800
committercrupest <crupest@outlook.com>2018-12-06 05:44:38 +0800
commit81fd0725d020e9f302c0d40fd5a5700d3dc871aa (patch)
tree1a99936949271641fbdfa3b4fb7ea448344164f7 /src/ui/controls/button.hpp
parentf0e2b2d3763dd100a5e9d6cda566724d2b7da965 (diff)
downloadcru-81fd0725d020e9f302c0d40fd5a5700d3dc871aa.tar.gz
cru-81fd0725d020e9f302c0d40fd5a5700d3dc871aa.tar.bz2
cru-81fd0725d020e9f302c0d40fd5a5700d3dc871aa.zip
Done.
Diffstat (limited to 'src/ui/controls/button.hpp')
-rw-r--r--src/ui/controls/button.hpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ui/controls/button.hpp b/src/ui/controls/button.hpp
index c53f7ed9..82694fe8 100644
--- a/src/ui/controls/button.hpp
+++ b/src/ui/controls/button.hpp
@@ -9,16 +9,15 @@
namespace cru::ui::controls
{
- class Button : public Control
+ class Button : public SingleChildControl
{
public:
static constexpr auto control_type = L"Button";
- static Button* Create(const std::initializer_list<Control*>& children = std::initializer_list<Control*>())
+ static Button* Create(Control* child = nullptr)
{
const auto button = new Button();
- for (const auto control : children)
- button->AddChild(control);
+ button->SetChild(child);
return button;
}