Tapi Yg kayak kamu comment di fb
class Window_Time < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 384 - 64, window_width, fitting_height(1))
refresh
end
#--------------------------------------------------------------------------
# * Get Window Width
#--------------------------------------------------------------------------
def window_width
return 160
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
contents.clear
draw_currency_value(value, "", 4, 0, contents.width -
end
#--------------------------------------------------------------------------
# * Get Party Gold
#--------------------------------------------------------------------------
def value
$game_system.playtime_s
end
#--------------------------------------------------------------------------
# * Open Window
#--------------------------------------------------------------------------
def open
refresh
super
end
end
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :pending_index # Pending position (for formation)
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, window_width, window_height)
@pending_index = -1
refresh
end
def col_max
return 2
end
#--------------------------------------------------------------------------
# * Get Window Width
#--------------------------------------------------------------------------
def window_width
Graphics.width - 160
end
#--------------------------------------------------------------------------
# * Get Window Height
#--------------------------------------------------------------------------
def window_height
Graphics.height
end
#--------------------------------------------------------------------------
# * Get Number of Items
#--------------------------------------------------------------------------
def item_max
$game_party.members.size
end
#--------------------------------------------------------------------------
# * Get Item Height
#--------------------------------------------------------------------------
def item_height
384 / 2 # (height - standard_padding * 2)
end
def draw_actor_simple_status(actor, x, y)
contents.font.size = 19
draw_actor_name(actor, x , y)
draw_actor_level(actor, x, y + line_height * 1)
draw_actor_icons(actor, x, y + line_height * 2)
draw_actor_class(actor, x , y - 25 + line_height * 3)
end
#--------------------------------------------------------------------------
# * Draw Item
#--------------------------------------------------------------------------
def draw_item(index)
actor = $game_party.members[index]
enabled = $game_party.battle_members.include?(actor)
rect = item_rect(index)
draw_item_background(index)
case actor
when $game_party.members[0]
draw_actor_simple_status(actor, rect.x + 100, rect.y + line_height / 2)
draw_actor_face(actor, rect.x + 1, rect.y + 1, enabled)
draw_actor_hp(actor, 0, rect.y + 96)
draw_actor_mp(actor, 0, rect.y + 96 + line_height)
when $game_party.members[1]
draw_actor_face(actor, rect.x + 67, rect.y + 1, enabled)
draw_actor_simple_status(actor, rect.x + 2 , rect.y + line_height / 2)
draw_actor_hp(actor, 227, y + 96 )
draw_actor_mp(actor, 227, y + 96 + line_height)
when $game_party.members[2]
draw_actor_simple_status(actor, rect.x + 100, rect.y + line_height / 2)
draw_actor_hp(actor, 0, y + 296 )
draw_actor_mp(actor, 0, y + 296 + line_height)
draw_actor_face(actor, rect.x + 1, rect.y + 1, enabled)
when $game_party.members[3]
draw_actor_simple_status(actor, rect.x + 2 , rect.y + line_height / 2)
draw_actor_hp(actor, 227, y + 296 )
draw_actor_mp(actor, 227, y + 296 + line_height)
draw_actor_face(actor, rect.x + 67, rect.y + 1, enabled)
end
end
end
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs the menu screen processing.
#==============================================================================
class Scene_Menu < Scene_MenuBase
#--------------------------------------------------------------------------
# * Start Processing
#--------------------------------------------------------------------------
def start
super
create_command_window
create_gold_window
create_status_window
create_time_window
update
end
def update
super
@time.refresh
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window
@command_window = Window_MenuCommand.new
@command_window.set_handler(:item, method(:command_item))
@command_window.set_handler(:skill, method(:command_personal))
@command_window.set_handler(:equip, method(:command_personal))
@command_window.set_handler(:status, method(:command_personal))
@command_window.set_handler(:quest, method(:command_quest))
@command_window.set_handler(:save, method(:command_save))
@command_window.set_handler(:game_end, method(:command_game_end))
@command_window.set_handler(:cancel, method(:return_scene))
end
#--------------------------------------------------------------------------
# * Create Gold Window
#--------------------------------------------------------------------------
def create_gold_window
@gold_window = Window_Gold.new
@gold_window.x = 0
@gold_window.y = Graphics.height - @gold_window.height
end
def create_time_window
@time = Window_Time.new
end
#--------------------------------------------------------------------------
# * Create Status Window
#--------------------------------------------------------------------------
def create_status_window
@status_window = Window_MenuStatus.new(@command_window.width, 0)
end
#--------------------------------------------------------------------------
# * [Item] Command
#--------------------------------------------------------------------------
def command_item
SceneManager.call(Scene_Item)
end
#--------------------------------------------------------------------------
# * [Skill], [Equipment] and [Status] Commands
#--------------------------------------------------------------------------
def command_personal
@status_window.select_last
@status_window.activate
@status_window.set_handler(:ok, method(:on_personal_ok))
@status_window.set_handler(:cancel, method(:on_personal_cancel))
end
#--------------------------------------------------------------------------
# * [Formation] Command
#--------------------------------------------------------------------------
def command_quest
Sound.play_buzzer
end
#--------------------------------------------------------------------------
# * [Save] Command
#--------------------------------------------------------------------------
def command_save
SceneManager.call(Scene_Save)
end
#--------------------------------------------------------------------------
# * [Exit Game] Command
#--------------------------------------------------------------------------
def command_game_end
SceneManager.call(Scene_End)
end
#--------------------------------------------------------------------------
# * [OK] Personal Command
#--------------------------------------------------------------------------
def on_personal_ok
case @command_window.current_symbol
when :skill
SceneManager.call(Scene_Skill)
when :equip
SceneManager.call(Scene_Equip)
when :status
SceneManager.call(Scene_Status)
end
end
#--------------------------------------------------------------------------
# * [Cancel] Personal Command
#--------------------------------------------------------------------------
def on_personal_cancel
@status_window.unselect
@command_window.activate
end
end