diff options
Diffstat (limited to 'demos')
-rw-r--r-- | demos/ScrollView/main.cpp | 4 | ||||
-rw-r--r-- | demos/main/main.cpp | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/demos/ScrollView/main.cpp b/demos/ScrollView/main.cpp index b049a408..c7b4d0d6 100644 --- a/demos/ScrollView/main.cpp +++ b/demos/ScrollView/main.cpp @@ -18,7 +18,7 @@ int main() { ScrollView scroll_view; window.AddChild(&scroll_view); - TextBlock text_block( + auto text_block = TextBlock::Create( uR"([Verse 1] The snow glows white on the mountain tonight Not a footprint to be seen @@ -78,7 +78,7 @@ Let the storm rage on! The cold never bothered me anyway)", true); - scroll_view.SetChild(&text_block); + scroll_view.SetChild(text_block.get()); window.GetWindowHost()->GetNativeWindow()->SetVisibility( cru::platform::gui::WindowVisibilityType::Show); diff --git a/demos/main/main.cpp b/demos/main/main.cpp index d17f42ba..d574670d 100644 --- a/demos/main/main.cpp +++ b/demos/main/main.cpp @@ -45,12 +45,12 @@ int main() { window.AddChild(&flex_layout); - TextBlock text_block(u"Hello World from CruUI!", true); - flex_layout.AddChild(&text_block); + auto text_block = TextBlock::Create(u"Hello World from CruUI!", true); + flex_layout.AddChild(text_block.get()); - TextBlock button_text_block(u"OK"); + auto button_text_block = TextBlock::Create(u"OK"); Button button; - button.SetChild(&button_text_block); + button.SetChild(button_text_block.get()); flex_layout.AddChild(&button); TextBox text_box; |