Prettier condition box
This commit is contained in:
parent
917ebb67d4
commit
7d25c3709c
BIN
VTCGoblinHand.ttf
Normal file
BIN
VTCGoblinHand.ttf
Normal file
Binary file not shown.
BIN
VTCGoblinHandBold.ttf
Normal file
BIN
VTCGoblinHandBold.ttf
Normal file
Binary file not shown.
BIN
VTCGoblinHandItalic.ttf
Normal file
BIN
VTCGoblinHandItalic.ttf
Normal file
Binary file not shown.
BIN
VTCGoblinHandSC.ttf
Normal file
BIN
VTCGoblinHandSC.ttf
Normal file
Binary file not shown.
BIN
conditionbox.png
Normal file
BIN
conditionbox.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
@ -1,5 +1,6 @@
|
||||
require "prawn"
|
||||
require "prawn/grouping"
|
||||
require "prawn/table"
|
||||
require "pry"
|
||||
|
||||
require_relative "spell"
|
||||
@ -116,6 +117,11 @@ class ShardsOfPower
|
||||
},
|
||||
"Lilith" => {
|
||||
:normal => "lilith.ttf"
|
||||
},
|
||||
"Goblin Hand" => {
|
||||
:normal => "VTCGoblinHand.ttf",
|
||||
:bold => "VTCGoblinHandBold.ttf",
|
||||
:italic => "VTCGoblinHandItalic.ttf"
|
||||
}
|
||||
)
|
||||
|
||||
@ -276,8 +282,18 @@ class ShardsOfPower
|
||||
@pdf.outline.section condition.name, :destination => @pdf.page_number
|
||||
end
|
||||
|
||||
condition_ary = [{:text => condition.name, :font => "Lilith", :color => "004E6D", :size => FONT_SIZE_SUBSECTION}]
|
||||
pdf.formatted_text condition_ary
|
||||
pdf.image "conditionbox.png", :position => :center
|
||||
pdf.move_up 30
|
||||
|
||||
pdf.font "Goblin Hand"
|
||||
pdf.font_size FONT_SIZE_SUBSECTION
|
||||
pdf.fill_color "FFFFFF"
|
||||
pdf.text condition.name, :align => :center
|
||||
|
||||
pdf.move_down 10
|
||||
pdf.font "Goudy"
|
||||
pdf.fill_color "000000"
|
||||
pdf.font_size FONT_SIZE_BODY
|
||||
|
||||
pdf.text condition.rules_text, :inline_format => true
|
||||
pdf.text "<b>Possible Sources:</b> #{condition.possible_sources}", :inline_format => true if condition.possible_sources
|
||||
@ -301,8 +317,27 @@ class ShardsOfPower
|
||||
@pdf.outline.section tilt.full_title, :destination => @pdf.page_number
|
||||
end
|
||||
|
||||
tilt_ary = [{:text => tilt.full_title, :font => "Lilith", :color => "004E6D", :size => FONT_SIZE_SUBSECTION}]
|
||||
pdf.formatted_text tilt_ary
|
||||
pdf.image "conditionbox.png", :position => :center
|
||||
|
||||
pdf.font "Goblin Hand"
|
||||
pdf.fill_color "FFFFFF"
|
||||
pdf.font_size FONT_SIZE_SUBSECTION
|
||||
if tilt.environmental?
|
||||
pdf.move_up 35
|
||||
pdf.text tilt.name, :align => :center
|
||||
pdf.font_size FONT_SIZE_BODY
|
||||
pdf.text "(Environmental)", :align => :center
|
||||
else
|
||||
pdf.move_up 30
|
||||
pdf.text tilt.name, :align => :center
|
||||
end
|
||||
|
||||
|
||||
|
||||
pdf.move_down 10
|
||||
pdf.font "Goudy"
|
||||
pdf.fill_color "000000"
|
||||
pdf.font_size FONT_SIZE_BODY
|
||||
|
||||
pdf.text tilt.rules_text, :inline_format => true
|
||||
pdf.text "<b>Effect:</b> #{tilt.effect}", :inline_format => true
|
||||
|
Loading…
Reference in New Issue
Block a user