Added support for merging multiple layout files
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
# Used in the layouts.rb sample in conjunction with custom-layout2.yml
|
||||
frame:
|
||||
x: 38
|
||||
y: 38
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
# Used in the layouts.rb sample in conjunction with custom-layout.yml
|
||||
#
|
||||
# When used with custom-layout.yml loaded first, this layout overrides subtitle
|
||||
subtitle:
|
||||
x: 150
|
||||
y: 150
|
||||
width: 575
|
||||
height: 60
|
||||
align: left
|
||||
valign: middle
|
||||
font_size: 25
|
||||
# This one is completely new
|
||||
description:
|
||||
extends: subtitle
|
||||
y: += 350
|
||||
@@ -32,3 +32,10 @@ Squib::Deck.new(layout: 'custom-layout.yml') do
|
||||
|
||||
save_png prefix: 'layout_'
|
||||
end
|
||||
|
||||
Squib::Deck.new(layout:['custom-layout.yml', 'custom-layout2.yml']) do
|
||||
text str: 'The Title', layout: :title # from custom-layout.yml
|
||||
text str: 'The Subtitle', layout: :subtitle # redefined in custom-layout2.yml
|
||||
text str: 'The Description', layout: :description # from custom-layout2.yml
|
||||
save_png prefix: 'layout2_'
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user