diff options
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 906528c4..c35213f7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,6 +1,7 @@ #include "pre.hpp" #include "application.hpp" +#include "ui/controls/button.hpp" #include "ui/controls/flex_layout.hpp" #include "ui/controls/text_block.hpp" #include "ui/window.hpp" @@ -11,6 +12,7 @@ using cru::StringView; using cru::ui::Rect; using cru::ui::Thickness; using cru::ui::Window; +using cru::ui::controls::Button; using cru::ui::controls::FlexLayout; using cru::ui::controls::TextBlock; @@ -28,15 +30,16 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, window->SetChild(flex_layout); + const auto button = Button::Create(); const auto text_block1 = TextBlock::Create(); text_block1->SetText(L"Hello World!"); - flex_layout->AddChild(text_block1, 0); + button->SetChild(text_block1); + flex_layout->AddChild(button, 0); const auto text_block2 = TextBlock::Create(); text_block2->SetText(L"Hello World!"); flex_layout->AddChild(text_block2, 1); - window->Show(); return application.Run(); |