Browse Source

Custom layouts now support ALL options!

dev
Andy Meneely 12 years ago
parent
commit
fad0f93e4a
  1. 4
      lib/squib/input_helpers.rb
  2. 2
      samples/custom-layout.yml

4
lib/squib/input_helpers.rb

@ -29,8 +29,8 @@ module Squib
unless opts[:layout].nil?
entry = @layout[opts[:layout].to_s]
unless entry.nil?
%w(x y width height).each do |p|
opts[p.to_sym] ||= entry[p]
entry.each do |key, value|
opts[key.to_sym] ||= entry[key]
end
else
logger.warn "Layout entry #{opts[:layout]} does not exist."

2
samples/custom-layout.yml

@ -8,6 +8,8 @@ title:
y: 50
width: 625
height: 150
align: !ruby/symbol center
hint: !ruby/symbol cyan
subtitle:
x: 125
y: 150

Loading…
Cancel
Save