From 2f197dfae5cbb8ba57a44ea1c2f92198e78e7661 Mon Sep 17 00:00:00 2001 From: Jarod42 Date: Wed, 25 Sep 2024 21:14:59 +0200 Subject: [PATCH] [example] Add ToggleButton. Also move slider to be visible --- examples/widgets_example.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/widgets_example.hpp b/examples/widgets_example.hpp index 1dd4bb8..1897aa0 100644 --- a/examples/widgets_example.hpp +++ b/examples/widgets_example.hpp @@ -87,6 +87,8 @@ namespace WidgetsExample checkBox1 = std::make_unique("Checkbox 1"); checkBox2 = std::make_unique("Checkbox 2"); + toggleButton = std::make_unique("Toggle button"); + radioButton1 = std::make_unique("Radio Button 1", "radiogroup", true); radioButton2 = std::make_unique("Radio Button 2", "radiogroup"); radioButton3 = std::make_unique("Radio Button 3", "radiogroup"); @@ -138,10 +140,11 @@ namespace WidgetsExample top->add(dropDown.get(), 580, 10); top->add(checkBox1.get(), 580, 50); top->add(checkBox2.get(), 580, 70); + top->add(toggleButton.get(), 580, 90); top->add(radioButton1.get(), 580, 120); top->add(radioButton2.get(), 580, 140); top->add(radioButton3.get(), 580, 160); - top->add(slider.get(), 580, 200); + top->add(slider.get(), 580, 180); top->add(window.get(), 100, 350); top->add(nestedScrollArea.get(), 440, 350); @@ -206,6 +209,7 @@ namespace WidgetsExample std::unique_ptr radioButton1; // Three radio buttons std::unique_ptr radioButton2; std::unique_ptr radioButton3; + std::unique_ptr toggleButton; std::unique_ptr slider; // A slider std::unique_ptr image; // An image for the icon std::unique_ptr window;