aboutsummaryrefslogtreecommitdiff
path: root/CruUI/main.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2018-09-10 00:09:52 +0800
committercrupest <crupest@outlook.com>2018-09-10 00:09:52 +0800
commitaa8ba64f4f580552ba14325dd3e04f38a3c9a1de (patch)
treecde762da1a0bfb24c28a8a3dfa5253ad95a5b809 /CruUI/main.cpp
parent74031db4b8c366531db5be8fa8d765483ab377b0 (diff)
downloadcru-aa8ba64f4f580552ba14325dd3e04f38a3c9a1de.tar.gz
cru-aa8ba64f4f580552ba14325dd3e04f38a3c9a1de.tar.bz2
cru-aa8ba64f4f580552ba14325dd3e04f38a3c9a1de.zip
...
Diffstat (limited to 'CruUI/main.cpp')
-rw-r--r--CruUI/main.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/CruUI/main.cpp b/CruUI/main.cpp
index bd0d3247..99f9ded6 100644
--- a/CruUI/main.cpp
+++ b/CruUI/main.cpp
@@ -66,19 +66,13 @@ int APIENTRY wWinMain(
//test 2
- LinearLayout layout;
- TextBlock text_block_1;
- text_block_1.SetText(L"Hello World!!!");
- TextBlock text_block_2;
- text_block_2.SetText(L"This is a very very very very very long sentence!!!");
- TextBlock text_block_3;
- text_block_3.SetText(L"By crupest!!!");
-
- layout.AddChild(&text_block_1);
- layout.AddChild(&text_block_2);
- layout.AddChild(&text_block_3);
-
- window.AddChild(&layout);
+ const auto layout = LinearLayout::Create();
+
+ layout->AddChild(TextBlock::Create(L"Hello World!!!"));
+ layout->AddChild(TextBlock::Create(L"This is a very very very very very long sentence!!!"));
+ layout->AddChild(TextBlock::Create(L"By crupest!!!"));
+
+ window.AddChild(layout);
window.Show();