From 4deb6fa64a83bbc90775815b3f470b7069268838 Mon Sep 17 00:00:00 2001 From: lisyarus Date: Thu, 25 Feb 2021 11:23:37 +0300 Subject: [PATCH] Default button created with text --- examples/ui.cpp | 2 +- libs/ui/include/psemek/ui/default_element_factory.hpp | 2 +- libs/ui/source/default_element_factory.cpp | 11 +++++++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/examples/ui.cpp b/examples/ui.cpp index 9df544b3..cbadb121 100644 --- a/examples/ui.cpp +++ b/examples/ui.cpp @@ -22,7 +22,7 @@ struct ui_example element_factory.set_style(style); auto screen = element_factory.make_screen(); - screen->add(element_factory.make_button(), ui::screen::x_policy::center, ui::screen::y_policy::center); + screen->add(element_factory.make_button("Test"), ui::screen::x_policy::center, ui::screen::y_policy::center); ui_controller.set_root(std::move(screen)); } diff --git a/libs/ui/include/psemek/ui/default_element_factory.hpp b/libs/ui/include/psemek/ui/default_element_factory.hpp index 4f5585b0..d702f203 100644 --- a/libs/ui/include/psemek/ui/default_element_factory.hpp +++ b/libs/ui/include/psemek/ui/default_element_factory.hpp @@ -17,7 +17,7 @@ namespace psemek::ui void set_style(std::shared_ptr st); std::shared_ptr style() const; - std::unique_ptr