Module: GamesAndRpgParadise::Colours

Overview

GamesAndRpgParadise::Colours

Constant Summary collapse

WHITE =
#

GamesAndRpgParadise::Colours::WHITE

This constant appears to have been in use for shakes-and-fidget. It no longer seems that important, but in the event other components of the games_and_rpg_paradise need it, it will be retained here.

#
"\e[0;37m"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.convert_colour(colour) ⇒ Object

#

GamesAndRpgParadise::Colours.convert_colour

#


51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/games_and_rpg_paradise/colours/colours.rb', line 51

def self.convert_colour(colour)
  _ = ''
  case colour
  when 'boldred','red'
    _ << ::Colours::BOLDRED
  when 'brown'
    _ << ::Colours::YELLOW
  when 'yel','yellow'
    _ << ::Colours::BOLDYELLOW
  when 'green'
    _ << ::Colours::GREEN
  when 'lightblue'
    _ << ::Colours::LIGHTBLUE
  when 'pink'
    _ << ::Colours::PINK
  end
  return _
end

Instance Method Details

#brown(i = '') ⇒ Object



89
# File 'lib/games_and_rpg_paradise/colours/colours.rb', line 89

def brown(i = '');  convert_colour('brown')+i.to_s;     end

#cfile(i = '') ⇒ Object



87
# File 'lib/games_and_rpg_paradise/colours/colours.rb', line 87

def cfile(i = '');  convert_colour('boldred')+i.to_s;   end

#convert_colour(i) ⇒ Object Also known as: return_colour

#

convert_colour

#


73
74
75
# File 'lib/games_and_rpg_paradise/colours/colours.rb', line 73

def convert_colour(i)
  GamesAndRpgParadise::Colours.convert_colour(i)
end

#fancy(i = '') ⇒ Object Also known as: cfancy, blue



81
# File 'lib/games_and_rpg_paradise/colours/colours.rb', line 81

def fancy(i = '');  convert_colour('lightblue')+i.to_s; end

#normal(i = '') ⇒ Object Also known as: cnormal, rev



84
# File 'lib/games_and_rpg_paradise/colours/colours.rb', line 84

def normal(i = ''); convert_colour('green')+i.to_s;     end

#pink(i = '') ⇒ Object



90
# File 'lib/games_and_rpg_paradise/colours/colours.rb', line 90

def pink(i = '');   convert_colour('pink')+i.to_s;      end

#red(i = '') ⇒ Object



88
# File 'lib/games_and_rpg_paradise/colours/colours.rb', line 88

def red(i = '');    convert_colour('red')+i.to_s;       end

#yel(i = '') ⇒ Object

#

Next come the various colour codes.

#


80
# File 'lib/games_and_rpg_paradise/colours/colours.rb', line 80

def yel(i = '');    convert_colour('yellow')+i.to_s;    end