62 lines
2.5 KiB
Ruby
62 lines
2.5 KiB
Ruby
#******************************************************************************
|
||
#
|
||
# * 縁取り色の自動調整
|
||
#
|
||
# --------------------------------------------------------------------------
|
||
# バージョン : 1.0.1
|
||
# 対 応 : RPGツクールVX Ace : RGSS3
|
||
# 制 作 者 : CACAO
|
||
# 配 布 元 : http://cacaosoft.web.fc2.com/
|
||
# --------------------------------------------------------------------------
|
||
# == 概 要 ==
|
||
#
|
||
# : 縁取りの色を自動で文字の色より暗めの色に変更します。
|
||
#
|
||
# --------------------------------------------------------------------------
|
||
# == 注意事項 ==
|
||
#
|
||
# ※ 組み込みクラス Bitmap#draw_text を再定義しています。
|
||
#
|
||
#
|
||
#******************************************************************************
|
||
|
||
#==============================================================================
|
||
# ◆ 設定項目
|
||
#==============================================================================
|
||
module CAO
|
||
module Border
|
||
|
||
#--------------------------------------------------------------------------
|
||
# ◇ 縁取りの色の不透明度
|
||
#--------------------------------------------------------------------------
|
||
OUTLINE_ALPHA = 255
|
||
|
||
end # module Border
|
||
end # module CAO
|
||
|
||
|
||
#/////////////////////////////////////////////////////////////////////////////#
|
||
# #
|
||
# 下記のスクリプトを変更する必要はありません。 #
|
||
# #
|
||
#/////////////////////////////////////////////////////////////////////////////#
|
||
|
||
|
||
class Bitmap
|
||
#--------------------------------------------------------------------------
|
||
# ● 別名定義
|
||
#--------------------------------------------------------------------------
|
||
alias _cao_border_draw_text draw_text
|
||
#--------------------------------------------------------------------------
|
||
# 〇 新 draw_text
|
||
#--------------------------------------------------------------------------
|
||
def draw_text(*args)
|
||
if self.font.outline
|
||
self.font.out_color.red = self.font.color.red / 3
|
||
self.font.out_color.green = self.font.color.green / 3
|
||
self.font.out_color.blue = self.font.color.blue / 3
|
||
self.font.out_color.alpha = CAO::Border::OUTLINE_ALPHA
|
||
end
|
||
_cao_border_draw_text(*args)
|
||
end
|
||
end
|