From dc55fbeb791aef5bc5c4793a029390939da0b07a Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Sun, 27 Dec 2020 17:21:31 +0100 Subject: [PATCH] Playground: Pre-populate the text editor with some GML The text editor is now populated with some very basic GML after startup: @GUI::Widget { layout: @GUI::VerticalBoxLayout { } // Now add some widgets! } Less typing, less intimidating! :^) --- DevTools/Playground/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/DevTools/Playground/main.cpp b/DevTools/Playground/main.cpp index cb40a80909..f24780e826 100644 --- a/DevTools/Playground/main.cpp +++ b/DevTools/Playground/main.cpp @@ -44,6 +44,14 @@ int main(int argc, char** argv) editor.set_syntax_highlighter(make()); editor.set_automatic_indentation_enabled(true); + editor.set_text(R"~~~(@GUI::Widget { + layout: @GUI::VerticalBoxLayout { + } + + // Now add some widgets! +} +)~~~"); + editor.set_cursor(4, 28); // after "...widgets!" editor.on_change = [&] { preview.remove_all_children();