whirled_peas 0.5.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +1 -0
- data/CHANGELOG.md +31 -0
- data/README.md +748 -137
- data/Rakefile +4 -32
- data/bin/easing +33 -0
- data/bin/reset_cursor +11 -0
- data/bin/screen_test +68 -0
- data/examples/graph.rb +54 -0
- data/examples/intro.rb +52 -0
- data/examples/scrolling.rb +54 -0
- data/lib/whirled_peas.rb +4 -12
- data/lib/whirled_peas/animator.rb +5 -0
- data/lib/whirled_peas/animator/debug_consumer.rb +17 -0
- data/lib/whirled_peas/animator/easing.rb +72 -0
- data/lib/whirled_peas/animator/frame.rb +5 -0
- data/lib/whirled_peas/animator/frameset.rb +33 -0
- data/lib/whirled_peas/animator/producer.rb +35 -0
- data/lib/whirled_peas/animator/renderer_consumer.rb +31 -0
- data/lib/whirled_peas/command.rb +5 -0
- data/lib/whirled_peas/command/base.rb +86 -0
- data/lib/whirled_peas/command/config_command.rb +44 -0
- data/lib/whirled_peas/command/debug.rb +21 -0
- data/lib/whirled_peas/command/fonts.rb +22 -0
- data/lib/whirled_peas/command/frame_command.rb +34 -0
- data/lib/whirled_peas/command/frames.rb +24 -0
- data/lib/whirled_peas/command/help.rb +38 -0
- data/lib/whirled_peas/command/play.rb +108 -0
- data/lib/whirled_peas/command/record.rb +57 -0
- data/lib/whirled_peas/command/still.rb +29 -0
- data/lib/whirled_peas/command_line.rb +22 -220
- data/lib/whirled_peas/config.rb +56 -6
- data/lib/whirled_peas/device.rb +5 -0
- data/lib/whirled_peas/device/null_device.rb +8 -0
- data/lib/whirled_peas/device/output_file.rb +19 -0
- data/lib/whirled_peas/device/screen.rb +26 -0
- data/lib/whirled_peas/graphics.rb +14 -0
- data/lib/whirled_peas/graphics/box_painter.rb +48 -47
- data/lib/whirled_peas/graphics/canvas.rb +22 -11
- data/lib/whirled_peas/graphics/composer.rb +98 -0
- data/lib/whirled_peas/graphics/container_coords.rb +24 -13
- data/lib/whirled_peas/graphics/container_dimensions.rb +37 -9
- data/lib/whirled_peas/graphics/container_painter.rb +283 -36
- data/lib/whirled_peas/graphics/content_dimensions.rb +19 -0
- data/lib/whirled_peas/graphics/content_painter.rb +20 -0
- data/lib/whirled_peas/graphics/debugger.rb +10 -1
- data/lib/whirled_peas/graphics/graph_dimensions.rb +12 -0
- data/lib/whirled_peas/graphics/graph_painter.rb +95 -0
- data/lib/whirled_peas/graphics/grid_painter.rb +25 -15
- data/lib/whirled_peas/graphics/mock_screen.rb +1 -1
- data/lib/whirled_peas/graphics/painter.rb +15 -6
- data/lib/whirled_peas/graphics/renderer.rb +13 -30
- data/lib/whirled_peas/graphics/text_painter.rb +11 -13
- data/lib/whirled_peas/settings/alignment.rb +24 -0
- data/lib/whirled_peas/settings/bg_color.rb +2 -0
- data/lib/whirled_peas/settings/border.rb +16 -16
- data/lib/whirled_peas/settings/color.rb +13 -14
- data/lib/whirled_peas/settings/container_settings.rb +133 -40
- data/lib/whirled_peas/settings/debugger.rb +9 -0
- data/lib/whirled_peas/settings/display_flow.rb +13 -11
- data/lib/whirled_peas/settings/element_settings.rb +8 -3
- data/lib/whirled_peas/settings/graph_settings.rb +21 -0
- data/lib/whirled_peas/settings/grid_settings.rb +15 -0
- data/lib/whirled_peas/settings/scrollbar.rb +15 -0
- data/lib/whirled_peas/settings/sizing.rb +19 -0
- data/lib/whirled_peas/settings/spacing.rb +34 -0
- data/lib/whirled_peas/settings/text_color.rb +2 -0
- data/lib/whirled_peas/settings/vert_alignment.rb +24 -0
- data/lib/whirled_peas/utils/ansi.rb +13 -0
- data/lib/whirled_peas/utils/file_handler.rb +57 -0
- data/lib/whirled_peas/utils/title_font.rb +1 -1
- data/lib/whirled_peas/version.rb +1 -1
- data/screen_test/{rendered/elements → elements}/box.frame +1 -1
- data/screen_test/{rendered/elements → elements}/box.rb +0 -0
- data/screen_test/elements/graph.frame +1 -0
- data/screen_test/elements/graph.rb +12 -0
- data/screen_test/elements/grid.frame +1 -0
- data/screen_test/{rendered/elements → elements}/grid.rb +0 -0
- data/screen_test/elements/screen_overflow_x.frame +1 -0
- data/screen_test/{rendered/elements/screen_overflow.rb → elements/screen_overflow_x.rb} +0 -0
- data/screen_test/elements/screen_overflow_y.frame +1 -0
- data/screen_test/elements/screen_overflow_y.rb +9 -0
- data/screen_test/elements/text.frame +1 -0
- data/screen_test/{rendered/elements → elements}/text.rb +0 -0
- data/screen_test/elements/text_multiline.frame +1 -0
- data/screen_test/{rendered/elements → elements}/text_multiline.rb +0 -0
- data/screen_test/settings/align/box_around.frame +1 -0
- data/screen_test/settings/align/box_around.rb +16 -0
- data/screen_test/settings/align/box_between.frame +1 -0
- data/screen_test/settings/align/box_between.rb +16 -0
- data/screen_test/settings/align/box_center.frame +1 -0
- data/screen_test/{rendered/settings/align/box.rb → settings/align/box_center.rb} +5 -4
- data/screen_test/settings/align/box_default.frame +1 -0
- data/screen_test/{rendered/settings/align/grid.rb → settings/align/box_default.rb} +6 -6
- data/screen_test/settings/align/box_evenly.frame +1 -0
- data/screen_test/settings/align/box_evenly.rb +16 -0
- data/screen_test/settings/align/box_left.frame +1 -0
- data/screen_test/settings/align/box_left.rb +21 -0
- data/screen_test/settings/align/box_right.frame +1 -0
- data/screen_test/settings/align/box_right.rb +21 -0
- data/screen_test/settings/align/children_center.frame +1 -0
- data/screen_test/settings/align/children_center.rb +15 -0
- data/screen_test/settings/align/children_left.frame +1 -0
- data/screen_test/settings/align/children_left.rb +15 -0
- data/screen_test/settings/align/children_right.frame +1 -0
- data/screen_test/settings/align/children_right.rb +15 -0
- data/screen_test/settings/align/grid_center.frame +1 -0
- data/screen_test/settings/align/grid_center.rb +18 -0
- data/screen_test/settings/align/grid_default.frame +1 -0
- data/screen_test/settings/align/grid_default.rb +17 -0
- data/screen_test/settings/align/grid_left.frame +1 -0
- data/screen_test/settings/align/grid_left.rb +18 -0
- data/screen_test/settings/align/grid_right.frame +1 -0
- data/screen_test/settings/align/grid_right.rb +18 -0
- data/screen_test/settings/ansi/bold.frame +1 -0
- data/screen_test/{rendered/settings/width/overflow_box_t2b.rb → settings/ansi/bold.rb} +4 -5
- data/screen_test/{rendered/settings → settings}/ansi/color.frame +1 -1
- data/screen_test/{rendered/settings → settings}/ansi/color.rb +0 -0
- data/screen_test/settings/ansi/underline.frame +1 -0
- data/screen_test/{rendered/settings → settings}/ansi/underline.rb +4 -5
- data/screen_test/{rendered/settings → settings}/border.frame +1 -1
- data/screen_test/{rendered/settings → settings}/border.rb +1 -1
- data/screen_test/settings/flow/box_b2t.frame +1 -0
- data/screen_test/settings/flow/box_b2t.rb +26 -0
- data/screen_test/settings/flow/box_l2r.frame +1 -0
- data/screen_test/settings/flow/box_l2r.rb +26 -0
- data/screen_test/settings/flow/box_r2l.frame +1 -0
- data/screen_test/settings/flow/box_r2l.rb +26 -0
- data/screen_test/settings/flow/box_t2b.frame +1 -0
- data/screen_test/settings/flow/box_t2b.rb +26 -0
- data/screen_test/settings/flow/grid_b2t.frame +1 -0
- data/screen_test/settings/flow/grid_b2t.rb +14 -0
- data/screen_test/settings/flow/grid_l2r.frame +1 -0
- data/screen_test/{rendered/settings/margin.rb → settings/flow/grid_l2r.rb} +4 -4
- data/screen_test/settings/flow/grid_r2l.frame +1 -0
- data/screen_test/settings/flow/grid_r2l.rb +14 -0
- data/screen_test/settings/flow/grid_t2b.frame +1 -0
- data/screen_test/settings/flow/grid_t2b.rb +14 -0
- data/screen_test/settings/height/box.frame +1 -0
- data/screen_test/{rendered/settings → settings}/height/box.rb +0 -0
- data/screen_test/settings/height/box_border_sizing.frame +1 -0
- data/screen_test/settings/height/box_border_sizing.rb +15 -0
- data/screen_test/settings/height/grid.frame +1 -0
- data/screen_test/{rendered/settings → settings}/height/grid.rb +0 -0
- data/screen_test/settings/height/overflow_box.frame +1 -0
- data/screen_test/settings/height/overflow_box.rb +13 -0
- data/screen_test/settings/height/overflow_box_l2r.frame +1 -0
- data/screen_test/settings/height/overflow_box_l2r.rb +17 -0
- data/screen_test/settings/height/overflow_box_t2b.frame +1 -0
- data/screen_test/settings/height/overflow_box_t2b.rb +16 -0
- data/screen_test/settings/height/overflow_grid.frame +1 -0
- data/screen_test/{rendered/settings → settings}/height/overflow_grid.rb +0 -0
- data/screen_test/settings/margin.frame +1 -0
- data/screen_test/settings/margin.rb +16 -0
- data/screen_test/settings/padding.frame +1 -0
- data/screen_test/settings/padding.rb +13 -0
- data/screen_test/settings/position/box_left.frame +1 -0
- data/screen_test/{rendered/settings → settings}/position/box_left.rb +2 -2
- data/screen_test/settings/position/box_left_negative.frame +1 -0
- data/screen_test/{rendered/settings → settings}/position/box_left_negative.rb +2 -2
- data/screen_test/settings/position/box_top.frame +1 -0
- data/screen_test/{rendered/settings → settings}/position/box_top.rb +1 -1
- data/screen_test/settings/position/box_top_negative.frame +1 -0
- data/screen_test/{rendered/settings → settings}/position/box_top_negative.rb +2 -2
- data/screen_test/settings/position/grid_left.frame +1 -0
- data/screen_test/{rendered/settings → settings}/position/grid_left.rb +1 -1
- data/screen_test/settings/position/grid_left_negative.frame +1 -0
- data/screen_test/{rendered/settings → settings}/position/grid_left_negative.rb +1 -1
- data/screen_test/settings/position/grid_top.frame +1 -0
- data/screen_test/{rendered/settings → settings}/position/grid_top.rb +1 -1
- data/screen_test/settings/position/grid_top_negative.frame +1 -0
- data/screen_test/{rendered/settings → settings}/position/grid_top_negative.rb +1 -1
- data/screen_test/settings/scroll/horiz_box.frame +1 -0
- data/screen_test/settings/scroll/horiz_box.rb +17 -0
- data/screen_test/settings/scroll/horiz_box_align_center.rb +18 -0
- data/screen_test/settings/scroll/horiz_box_align_right.rb +18 -0
- data/screen_test/settings/scroll/vert_box.frame +1 -0
- data/screen_test/settings/scroll/vert_box.rb +20 -0
- data/screen_test/settings/title_font.frame +1 -0
- data/screen_test/{rendered/settings → settings}/title_font.rb +1 -1
- data/screen_test/settings/valign/box_around.frame +1 -0
- data/screen_test/settings/valign/box_around.rb +17 -0
- data/screen_test/settings/valign/box_between.frame +1 -0
- data/screen_test/settings/valign/box_between.rb +17 -0
- data/screen_test/settings/valign/box_bottom.frame +1 -0
- data/screen_test/settings/valign/box_bottom.rb +17 -0
- data/screen_test/settings/valign/box_default.frame +1 -0
- data/screen_test/settings/valign/box_default.rb +16 -0
- data/screen_test/settings/valign/box_evenly.frame +1 -0
- data/screen_test/settings/valign/box_evenly.rb +17 -0
- data/screen_test/settings/valign/box_middle.frame +1 -0
- data/screen_test/settings/valign/box_middle.rb +17 -0
- data/screen_test/settings/valign/box_top.frame +1 -0
- data/screen_test/settings/valign/box_top.rb +17 -0
- data/screen_test/settings/valign/grid_bottom.frame +1 -0
- data/screen_test/settings/valign/grid_bottom.rb +15 -0
- data/screen_test/settings/valign/grid_default.frame +1 -0
- data/screen_test/settings/valign/grid_default.rb +14 -0
- data/screen_test/settings/valign/grid_middle.frame +1 -0
- data/screen_test/settings/valign/grid_middle.rb +15 -0
- data/screen_test/settings/valign/grid_top.frame +1 -0
- data/screen_test/settings/valign/grid_top.rb +15 -0
- data/screen_test/settings/width/box_border_sizing.frame +1 -0
- data/screen_test/settings/width/box_border_sizing.rb +15 -0
- data/screen_test/settings/width/box_content.frame +1 -0
- data/screen_test/settings/width/box_content.rb +15 -0
- data/screen_test/settings/width/box_default.frame +1 -0
- data/screen_test/{rendered/settings/width/box.rb → settings/width/box_default.rb} +3 -2
- data/screen_test/settings/width/grid.frame +1 -0
- data/screen_test/{rendered/settings → settings}/width/grid.rb +2 -2
- data/screen_test/settings/width/overflow_align_center.frame +1 -0
- data/screen_test/settings/width/overflow_align_center.rb +14 -0
- data/screen_test/settings/width/overflow_align_right.frame +1 -0
- data/screen_test/settings/width/overflow_align_right.rb +14 -0
- data/screen_test/settings/width/overflow_box.frame +1 -0
- data/screen_test/settings/width/overflow_box.rb +13 -0
- data/screen_test/settings/width/overflow_box_l2r.frame +1 -0
- data/screen_test/settings/width/overflow_box_l2r.rb +16 -0
- data/screen_test/settings/width/overflow_box_t2b.frame +1 -0
- data/screen_test/settings/width/overflow_box_t2b.rb +17 -0
- data/screen_test/settings/width/overflow_grid.frame +1 -0
- data/screen_test/{rendered/settings → settings}/width/overflow_grid.rb +0 -0
- data/tools/whirled_peas/tools/screen_tester.rb +285 -0
- metadata +192 -98
- data/bin/debug +0 -35
- data/lib/whirled_peas/debugger.rb +0 -80
- data/lib/whirled_peas/frame.rb +0 -6
- data/lib/whirled_peas/frame/consumer.rb +0 -30
- data/lib/whirled_peas/frame/debug_consumer.rb +0 -30
- data/lib/whirled_peas/frame/event_loop.rb +0 -90
- data/lib/whirled_peas/frame/producer.rb +0 -67
- data/lib/whirled_peas/graphics/screen.rb +0 -65
- data/lib/whirled_peas/graphics/text_dimensions.rb +0 -15
- data/lib/whirled_peas/settings/text_align.rb +0 -19
- data/lib/whirled_peas/template.rb +0 -5
- data/lib/whirled_peas/template/box_element.rb +0 -8
- data/lib/whirled_peas/template/composer.rb +0 -68
- data/lib/whirled_peas/template/container.rb +0 -28
- data/lib/whirled_peas/template/debugger.rb +0 -34
- data/lib/whirled_peas/template/element.rb +0 -13
- data/lib/whirled_peas/template/grid_element.rb +0 -8
- data/lib/whirled_peas/template/text_element.rb +0 -24
- data/screen_test/rendered/elements/grid.frame +0 -1
- data/screen_test/rendered/elements/text.frame +0 -1
- data/screen_test/rendered/elements/text_multiline.frame +0 -1
- data/screen_test/rendered/settings/align/box.frame +0 -1
- data/screen_test/rendered/settings/align/children_center.frame +0 -1
- data/screen_test/rendered/settings/align/children_center.rb +0 -13
- data/screen_test/rendered/settings/align/children_left.frame +0 -1
- data/screen_test/rendered/settings/align/children_left.rb +0 -13
- data/screen_test/rendered/settings/align/children_right.frame +0 -1
- data/screen_test/rendered/settings/align/children_right.rb +0 -13
- data/screen_test/rendered/settings/align/grid.frame +0 -1
- data/screen_test/rendered/settings/ansi/bold.frame +0 -1
- data/screen_test/rendered/settings/ansi/bold.rb +0 -15
- data/screen_test/rendered/settings/ansi/underline.frame +0 -1
- data/screen_test/rendered/settings/flow/l2r.frame +0 -1
- data/screen_test/rendered/settings/flow/l2r.rb +0 -24
- data/screen_test/rendered/settings/flow/t2b.frame +0 -1
- data/screen_test/rendered/settings/flow/t2b.rb +0 -24
- data/screen_test/rendered/settings/height/box.frame +0 -1
- data/screen_test/rendered/settings/height/grid.frame +0 -1
- data/screen_test/rendered/settings/height/overflow_box.frame +0 -1
- data/screen_test/rendered/settings/height/overflow_box.rb +0 -13
- data/screen_test/rendered/settings/height/overflow_box_l2r.frame +0 -1
- data/screen_test/rendered/settings/height/overflow_box_l2r.rb +0 -15
- data/screen_test/rendered/settings/height/overflow_box_t2b.frame +0 -1
- data/screen_test/rendered/settings/height/overflow_box_t2b.rb +0 -14
- data/screen_test/rendered/settings/height/overflow_grid.frame +0 -1
- data/screen_test/rendered/settings/margin.frame +0 -1
- data/screen_test/rendered/settings/padding.frame +0 -1
- data/screen_test/rendered/settings/padding.rb +0 -11
- data/screen_test/rendered/settings/position/box_left.frame +0 -1
- data/screen_test/rendered/settings/position/box_left_negative.frame +0 -1
- data/screen_test/rendered/settings/position/box_top.frame +0 -1
- data/screen_test/rendered/settings/position/box_top_negative.frame +0 -1
- data/screen_test/rendered/settings/position/grid_left.frame +0 -1
- data/screen_test/rendered/settings/position/grid_left_negative.frame +0 -1
- data/screen_test/rendered/settings/position/grid_top.frame +0 -1
- data/screen_test/rendered/settings/position/grid_top_negative.frame +0 -1
- data/screen_test/rendered/settings/title_font.frame +0 -1
- data/screen_test/rendered/settings/width/box.frame +0 -1
- data/screen_test/rendered/settings/width/grid.frame +0 -1
- data/screen_test/rendered/settings/width/overflow_box.frame +0 -1
- data/screen_test/rendered/settings/width/overflow_box.rb +0 -11
- data/screen_test/rendered/settings/width/overflow_box_l2r.frame +0 -1
- data/screen_test/rendered/settings/width/overflow_box_l2r.rb +0 -14
- data/screen_test/rendered/settings/width/overflow_box_t2b.frame +0 -1
- data/screen_test/rendered/settings/width/overflow_grid.frame +0 -1
- data/screen_test/screen_tester.rb +0 -191
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H┏━━━━━━━━━━━━━━━━━━━━━━━┓[2;1H┃ ┃[3;1H┣━━━━━━━━━━━━━━━━━━━━━━━┫[4;1H┃ ┃[5;1H┗━━━━━━━━━━━━━━━━━━━━━━━┛[2;2HThis is an aligned grid[4;2HLeft[0m[24;1H[?25h
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template do |composer|
|
6
|
+
composer.add_grid('Alignment') do |composer, settings|
|
7
|
+
settings.num_cols = 1
|
8
|
+
settings.full_border
|
9
|
+
settings.align = :left
|
10
|
+
# Keep the title long so grids below will be wide enough to use the
|
11
|
+
# alignment attribute. Don't rely on the `width` attribute to keep
|
12
|
+
# `align` isolated in this test.
|
13
|
+
composer.add_text('Title') { 'This is an aligned grid' }
|
14
|
+
composer.add_text('Content') { 'Left' }
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H┏━━━━━━━━━━━━━━━━━━━━━━━┓[2;1H┃ ┃[3;1H┣━━━━━━━━━━━━━━━━━━━━━━━┫[4;1H┃ ┃[5;1H┗━━━━━━━━━━━━━━━━━━━━━━━┛[2;2HThis is an aligned grid[4;20HRight[0m[24;1H[?25h
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template do |composer|
|
6
|
+
composer.add_grid('Alignment') do |composer, settings|
|
7
|
+
settings.num_cols = 1
|
8
|
+
settings.full_border
|
9
|
+
settings.align = :right
|
10
|
+
# Keep the title long so grids below will be wide enough to use the
|
11
|
+
# alignment attribute. Don't rely on the `width` attribute to keep
|
12
|
+
# `align` isolated in this test.
|
13
|
+
composer.add_text('Title') { 'This is an aligned grid' }
|
14
|
+
composer.add_text('Content') { 'Right' }
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H[1mThis is bold[0m[2;1HThis is not bold[0m[24;1H[?25h
|
@@ -3,13 +3,12 @@ require 'whirled_peas'
|
|
3
3
|
class TemplateFactory
|
4
4
|
def build(*)
|
5
5
|
WhirledPeas.template do |composer, settings|
|
6
|
-
settings.width = 10
|
7
6
|
settings.flow = :t2b
|
8
|
-
settings
|
9
|
-
|
10
|
-
|
11
|
-
composer.add_text { str += 'XO' }
|
7
|
+
composer.add_text('Bold') do |_, settings|
|
8
|
+
settings.bold = true
|
9
|
+
'This is bold'
|
12
10
|
end
|
11
|
+
composer.add_text { 'This is not bold' }
|
13
12
|
end
|
14
13
|
end
|
15
14
|
end
|
@@ -1 +1 @@
|
|
1
|
-
[?25l[1;1H[J[1;1H[30m[47mBLACK on WHITE[0m[2;1H[90m[101mGRAY on BRIGHT_RED[0m[3;1H[31m[102mRED on BRIGHT_GREEN[0m[4;1H[32m[103mGREEN on BRIGHT_YELLOW[0m[5;1H[33m[104mYELLOW on BRIGHT_BLUE[0m[6;1H[34m[105mBLUE on BRIGHT_MAGENTA[0m[7;1H[35m[106mMAGENTA on BRIGHT_CYAN[0m[8;1H[36m[107mCYAN on BRIGHT_WHITE[0m[9;1H[37m[40mWHITE on BLACK[0m[10;1H[91m[100mBRIGHT_RED on GRAY[0m[11;1H[92m[41mBRIGHT_GREEN on RED[0m[12;1H[93m[42mBRIGHT_YELLOW on GREEN[0m[13;1H[94m[43mBRIGHT_BLUE on YELLOW[0m[14;1H[95m[44mBRIGHT_MAGENTA on BLUE[0m[15;1H[96m[45mBRIGHT_CYAN on MAGENTA[0m[16;1H[97m[46mBRIGHT_WHITE on CYAN[0m[0m[
|
1
|
+
[?25l[1;1H[J[1;1H[30m[47mBLACK on WHITE[0m[2;1H[90m[101mGRAY on BRIGHT_RED[0m[3;1H[31m[102mRED on BRIGHT_GREEN[0m[4;1H[32m[103mGREEN on BRIGHT_YELLOW[0m[5;1H[33m[104mYELLOW on BRIGHT_BLUE[0m[6;1H[34m[105mBLUE on BRIGHT_MAGENTA[0m[7;1H[35m[106mMAGENTA on BRIGHT_CYAN[0m[8;1H[36m[107mCYAN on BRIGHT_WHITE[0m[9;1H[37m[40mWHITE on BLACK[0m[10;1H[91m[100mBRIGHT_RED on GRAY[0m[11;1H[92m[41mBRIGHT_GREEN on RED[0m[12;1H[93m[42mBRIGHT_YELLOW on GREEN[0m[13;1H[94m[43mBRIGHT_BLUE on YELLOW[0m[14;1H[95m[44mBRIGHT_MAGENTA on BLUE[0m[15;1H[96m[45mBRIGHT_CYAN on MAGENTA[0m[16;1H[97m[46mBRIGHT_WHITE on CYAN[0m[0m[24;1H[?25h
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H[4mThis is underlined[0m[2;1HThis is not underlined[0m[24;1H[?25h
|
@@ -2,14 +2,13 @@ require 'whirled_peas'
|
|
2
2
|
|
3
3
|
class TemplateFactory
|
4
4
|
def build(*)
|
5
|
-
WhirledPeas.template do |composer|
|
5
|
+
WhirledPeas.template do |composer, settings|
|
6
|
+
settings.flow = :t2b
|
6
7
|
composer.add_text('Underline') do |_, settings|
|
7
8
|
settings.underline = true
|
8
|
-
|
9
|
-
end
|
10
|
-
composer.add_text('NotUnderline') do |_, settings|
|
11
|
-
"This is not underlined"
|
9
|
+
'This is underlined'
|
12
10
|
end
|
11
|
+
composer.add_text { 'This is not underlined' }
|
13
12
|
end
|
14
13
|
end
|
15
14
|
end
|
@@ -1 +1 @@
|
|
1
|
-
[?25l[1;1H[J[1;1H[32m╔══╦══╦══╗[0m[2;1H[32m║ ║ ║ ║[0m[3;1H[32m╠══╬══╬══╣[0m[4;1H[32m║ ║ ║ ║[0m[5;1H[32m╠══╬══╬══╣[0m[6;1H[32m║ ║ ║ ║[0m[7;1H[32m╠══╬══╬══╣[0m[8;1H[32m║ ║ ║ ║[0m[9;1H[32m╚══╩══╩══╝[0m[2;2H0[2;5H1[2;8H2[4;2H3[4;5H4[4;8H5[6;2H6[6;5H7[6;8H8[8;2H9[8;5H10[8;8H11[0m[
|
1
|
+
[?25l[1;1H[J[1;1H[32m╔══╦══╦══╗[0m[2;1H[32m║ ║ ║ ║[0m[3;1H[32m╠══╬══╬══╣[0m[4;1H[32m║ ║ ║ ║[0m[5;1H[32m╠══╬══╬══╣[0m[6;1H[32m║ ║ ║ ║[0m[7;1H[32m╠══╬══╬══╣[0m[8;1H[32m║ ║ ║ ║[0m[9;1H[32m╚══╩══╩══╝[0m[2;2H0[2;5H1[2;8H2[4;2H3[4;5H4[4;8H5[6;2H6[6;5H7[6;8H8[8;2H9[8;5H10[8;8H11[0m[24;1H[?25h
|
@@ -3,7 +3,7 @@ require 'whirled_peas'
|
|
3
3
|
class TemplateFactory
|
4
4
|
def build(*)
|
5
5
|
WhirledPeas.template do |composer|
|
6
|
-
composer.add_grid
|
6
|
+
composer.add_grid do |composer, settings|
|
7
7
|
settings.full_border(style: :double, color: :green)
|
8
8
|
settings.num_cols = 3
|
9
9
|
12.times.map(&:itself)
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H┏━━━━━━━━━━━━━━━━━━━━━━━┓[2;1H┃ ┃[3;1H┃ ┃[4;1H┃ ┃[5;1H┃ ┃[6;1H┃ ┃[7;1H┃ ┃[8;1H┃ ┃[9;1H┃ ┃[10;1H┃ ┃[11;1H┗━━━━━━━━━━━━━━━━━━━━━━━┛[2;2H┏━━━━━━━━━┓[3;2H┃ ┃[4;2H┗━━━━━━━━━┛[3;3H3. NARROW[5;2H┏━━━━━━━━━━━━━━━━━━━━━┓[6;2H┃ ┃[7;2H┗━━━━━━━━━━━━━━━━━━━━━┛[6;10H2. WIDE[8;2H┏━━━━━━━━━━━━━━━┓[9;2H┃ ┃[10;2H┗━━━━━━━━━━━━━━━┛[9;6H1. MEDIUM[0m[24;1H[?25h
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template do |composer|
|
6
|
+
composer.add_box do |composer, settings|
|
7
|
+
settings.flow = :b2t
|
8
|
+
settings.full_border
|
9
|
+
composer.add_box('Medium') do |composer, settings|
|
10
|
+
settings.full_border
|
11
|
+
settings.padding.horiz = 3
|
12
|
+
'1. MEDIUM'
|
13
|
+
end
|
14
|
+
composer.add_box('Wide') do |composer, settings|
|
15
|
+
settings.full_border
|
16
|
+
settings.padding.horiz = 7
|
17
|
+
'2. WIDE'
|
18
|
+
end
|
19
|
+
composer.add_box('Narrow') do |composer, settings|
|
20
|
+
settings.full_border
|
21
|
+
'3. NARROW'
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓[2;1H┃ ┃[3;1H┃ ┃[4;1H┃ ┃[5;1H┃ ┃[6;1H┃ ┃[7;1H┃ ┃[8;1H┃ ┃[9;1H┃ ┃[10;1H┃ ┃[11;1H┃ ┃[12;1H┃ ┃[13;1H┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛[2;2H┏━━━━━━━━━┓[3;2H┃ ┃[4;2H┃ ┃[5;2H┃ ┃[6;2H┃ ┃[7;2H┃ ┃[8;2H┗━━━━━━━━━┛[5;3H1. MEDIUM[2;13H┏━━━━━━━┓[3;13H┃ ┃[4;13H┃ ┃[5;13H┃ ┃[6;13H┃ ┃[7;13H┃ ┃[8;13H┃ ┃[9;13H┃ ┃[10;13H┃ ┃[11;13H┃ ┃[12;13H┗━━━━━━━┛[7;14H2. TALL[2;22H┏━━━━━━━━┓[3;22H┃ ┃[4;22H┗━━━━━━━━┛[3;23H3. SHORT[0m[24;1H[?25h
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template do |composer|
|
6
|
+
composer.add_box do |composer, settings|
|
7
|
+
settings.flow = :l2r
|
8
|
+
settings.full_border
|
9
|
+
composer.add_box('Medium') do |composer, settings|
|
10
|
+
settings.padding.vert = 2
|
11
|
+
settings.full_border
|
12
|
+
'1. MEDIUM'
|
13
|
+
end
|
14
|
+
composer.add_box('Tall') do |composer, settings|
|
15
|
+
settings.padding.vert = 4
|
16
|
+
settings.full_border
|
17
|
+
'2. TALL'
|
18
|
+
end
|
19
|
+
composer.add_box('Short') do |composer, settings|
|
20
|
+
settings.full_border
|
21
|
+
'3. SHORT'
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓[2;1H┃ ┃[3;1H┃ ┃[4;1H┃ ┃[5;1H┃ ┃[6;1H┃ ┃[7;1H┃ ┃[8;1H┃ ┃[9;1H┃ ┃[10;1H┃ ┃[11;1H┃ ┃[12;1H┃ ┃[13;1H┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛[2;2H┏━━━━━━━━┓[3;2H┃ ┃[4;2H┗━━━━━━━━┛[3;3H3. SHORT[2;12H┏━━━━━━━┓[3;12H┃ ┃[4;12H┃ ┃[5;12H┃ ┃[6;12H┃ ┃[7;12H┃ ┃[8;12H┃ ┃[9;12H┃ ┃[10;12H┃ ┃[11;12H┃ ┃[12;12H┗━━━━━━━┛[7;13H2. TALL[2;21H┏━━━━━━━━━┓[3;21H┃ ┃[4;21H┃ ┃[5;21H┃ ┃[6;21H┃ ┃[7;21H┃ ┃[8;21H┗━━━━━━━━━┛[5;22H1. MEDIUM[0m[24;1H[?25h
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template do |composer|
|
6
|
+
composer.add_box do |composer, settings|
|
7
|
+
settings.flow = :r2l
|
8
|
+
settings.full_border
|
9
|
+
composer.add_box('Medium') do |composer, settings|
|
10
|
+
settings.padding.vert = 2
|
11
|
+
settings.full_border
|
12
|
+
'1. MEDIUM'
|
13
|
+
end
|
14
|
+
composer.add_box('Tall') do |composer, settings|
|
15
|
+
settings.padding.vert = 4
|
16
|
+
settings.full_border
|
17
|
+
'2. TALL'
|
18
|
+
end
|
19
|
+
composer.add_box('Short') do |composer, settings|
|
20
|
+
settings.full_border
|
21
|
+
'3. SHORT'
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H┏━━━━━━━━━━━━━━━━━━━━━━━┓[2;1H┃ ┃[3;1H┃ ┃[4;1H┃ ┃[5;1H┃ ┃[6;1H┃ ┃[7;1H┃ ┃[8;1H┃ ┃[9;1H┃ ┃[10;1H┃ ┃[11;1H┗━━━━━━━━━━━━━━━━━━━━━━━┛[2;2H┏━━━━━━━━━━━━━━━┓[3;2H┃ ┃[4;2H┗━━━━━━━━━━━━━━━┛[3;6H1. MEDIUM[5;2H┏━━━━━━━━━━━━━━━━━━━━━┓[6;2H┃ ┃[7;2H┗━━━━━━━━━━━━━━━━━━━━━┛[6;10H2. WIDE[8;2H┏━━━━━━━━━┓[9;2H┃ ┃[10;2H┗━━━━━━━━━┛[9;3H3. NARROW[0m[24;1H[?25h
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template do |composer|
|
6
|
+
composer.add_box do |composer, settings|
|
7
|
+
settings.flow = :t2b
|
8
|
+
settings.full_border
|
9
|
+
composer.add_box('Medium') do |composer, settings|
|
10
|
+
settings.full_border
|
11
|
+
settings.padding.horiz = 3
|
12
|
+
'1. MEDIUM'
|
13
|
+
end
|
14
|
+
composer.add_box('Wide') do |composer, settings|
|
15
|
+
settings.full_border
|
16
|
+
settings.padding.horiz = 7
|
17
|
+
'2. WIDE'
|
18
|
+
end
|
19
|
+
composer.add_box('Narrow') do |composer, settings|
|
20
|
+
settings.full_border
|
21
|
+
'3. NARROW'
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H┏━━┳━━┳━━┳━━┓[2;1H┃ ┃ ┃ ┃ ┃[3;1H┣━━╋━━╋━━╋━━┫[4;1H┃ ┃ ┃ ┃ ┃[5;1H┣━━╋━━╋━━╋━━┫[6;1H┃ ┃ ┃ ┃ ┃[7;1H┗━━┻━━┻━━┻━━┛[6;2H1[4;2H2[2;2H3[6;5H4[4;5H5[2;5H6[6;8H7[4;8H8[2;8H9[6;11H10[0m[24;1H[?25h
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template do |composer|
|
6
|
+
composer.add_grid do |_, settings|
|
7
|
+
settings.flow = :b2t
|
8
|
+
settings.full_border
|
9
|
+
settings.num_cols = 4
|
10
|
+
10.times.map { |i| i + 1 }
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H┏━━┳━━┳━━┳━━┓[2;1H┃ ┃ ┃ ┃ ┃[3;1H┣━━╋━━╋━━╋━━┫[4;1H┃ ┃ ┃ ┃ ┃[5;1H┣━━╋━━╋━━╋━━┫[6;1H┃ ┃ ┃ ┃ ┃[7;1H┗━━┻━━┻━━┻━━┛[2;2H1[2;5H2[2;8H3[2;11H4[4;2H5[4;5H6[4;8H7[4;11H8[6;2H9[6;5H10[0m[24;1H[?25h
|
@@ -3,11 +3,11 @@ require 'whirled_peas'
|
|
3
3
|
class TemplateFactory
|
4
4
|
def build(*)
|
5
5
|
WhirledPeas.template do |composer, settings|
|
6
|
-
settings
|
7
|
-
|
8
|
-
settings.set_margin(left: 5, top: 2, right: 3, bottom: 1)
|
6
|
+
composer.add_grid do |_, settings|
|
7
|
+
settings.flow = :l2r
|
9
8
|
settings.full_border
|
10
|
-
|
9
|
+
settings.num_cols = 4
|
10
|
+
10.times.map { |i| i + 1 }
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H┏━━┳━━┳━━┳━━┓[2;1H┃ ┃ ┃ ┃ ┃[3;1H┣━━╋━━╋━━╋━━┫[4;1H┃ ┃ ┃ ┃ ┃[5;1H┣━━╋━━╋━━╋━━┫[6;1H┃ ┃ ┃ ┃ ┃[7;1H┗━━┻━━┻━━┻━━┛[2;11H1[2;8H2[2;5H3[2;2H4[4;11H5[4;8H6[4;5H7[4;2H8[6;11H9[6;8H10[0m[24;1H[?25h
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template do |composer, settings|
|
6
|
+
composer.add_grid do |_, settings|
|
7
|
+
settings.flow = :r2l
|
8
|
+
settings.full_border
|
9
|
+
settings.num_cols = 4
|
10
|
+
10.times.map { |i| i + 1 }
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H┏━━┳━━┳━━┳━━┓[2;1H┃ ┃ ┃ ┃ ┃[3;1H┣━━╋━━╋━━╋━━┫[4;1H┃ ┃ ┃ ┃ ┃[5;1H┣━━╋━━╋━━╋━━┫[6;1H┃ ┃ ┃ ┃ ┃[7;1H┗━━┻━━┻━━┻━━┛[2;2H1[4;2H2[6;2H3[2;5H4[4;5H5[6;5H6[2;8H7[4;8H8[6;8H9[2;11H10[0m[24;1H[?25h
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template do |composer, settings|
|
6
|
+
composer.add_grid do |_, settings|
|
7
|
+
settings.flow = :t2b
|
8
|
+
settings.full_border
|
9
|
+
settings.num_cols = 4
|
10
|
+
10.times.map { |i| i + 1 }
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H┏━━━━━┓[2;1H┃ ┃[3;1H┃ ┃[4;1H┃ ┃[5;1H┃ ┃[6;1H┃ ┃[7;1H┗━━━━━┛[2;2HMulti[3;2HLine[0m[24;1H[?25h
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H┏━━┓[2;1H┃ ┃[3;1H┃ ┃[4;1H┃ ┃[5;1H┃ ┃[6;1H┗━━┛[3;2H11[4;2H22[0m[24;1H[?25h
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template do |composer|
|
6
|
+
composer.add_box('Wide') do |_, settings|
|
7
|
+
settings.full_border
|
8
|
+
settings.padding.vert = 1
|
9
|
+
settings.height = 6
|
10
|
+
settings.sizing = :border
|
11
|
+
"11\n22\n33\n44"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H┏━┳━┳━┳━┓[2;1H┃ ┃ ┃ ┃ ┃[3;1H┃ ┃ ┃ ┃ ┃[4;1H┃ ┃ ┃ ┃ ┃[5;1H┃ ┃ ┃ ┃ ┃[6;1H┃ ┃ ┃ ┃ ┃[7;1H┣━╋━╋━╋━┫[8;1H┃ ┃ ┃ ┃ ┃[9;1H┃ ┃ ┃ ┃ ┃[10;1H┃ ┃ ┃ ┃ ┃[11;1H┃ ┃ ┃ ┃ ┃[12;1H┃ ┃ ┃ ┃ ┃[13;1H┣━╋━╋━╋━┫[14;1H┃ ┃ ┃ ┃ ┃[15;1H┃ ┃ ┃ ┃ ┃[16;1H┃ ┃ ┃ ┃ ┃[17;1H┃ ┃ ┃ ┃ ┃[18;1H┃ ┃ ┃ ┃ ┃[19;1H┗━┻━┻━┻━┛[2;2H0[2;4H1[2;6H2[2;8H3[8;2H4[8;4H5[8;6H6[8;8H7[14;2H8[14;4H9[0m[24;1H[?25h
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H┏━━┓[2;1H┃ ┃[3;1H┃ ┃[4;1H┃ ┃[5;1H┃ ┃[6;1H┃ ┃[7;1H┗━━┛[2;2HXO[3;2HXO[4;2HXO[5;2HXO[6;2HXO[0m[24;1H[?25h
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H┏━━━┓[2;1H┃ ┃[3;1H┃ ┃[4;1H┃ ┃[5;1H┃ ┃[6;1H┃ ┃[7;1H┗━━━┛[2;2H0[3;2H1[4;2H2[5;2H3[6;2H4[2;3H0[3;3H1[4;3H2[5;3H3[6;3H4[2;4H0[3;4H1[4;4H2[5;4H3[6;4H4[0m[24;1H[?25h
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
TALL_STRING = 10.times.map(&:to_s).join("\n")
|
5
|
+
|
6
|
+
def build(*)
|
7
|
+
WhirledPeas.template do |composer|
|
8
|
+
composer.add_box do |composer, settings|
|
9
|
+
settings.full_border
|
10
|
+
settings.height = 5
|
11
|
+
3.times do |i|
|
12
|
+
composer.add_text { TALL_STRING }
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H┏━━┓[2;1H┃ ┃[3;1H┃ ┃[4;1H┃ ┃[5;1H┃ ┃[6;1H┃ ┃[7;1H┗━━┛[2;2HXO[3;2HXO[4;2HXO[5;2HXO[6;2HXO[0m[24;1H[?25h
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template do |composer|
|
6
|
+
composer.add_box do |composer, settings|
|
7
|
+
settings.flow = :t2b
|
8
|
+
settings.height = 5
|
9
|
+
settings.full_border
|
10
|
+
10.times do
|
11
|
+
composer.add_text { 'XO' }
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H┏━┓[2;1H┃ ┃[3;1H┃ ┃[4;1H┃ ┃[5;1H┃ ┃[6;1H┃ ┃[7;1H┗━┛[2;2H0[3;2H1[4;2H2[5;2H3[6;2H4[0m[24;1H[?25h
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H┏━━━━━━━━━━━━━━━━━━━┓[2;1H┃ ┃[3;1H┃ ┃[4;1H┃ ┃[5;1H┃ ┃[6;1H┃ ┃[7;1H┃ ┃[8;1H┗━━━━━━━━━━━━━━━━━━━┛[4;7H┏━━━━━━━━━┓[5;7H┃ ┃[6;7H┗━━━━━━━━━┛[5;8HInner Box[0m[24;1H[?25h
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template do |composer|
|
6
|
+
composer.add_box do |composer, settings|
|
7
|
+
settings.full_border
|
8
|
+
composer.add_box do |_, settings|
|
9
|
+
settings.set_margin(left: 5, top: 2, right: 3, bottom: 1)
|
10
|
+
settings.full_border
|
11
|
+
'Inner Box'
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[1;1H┏━━━━━━━━━━━━━━━━━━━┓[2;1H┃ ┃[3;1H┃ ┃[4;1H┃ ┃[5;1H┃ ┃[6;1H┗━━━━━━━━━━━━━━━━━━━┛[4;7HPadded Room[0m[24;1H[?25h
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'whirled_peas'
|
2
|
+
|
3
|
+
class TemplateFactory
|
4
|
+
def build(*)
|
5
|
+
WhirledPeas.template do |composer|
|
6
|
+
composer.add_box do |_, settings|
|
7
|
+
settings.full_border
|
8
|
+
settings.set_padding(left: 5, top: 2, right: 3, bottom: 1)
|
9
|
+
"Padded Room"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[?25l[1;1H[J[6;6H[32m┏━━━━━━━┓[0m[7;6H[32m┃ ┃[0m[8;6H[32m┃ ┃[0m[9;6H[32m┃ ┃[0m[10;6H[32m┃ ┃[0m[11;6H[32m┃ ┃[0m[12;6H[32m┃ ┃[0m[13;6H[32m┃ ┃[0m[14;6H[32m┗━━━━━━━┛[0m[7;10H[31m┏━━━[0m[8;10H[31m┃ [0m[9;10H[31m┃ [0m[10;10H[31m┃ [0m[11;10H[31m┃ [0m[12;10H[31m┃ [0m[13;10H[31m┗━━━[0m[8;11H123[9;11H223[10;11H333[11;11H443[12;11H543[0m[24;1H[?25h
|