rebf-gaiden/Scripts/_.3.rb
2025-04-26 17:06:34 -05:00

62 lines
2.5 KiB
Ruby
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#******************************************************************************
#
# 縁取り色の自動調整
#
# --------------------------------------------------------------------------
# バージョン 1.0.1
# 対 応 RPGツクールVX Ace : RGSS3
# 制 作 者
# 配 布 元 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