From 1cbffce8ed817ddc686b3a7cbb60e44014042188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn?= Date: Sat, 15 May 2021 23:09:21 +0200 Subject: [PATCH] adding --- app/Commands/SettingsMenuCommand.php | 16 +++++++++----- app/Menus/StylesFactory.php | 33 ++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 app/Menus/StylesFactory.php diff --git a/app/Commands/SettingsMenuCommand.php b/app/Commands/SettingsMenuCommand.php index 0095b4d..b36eda2 100644 --- a/app/Commands/SettingsMenuCommand.php +++ b/app/Commands/SettingsMenuCommand.php @@ -28,10 +28,16 @@ class SettingsMenuCommand extends Command */ public function handle() { - $option = $this->menu('Settings', [ - 'Freshly baked muffins', - 'Freshly baked croissants', - 'Turnovers, crumb cake, cinnamon buns, scones', - ])->open(); + // create menu + $builder = $this->menu('Settings') + ->addSubMenu('Sources', [ + 'd', + 'e' + ]); + + $builder->addLineBreak('-'); + + $mainmenu = $builder->build(); + $mainmenu->open(); } } diff --git a/app/Menus/StylesFactory.php b/app/Menus/StylesFactory.php new file mode 100644 index 0000000..d5ad87f --- /dev/null +++ b/app/Menus/StylesFactory.php @@ -0,0 +1,33 @@ +setWidth($builder->getTerminal()->getWidth()); + $builder->setBorderLeftWidth(4); + $builder->setBorderColour('magenta'); + $builder->setMargin(2); + $builder->setPadding(2, 4); + + return $builder; + } +} \ No newline at end of file