From a1f544ae826b8a97a4606ea159a9494cd257f4a3 Mon Sep 17 00:00:00 2001 From: hippoz <10706925-hippoz@users.noreply.gitlab.com> Date: Tue, 5 Jul 2022 20:53:26 +0300 Subject: [PATCH] add joke example program --- src/main.cpp | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 6e2b53e..28d3684 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -23,18 +23,11 @@ int main() { auto main_widget = window.set_main_widget(); main_widget->set_layout(6.0); - auto scroll_container = main_widget->add(); - scroll_container->set_scroll(Raven::Point(0, 0)); - scroll_container->resize_fixed(100, 100); - scroll_container->set_style(&Raven::accent_widget_style); - - auto target = scroll_container->make_target(); - target->set_layout(6.0); - - auto hello_button = target->add("hello"); - hello_button->set_style(&Raven::accent_button_style); - auto bye_button = target->add("bye"); - bye_button->set_style(&Raven::accent_button_style); + auto compile_button = main_widget->add("compile and run program"); + compile_button->set_style(&Raven::accent_button_style); + compile_button->on_click = []() { + system("./compile.sh"); + }; window.run(true); return 0;