@ -5,7 +5,7 @@ Squib::Deck.new do
rect x : 0 , y : 0 , width : 825 , height : 1125 , stroke_width : 2 . 0
rect x : 0 , y : 0 , width : 825 , height : 1125 , stroke_width : 2 . 0
embed_text = 'Take 11 :tool: and gain 2 :health:. Take <b>2</b> :tool: <i>and gain 3 :purse: if level 2.</i>'
embed_text = 'Take 11 :tool: and gain 2 :health:. Take <b>2</b> :tool: <i>and gain 3 :purse: if level 2.</i>'
text ( str : embed_text , font : 'Sans 21 ' ,
text ( str : embed_text , font : 'Sans 7 ' ,
x : 0 , y : 0 , width : 180 , hint : :red ,
x : 0 , y : 0 , width : 180 , hint : :red ,
align : :left , ellipsize : false , justify : false ) do | embed |
align : :left , ellipsize : false , justify : false ) do | embed |
embed . svg key : ':tool:' , width : 28 , height : 28 , file : 'spanner.svg'
embed . svg key : ':tool:' , width : 28 , height : 28 , file : 'spanner.svg'
@ -14,7 +14,7 @@ Squib::Deck.new do
end
end
embed_text = 'Middle align: Take 1 :tool: and gain 2 :health:. Take 2 :tool: and gain 3 :purse:'
embed_text = 'Middle align: Take 1 :tool: and gain 2 :health:. Take 2 :tool: and gain 3 :purse:'
text ( str : embed_text , font : 'Sans 21 ' ,
text ( str : embed_text , font : 'Sans 7 ' ,
x : 200 , y : 0 , width : 180 , height : 300 , valign : :middle ,
x : 200 , y : 0 , width : 180 , height : 300 , valign : :middle ,
align : :left , ellipsize : false , justify : false , hint : :cyan ) do | embed |
align : :left , ellipsize : false , justify : false , hint : :cyan ) do | embed |
embed . svg key : ':tool:' , width : 28 , height : 28 , file : 'spanner.svg'
embed . svg key : ':tool:' , width : 28 , height : 28 , file : 'spanner.svg'
@ -23,7 +23,7 @@ Squib::Deck.new do
end
end
embed_text = 'This :tool: aligns on the bottom properly. :purse:'
embed_text = 'This :tool: aligns on the bottom properly. :purse:'
text ( str : embed_text , font : 'Sans 21 ' ,
text ( str : embed_text , font : 'Sans 7 ' ,
x : 400 , y : 0 , width : 180 , height : 300 , valign : :bottom ,
x : 400 , y : 0 , width : 180 , height : 300 , valign : :bottom ,
align : :left , ellipsize : false , justify : false , hint : :green ) do | embed |
align : :left , ellipsize : false , justify : false , hint : :green ) do | embed |
embed . svg key : ':tool:' , width : 28 , height : 28 , file : 'spanner.svg'
embed . svg key : ':tool:' , width : 28 , height : 28 , file : 'spanner.svg'
@ -32,14 +32,14 @@ Squib::Deck.new do
end
end
embed_text = 'Yes, this wraps strangely. We are trying to determine the cause. These are 1 :tool::tool::tool: and these are multiple :tool::tool: :tool::tool:'
embed_text = 'Yes, this wraps strangely. We are trying to determine the cause. These are 1 :tool::tool::tool: and these are multiple :tool::tool: :tool::tool:'
text ( str : embed_text , font : 'Sans 18 ' ,
text ( str : embed_text , font : 'Sans 6 ' ,
x : 600 , y : 0 , width : 180 , height : 300 , wrap : :word_char ,
x : 600 , y : 0 , width : 180 , height : 300 , wrap : :word_char ,
align : :left , ellipsize : false , justify : false , hint : :cyan ) do | embed |
align : :left , ellipsize : false , justify : false , hint : :cyan ) do | embed |
embed . svg key : ':tool:' , width : 28 , height : 28 , file : 'spanner.svg'
embed . svg key : ':tool:' , width : 28 , height : 28 , file : 'spanner.svg'
end
end
embed_text = ':tool:Justify will :tool: work too, and :purse: with more words just for fun'
embed_text = ':tool:Justify will :tool: work too, and :purse: with more words just for fun'
text ( str : embed_text , font : 'Sans 21 ' ,
text ( str : embed_text , font : 'Sans 7 ' ,
x : 0 , y : 320 , width : 180 , height : 300 , valign : :bottom ,
x : 0 , y : 320 , width : 180 , height : 300 , valign : :bottom ,
align : :left , ellipsize : false , justify : true , hint : :magenta ) do | embed |
align : :left , ellipsize : false , justify : true , hint : :magenta ) do | embed |
embed . svg key : ':tool:' , width : 28 , height : 28 , file : 'spanner.svg'
embed . svg key : ':tool:' , width : 28 , height : 28 , file : 'spanner.svg'
@ -48,7 +48,7 @@ Squib::Deck.new do
end
end
embed_text = 'Right-aligned works :tool: with :health: and :purse:'
embed_text = 'Right-aligned works :tool: with :health: and :purse:'
text ( str : embed_text , font : 'Sans 21 ' ,
text ( str : embed_text , font : 'Sans 7 ' ,
x : 200 , y : 320 , width : 180 , height : 300 , valign : :bottom ,
x : 200 , y : 320 , width : 180 , height : 300 , valign : :bottom ,
align : :right , ellipsize : false , justify : false , hint : :magenta ) do | embed |
align : :right , ellipsize : false , justify : false , hint : :magenta ) do | embed |
embed . svg key : ':tool:' , width : 28 , height : 28 , file : 'spanner.svg'
embed . svg key : ':tool:' , width : 28 , height : 28 , file : 'spanner.svg'
@ -57,7 +57,7 @@ Squib::Deck.new do
end
end
embed_text = ':tool:Center-aligned works :tool: with :health: and :purse:'
embed_text = ':tool:Center-aligned works :tool: with :health: and :purse:'
text ( str : embed_text , font : 'Sans 21 ' ,
text ( str : embed_text , font : 'Sans 7 ' ,
x : 400 , y : 320 , width : 180 , height : 300 ,
x : 400 , y : 320 , width : 180 , height : 300 ,
align : :center , ellipsize : false , justify : false , hint : :magenta ) do | embed |
align : :center , ellipsize : false , justify : false , hint : :magenta ) do | embed |
embed . svg key : ':tool:' , width : 28 , height : 28 , data : File . read ( 'spanner.svg' )
embed . svg key : ':tool:' , width : 28 , height : 28 , data : File . read ( 'spanner.svg' )
@ -66,7 +66,7 @@ Squib::Deck.new do
end
end
embed_text = 'Markup --- and typography replacements --- with ":tool:" icons <i>won\'t</i> fail'
embed_text = 'Markup --- and typography replacements --- with ":tool:" icons <i>won\'t</i> fail'
text ( str : embed_text , font : 'Serif 18 ' , markup : true ,
text ( str : embed_text , font : 'Serif 6 ' , markup : true ,
x : 600 , y : 320 , width : 180 , height : 300 ,
x : 600 , y : 320 , width : 180 , height : 300 ,
align : :center , hint : :magenta ) do | embed |
align : :center , hint : :magenta ) do | embed |
embed . svg key : ':tool:' , width : 28 , height : 28 , file : 'spanner.svg'
embed . svg key : ':tool:' , width : 28 , height : 28 , file : 'spanner.svg'
@ -74,18 +74,18 @@ Squib::Deck.new do
embed_text = ':tool:' # JUST the icon
embed_text = ':tool:' # JUST the icon
text ( str : embed_text , x : 0 , y : 640 , width : 180 , height : 50 , markup : true ,
text ( str : embed_text , x : 0 , y : 640 , width : 180 , height : 50 , markup : true ,
font : 'Arial 21 ' , align : :center , valign : :middle , hint : :red ) do | embed |
font : 'Arial 7 ' , align : :center , valign : :middle , hint : :red ) do | embed |
embed . svg key : ':tool:' , width : 28 , height : 28 , file : 'spanner.svg'
embed . svg key : ':tool:' , width : 28 , height : 28 , file : 'spanner.svg'
end
end
embed_text = ':purse:' # JUST the icon
embed_text = ':purse:' # JUST the icon
text ( str : embed_text , x : 200 , y : 640 , width : 180 , height : 50 , markup : true ,
text ( str : embed_text , x : 200 , y : 640 , width : 180 , height : 50 , markup : true ,
font : 'Arial 21 ' , align : :center , valign : :middle , hint : :red ) do | embed |
font : 'Arial 7 ' , align : :center , valign : :middle , hint : :red ) do | embed |
embed . png key : ':purse:' , width : 28 , height : 28 , file : 'shiny-purse.png'
embed . png key : ':purse:' , width : 28 , height : 28 , file : 'shiny-purse.png'
end
end
embed_text = " :tool: Death to Nemesis bug 103!! :purse: "
embed_text = " :tool: Death to Nemesis bug 103!! :purse: "
text ( str : embed_text , font : 'Sans Bold 24 ' , stroke_width : 2 ,
text ( str : embed_text , font : 'Sans Bold 8 ' , stroke_width : 2 ,
color : :red , stroke_color : :blue , dash : '3 3' , align : :left ,
color : :red , stroke_color : :blue , dash : '3 3' , align : :left ,
valign : :middle , x : 0 , y : 700 , width : 380 , height : 150 ,
valign : :middle , x : 0 , y : 700 , width : 380 , height : 150 ,
hint : :magenta ) do | embed |
hint : :magenta ) do | embed |
@ -94,7 +94,7 @@ Squib::Deck.new do
end
end
embed_text = 'You can adjust the icon with dx and dy. Normal: :tool: Adjusted: :heart:'
embed_text = 'You can adjust the icon with dx and dy. Normal: :tool: Adjusted: :heart:'
text ( str : embed_text , font : 'Sans 18 ' , x : 400 , y : 640 , width : 180 ,
text ( str : embed_text , font : 'Sans 6 ' , x : 400 , y : 640 , width : 180 ,
height : 300 , hint : :magenta ) do | embed |
height : 300 , hint : :magenta ) do | embed |
embed . svg key : ':tool:' , width : 28 , height : 28 , file : 'spanner.svg'
embed . svg key : ':tool:' , width : 28 , height : 28 , file : 'spanner.svg'
embed . svg key : ':heart:' , width : 28 , height : 28 , dx : 10 , dy : 10 ,
embed . svg key : ':heart:' , width : 28 , height : 28 , dx : 10 , dy : 10 ,
@ -102,7 +102,7 @@ Squib::Deck.new do
end
end
embed_text = " Native sizes work too \n :tool: \n \n \n \n \n \n :shiny-purse: \n \n \n \n \n \n :tool2: "
embed_text = " Native sizes work too \n :tool: \n \n \n \n \n \n :shiny-purse: \n \n \n \n \n \n :tool2: "
text ( str : embed_text , font : 'Sans 18 ' , x : 600 , y : 640 , width : 180 ,
text ( str : embed_text , font : 'Sans 6 ' , x : 600 , y : 640 , width : 180 ,
height : 475 , hint : :magenta ) do | embed |
height : 475 , hint : :magenta ) do | embed |
embed . svg key : ':tool:' , width : :native , height : :native ,
embed . svg key : ':tool:' , width : :native , height : :native ,
file : 'spanner.svg'
file : 'spanner.svg'
@ -118,7 +118,7 @@ end
Squib :: Deck . new ( cards : 3 ) do
Squib :: Deck . new ( cards : 3 ) do
background color : :white
background color : :white
str = 'Take 1 :tool: and gain 2 :health:.'
str = 'Take 1 :tool: and gain 2 :health:.'
text ( str : str , font : 'Sans' , font_size : [ 18 , 26 , 3 5] ,
text ( str : str , font : 'Sans' , font_size : [ 6 , 8 . 5 , 11 . 5 ] ,
x : 0 , y : 0 , width : 180 , height : 300 , valign : :bottom ,
x : 0 , y : 0 , width : 180 , height : 300 , valign : :bottom ,
align : :left , ellipsize : false , justify : false , hint : :cyan ) do | embed |
align : :left , ellipsize : false , justify : false , hint : :cyan ) do | embed |
embed . svg key : ':tool:' , width : [ 28 , 42 , 56 ] , height : [ 28 , 42 , 56 ] , file : 'spanner.svg'
embed . svg key : ':tool:' , width : [ 28 , 42 , 56 ] , height : [ 28 , 42 , 56 ] , file : 'spanner.svg'