diff --git a/examples/caption_example.cpp b/examples/caption_example.cpp index 637e27a..334dd28 100644 --- a/examples/caption_example.cpp +++ b/examples/caption_example.cpp @@ -10,6 +10,6 @@ int main() w->alignment = Caption::Alignment::CENTER; w->text("¡jello!"); w->font(f); - }); + }, 4, 8); return 0; } diff --git a/examples/run.hpp b/examples/run.hpp index 59ccbe6..4dc8330 100644 --- a/examples/run.hpp +++ b/examples/run.hpp @@ -20,7 +20,7 @@ template concept Widget = std::derived_from; template -void run_example(std::function setup) +void run_example(std::function setup, int w=3, int h=3) { try { @@ -39,10 +39,10 @@ void run_example(std::function setup) auto* layout {new widget::HorizontalLayout()}; - for (auto y = 0; y < 3; y++) + for (auto x = 0; x < w; x++) { auto* col = new widget::VerticalLayout(); - for (auto x = 0; x < 3; x++) + for (auto y = 0; y < h; y++) { auto* widget = new W(); setup(widget, font, x, y);