diff options
author | crupest <crupest@outlook.com> | 2018-09-16 23:48:54 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2018-09-16 23:48:54 +0800 |
commit | 94c066a34900845297c41c134a9a910124a5833d (patch) | |
tree | fe717d4d80137c005ae3f2c1675ab3ba7d990b23 /CruUI/main.cpp | |
parent | 683419f2856d348436ca64cfd4b3abbfc73cda89 (diff) | |
download | cru-94c066a34900845297c41c134a9a910124a5833d.tar.gz cru-94c066a34900845297c41c134a9a910124a5833d.tar.bz2 cru-94c066a34900845297c41c134a9a910124a5833d.zip |
Develop toggle button.
Diffstat (limited to 'CruUI/main.cpp')
-rw-r--r-- | CruUI/main.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CruUI/main.cpp b/CruUI/main.cpp index 0d1b4032..8e7a8672 100644 --- a/CruUI/main.cpp +++ b/CruUI/main.cpp @@ -2,12 +2,14 @@ #include "ui/window.h" #include "ui/controls/linear_layout.h" #include "ui/controls/text_block.h" +#include "ui/controls/toggle_button.h" using cru::Application; using cru::ui::Window; using cru::ui::controls::LinearLayout; using cru::ui::controls::TextBlock; +using cru::ui::controls::ToggleButton; int APIENTRY wWinMain( @@ -75,6 +77,8 @@ int APIENTRY wWinMain( layout->AddChild(TextBlock::Create(L"Layout is clicked!")); }); + layout->AddChild(ToggleButton::Create()); + const auto text_block = TextBlock::Create(L"Hello World!!!"); text_block->mouse_click_event.AddHandler([layout](cru::ui::events::MouseButtonEventArgs& args) |