#==============================================================================
# ■ 顔グラを右にも表示させる by 貪藻矢射妥←
#------------------------------------------------------------------------------
# 顔グラを左だけじゃなく、右にも表示させます。
#
# $game_system.face_mirror = true
# の後にメッセージを表示で顔グラを選ぶと顔グラの表示位置が左から右になります。
#
# 通常に戻したい場合は
# $game_system.face_mirror = false
# にすることで元に戻せます
#
#==============================================================================
class Game_System
attr_accessor :face_mirror
end
class Window_Base < Window
#--------------------------------------------------------------------------
# ● 顔グラフィックの描画
# face_name : 顔グラフィック ファイル名
# face_index : 顔グラフィック インデックス
# x : 描画先 X 座標
# y : 描画先 Y 座標
# size : 表示サイズ
#--------------------------------------------------------------------------
def draw_face(face_name, face_index, x, y, size = 96)
bitmap = Cache.face(face_name)
rect = Rect.new(0, 0, 0, 0)
rect.x = face_index % 4 * 96 + (96 - size) / 2
rect.y = face_index / 4 * 96 + (96 - size) / 2
rect.width = size
rect.height = size
if $game_system.face_mirror == true
self.contents.blt(x + 412, y, bitmap, rect)
else
self.contents.blt(x, y, bitmap, rect)
end
bitmap.dispose
end
end
class Window_Message < Window_Selectable
#--------------------------------------------------------------------------
# ● 改ページ処理
#--------------------------------------------------------------------------
def new_page
contents.clear
if $game_message.face_name.empty?
@contents_x = 0
else
name = $game_message.face_name
index = $game_message.face_index
draw_face(name, index, 0, 0)
if $game_system.face_mirror == true
@contents_x = 0
else
@contents_x = 112
end
end
@contents_y = 0
@line_count = 0
@show_fast = false
@line_show_fast = false
@pause_skip = false
contents.font.color = text_color(0)
end
#--------------------------------------------------------------------------
# ● 改行処理
#--------------------------------------------------------------------------
def new_line
if $game_message.face_name.empty?
@contents_x = 0
else
if $game_system.face_mirror == true
@contents_x = 0
else
@contents_x = 112
end
end
@contents_y += WLH
@line_count += 1
@line_show_fast = false
end
end
|