add joke example program

This commit is contained in:
hippoz 2022-07-05 20:53:26 +03:00
parent b0315b76be
commit a1f544ae82
No known key found for this signature in database
GPG key ID: 7C52899193467641

View file

@ -23,18 +23,11 @@ int main() {
auto main_widget = window.set_main_widget<Raven::Widget>();
main_widget->set_layout<Raven::VerticalBoxLayout>(6.0);
auto scroll_container = main_widget->add<Raven::ScrollContainer>();
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<Raven::DocumentLayout>(6.0);
auto hello_button = target->add<Raven::Button>("hello");
hello_button->set_style(&Raven::accent_button_style);
auto bye_button = target->add<Raven::Button>("bye");
bye_button->set_style(&Raven::accent_button_style);
auto compile_button = main_widget->add<Raven::Button>("compile and run program");
compile_button->set_style(&Raven::accent_button_style);
compile_button->on_click = []() {
system("./compile.sh");
};
window.run(true);
return 0;