Module: GamesParadise::Fallout
- Defined in:
- lib/games_paradise/fallout/web_related_code.rb
Constant Summary collapse
- FAVICON_TO_USE =
#
FAVICON_TO_USE
#
'games/fallout/FALLOUT_FAVICON.png'
- FONT_SIZE =
#
FONT_SIZE
#
'1.00em'
- BODY_CSS_CLASS =
#
BODY_CSS_CLASS
#
'wid99 pad2px s4px BG_Black White'
- MAIN_CSS_STYLE =
#
MAIN_CSS_STYLE
#
' li { black; } a:link { color:darkblue; } a:visited { color:darkblue; } a:hover { color:slateblue;text-decoration: underline overline; } body { font-weight: 400; margin:0px; padding: 0px; background-color:black; color:white; font-size: '+FONT_SIZE+'; font-family: Arial,Garamond,Tahoma,sans-serif; } pre { font-weight: 400; font-size:'+FONT_SIZE+'; font-family: Arial,Garamond,Tahoma,sans-serif; } p { width: 96%; } '
Instance Method Summary collapse
-
#cliner ⇒ Object
# === cliner ========================================================================= #.
-
#header(i, optional_image = '') ⇒ Object
(also: #top_header)
# === header.
-
#header_small(i, try_to_append_a_colon = false) ⇒ Object
(also: #small_header)
# === header_small ========================================================================= #.
-
#lightblue_header(title) ⇒ Object
(also: #header_lightblue)
# === lightblue_header ========================================================================= #.
-
#stat_gain(change_of_the_skill, name_of_the_skill) ⇒ Object
# === stat_gain ========================================================================= #.
-
#weapon_image(location, return_or_output = :output) ⇒ Object
# === weapon_image ========================================================================= #.
-
#xp(i, optional_css = '') ⇒ Object
(also: #yellow_xp)
# === xp.
Instance Method Details
#cliner ⇒ Object
#
cliner
#
87 88 89 |
# File 'lib/games_paradise/fallout/web_related_code.rb', line 87 def cliner e '------------' end |
#header(i, optional_image = '') ⇒ Object Also known as: top_header
#
header
All in-page headers will use this common format header.
#
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/games_paradise/fallout/web_related_code.rb', line 66 def header(i, optional_image = '') _ = ''.dup # Do not freeze the String. unless optional_image.empty? _ << sg( optional_image, 'bblack1 marl1em', 'drag_'+ File.basename(i).downcase. delete_suffix(File.extname(i)).tr(' ','_') ) end h1 sg(:vogel,'marr1em','drag_vogel')+ i+_, 'mart1px yel BOLD pad0_3em marb3px mar2px gold', i.gsub(/ /,''), 'padding-bottom: 2px' end |
#header_small(i, try_to_append_a_colon = false) ⇒ Object Also known as: small_header
#
header_small
#
101 102 103 104 105 106 107 108 |
# File 'lib/games_paradise/fallout/web_related_code.rb', line 101 def header_small( i, try_to_append_a_colon = false ) if try_to_append_a_colon i << ':' unless i.end_with? ':' # Unsure whether to add a ':' character. end h3 i, 'gold' end |
#lightblue_header(title) ⇒ Object Also known as: header_lightblue
#
lightblue_header
#
94 95 96 |
# File 'lib/games_paradise/fallout/web_related_code.rb', line 94 def lightblue_header(title) h4 title,'lightblue' end |
#stat_gain(change_of_the_skill, name_of_the_skill) ⇒ Object
#
stat_gain
#
139 140 141 142 143 144 145 |
# File 'lib/games_paradise/fallout/web_related_code.rb', line 139 def stat_gain( change_of_the_skill, name_of_the_skill ) e sg(:axe,'mar2px marr5px')+ 'Der '+name_of_the_skill+' skill verändert sich um <b>'+ change_of_the_skill+'</b>.' end |
#weapon_image(location, return_or_output = :output) ⇒ Object
#
weapon_image
#
113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/games_paradise/fallout/web_related_code.rb', line 113 def weapon_image( location, return_or_output = :output ) string = "<img src=\"../../images/games/FALLOUT/#{location}\" style=\"margin:5px\">" case return_or_output when :output ee string else return string end end |
#xp(i, optional_css = '') ⇒ Object Also known as: yellow_xp
#
xp
Use this if you wish to designate how much XP a given task yields.
#
130 131 132 133 134 |
# File 'lib/games_paradise/fallout/web_related_code.rb', line 130 def xp( i, optional_css = '' ) '<span class="yel BOLD '+optional_css.to_s+'">+'+i.to_s+'XP</span>' end |