#==============================================================================# ** Module TDD::Settings::Fonts# ** Module TDD::Settings::Fonts::Colors#------------------------------------------------------------------------------# These modules contain font settings used in other scripts, for easy editing#==============================================================================module TDD module Settings module Fonts module Colors class << self def standard ; Color.new(44, 44, 44, 255) ;end def brown ; Color.new(83, 71, 65, 255) ;end def lighter_brown ; Color.new(103, 88, 80, 255) ;end def creamy ; Color.new(255, 247, 237, 255);end def bright ; Color.new(244, 243, 243, 255);end def black ; Color.new(0, 0, 0, 255) ;end def transparent_black ; Color.new(0, 0, 0, 125) ;end def transparent_bright; Color.new(245, 245, 245, 125);end def orange ; Color.new(215, 65, 19, 255) ;end def green ; Color.new(25, 123, 48, 255) ;end #-------------------------------------------------------------------------- # * Get Color For Item # # - Returns a color based on an item's class #-------------------------------------------------------------------------- def get_color_for_item(item) return orange if item.class == RPG::Weapon return green if item.class == RPG::Armor end end end class << self #-------------------------------------------------------------------------- # * Serif #-------------------------------------------------------------------------- def serif(args={}) args = { :color => colors.standard, :out_color => colors.bright, :outline => true, :shadow => false, :bold => false, :size => 28 }.merge(args) # Setup font with args font = Font.new("Day Roman", args[:size]) set_font_args(font, args) return font end #-------------------------------------------------------------------------- # * Serif Bright, Inverted #-------------------------------------------------------------------------- def serif_bright(args={}) args = { :color => colors.bright, :outline => true, :out_color => colors.transparent_black, :shadow => false }.merge(args) return serif(args) end #-------------------------------------------------------------------------- # * Sans Serif #-------------------------------------------------------------------------- def sans_serif(args={}) args = { :color => colors.standard, :out_color => colors.bright, :outline => true, :shadow => false, :bold => false, :size => 18 }.merge(args) # Setup font with args font = Font.new("VL PGothic", args[:size]) set_font_args(font, args) return font end #-------------------------------------------------------------------------- # * Sans Serif Bright, Inverted #-------------------------------------------------------------------------- def sans_serif_bright(args={}) args = { :color => colors.creamy, :outline => true, :out_color => colors.transparent_black, :shadow => false }.merge(args) return sans_serif(args) end #-------------------------------------------------------------------------- # * Colors Access #-------------------------------------------------------------------------- def colors TDD::Settings::Fonts::Colors end #-------------------------------------------------------------------------- # * Set Font Args in Bulk #-------------------------------------------------------------------------- def set_font_args(font, args) args.each{|key, val| font.send("#{key}=", val)} end end end endend