module BattleIconCommand_Settings
#--------------------------------------------------------------------------
# * Main Settings
#--------------------------------------------------------------------------
Y = 208
Outline = true
#--------------------------------------------------------------------------
# * Icons' Names
#--------------------------------------------------------------------------
Attack = '001-Weapon01'
Skill = '044-Skill01'
Guard = '009-Shield01'
Item = '032-Item01'
end
class Window_BattleActorCommand < Window_Selectable
#--------------------------------------------------------------------------
# * Include Settings
#--------------------------------------------------------------------------
include BattleIconCommand_Settings
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(words)
super(0, Y, 160, 80)
self.contents = Bitmap.new(128, 48)
contents.font.size = 14
self.opacity = 0
@item_max = @column_max = 4
@old = -1
@words = words
@icons = []
[Attack, Skill, Guard, Item].each { |x| @icons << RPG::Cache.icon(x) }
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
if @index != @old
contents.clear
0.upto(3) do |i|
opacity = @index == i ? 255 : 128
contents.blt(8 + i * 32, 18, @icons[i], Rect.new(0, 0, 24, 24), opacity)
if @index == i
if Outline
contents.font.color.set(0, 0, 0)
contents.draw_text(1 + i * 32, 2, 36, 14, @words[i], 1)
contents.draw_text(3 + i * 32, 2, 36, 14, @words[i], 1)
contents.draw_text(2 + i * 32, 1, 36, 14, @words[i], 1)
contents.draw_text(2 + i * 32, 3, 36, 14, @words[i], 1)
contents.font.color = normal_color
end
contents.draw_text(2 + i * 32, 2, 36, 14, @words[i], 1)
end
end
@old = @index
end
end
#--------------------------------------------------------------------------
# * Update Cursor Rectangle
#--------------------------------------------------------------------------
def update_cursor_rect
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
refresh if active
end
end
class Scene_Battle
#--------------------------------------------------------------------------
# * Main
#--------------------------------------------------------------------------
def main
$game_temp.in_battle = true
$game_temp.battle_turn = 0
$game_temp.battle_event_flags.clear
$game_temp.battle_abort = false
$game_temp.battle_main_phase = false
$game_temp.battleback_name = $game_map.battleback_name
$game_temp.forcing_battler = nil
$game_system.battle_interpreter.setup(nil, 0)
@troop_id = $game_temp.battle_troop_id
$game_troop.setup(@troop_id)
s1 = $data_system.words.attack
s2 = $data_system.words.skill
s3 = $data_system.words.guard
s4 = $data_system.words.item
# Begin Slipknot edit
@actor_command_window = Window_BattleActorCommand.new([s1, s2, s3, s4])
# End Slipknot edit
@actor_command_window.back_opacity = 160
@actor_command_window.active = false
@actor_command_window.visible = false
@party_command_window = Window_PartyCommand.new
@help_window = Window_Help.new
@help_window.back_opacity = 160
@help_window.visible = false
@status_window = Window_BattleStatus.new
@message_window = Window_Message.new
@spriteset = Spriteset_Battle.new
@wait_count = 0
if $data_system.battle_transition == ""
Graphics.transition(20)
else
Graphics.transition(40, "Graphics/Transitions/" +
$data_system.battle_transition)
end
start_phase1
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
$game_map.refresh
Graphics.freeze
@actor_command_window.dispose
@party_command_window.dispose
@help_window.dispose
@status_window.dispose
@message_window.dispose
if @skill_window != nil
@skill_window.dispose
end
if @item_window != nil
@item_window.dispose
end
if @result_window != nil
@result_window.dispose
end
@spriteset.dispose
if $scene.is_a?(Scene_Title)
Graphics.transition
Graphics.freeze
end
if $BTEST and not $scene.is_a?(Scene_Gameover)
$scene = nil
end
end
end