#==============================================================================
# ■ Window_Command
#------------------------------------------------------------------------------
# 메인 커멘드 메뉴(자작)
#==============================================================================
class Window_Command2 < Window_Selectable
#--------------------------------------------------------------------------
# ● 오브젝트 초기화
# width : 윈도우의 폭
# commands : 커멘드 문자열의 배열
#--------------------------------------------------------------------------
def initialize(time = 0)
# ★time를 추가
super(0, 0, 267, 439, time)
@item_max = $game_party.actors.size + 1
#@commands = commands
self.contents = Bitmap.new(width - 32, height - 32)
#self.active = true
self.index = 0
@column_max = $game_party.actors.size + 1
#self.side_mode = true
refresh
end
#--------------------------------------------------------------------------
# ● 리프레쉬
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 51 * i + 75
y = 48
actor = $game_party.actors[i]
draw_actor_graphic(actor, x, y)
end
end
#--------------------------------------------------------------------------
# ● 커서의 구형 갱신 불요?그렇지만 깎으면 무섭다.
#--------------------------------------------------------------------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(@index * 51, 0, 48, 48)
end
end
# ■ Window_Command
#------------------------------------------------------------------------------
# 메인 커멘드 메뉴(자작)
#==============================================================================
class Window_Command2 < Window_Selectable
#--------------------------------------------------------------------------
# ● 오브젝트 초기화
# width : 윈도우의 폭
# commands : 커멘드 문자열의 배열
#--------------------------------------------------------------------------
def initialize(time = 0)
# ★time를 추가
super(0, 0, 267, 439, time)
@item_max = $game_party.actors.size + 1
#@commands = commands
self.contents = Bitmap.new(width - 32, height - 32)
#self.active = true
self.index = 0
@column_max = $game_party.actors.size + 1
#self.side_mode = true
refresh
end
#--------------------------------------------------------------------------
# ● 리프레쉬
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 51 * i + 75
y = 48
actor = $game_party.actors[i]
draw_actor_graphic(actor, x, y)
end
end
#--------------------------------------------------------------------------
# ● 커서의 구형 갱신 불요?그렇지만 깎으면 무섭다.
#--------------------------------------------------------------------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(@index * 51, 0, 48, 48)
end
end