HUNTERVie Sep 14, 2012 4:26 pm
Super Usuario
Bueno es una modificacion del Menu original del Scene_Menu y le di un aspecto Final Fantasy 7
PROXIMAS MEJORAS:
Añadir Barras del Siguiente Nivel
Añadir Cursor en el Menu
Añadir Tiempo del Juego
SCREEN:
SCRIPT:
Un saludo.
PROXIMAS MEJORAS:
Añadir Barras del Siguiente Nivel
Añadir Cursor en el Menu
Añadir Tiempo del Juego
SCREEN:
SCRIPT:
- Código:
#--------------------------------------------------------------------------
# Creado por:HUNTER - Nombre:Menu Similar a Final Fantasy 7 - Version:1.0
#--------------------------------------------------------------------------
# Web del Autor:http://www.hunter-maker.net/
#---------------------------------------------------------------------------
# Muestra la ubicacion del Mapa
#---------------------------------------------------------------------------
class HUN_Location < Window_Base
def initialize(x=0, y=0)
super(x, y, 160, 80)
refresh
end
def refresh
self.contents.clear
self.contents.font.size = 18
self.contents.font.bold = true
self.contents.draw_text(0, -5, 150, 32, "Ubicacion")
data = load_data("Data/MapInfos.rvdata2")
self.contents.draw_text(0, 25, self.width, 32, data[$game_map.map_id].name)
end
end
class Window_Base < Window
#-------------------------------------------------------------------------------
module HUNTER
#===============================================================================
#-------------------------------------------------------------------------------
# INICIO DE LA OPACIDAD DE VENTENA
#===============================================================================
#Seleccione la opacidad de la ventana
OPACITY = 255
end
#-------------------------------------------------------------------------------
alias hunter_initialize initialize
def initialize(x, y, width, height)
super
self.windowskin = Cache.system("Window")
self.back_opacity = HUNTER::OPACITY
update_padding
update_tone
create_contents
@opening = @closing = false
end
end
#--------------------------------------------------------------------------
class Scene_Menu < Scene_MenuBase
#--------------------------------------------------------------------------
# Inicio
#--------------------------------------------------------------------------
def start
super
create_command_window
create_gold_window
create_status_window
@local = HUN_Location.new(384, 336)
end
#--------------------------------------------------------------------------
# Comandos del juego
#--------------------------------------------------------------------------
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(:formation, method(:command_formation))
@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))
@command_window.x = 384
end
#--------------------------------------------------------------------------
# Crea la Gold en el Mneu
#--------------------------------------------------------------------------
def create_gold_window
@gold_window = Window_Gold.new
@gold_window.x = 384
@gold_window.y = 288
end
#--------------------------------------------------------------------------
# Crea el estado del menu
#--------------------------------------------------------------------------
def create_status_window
@status_window = Window_MenuStatus.new(@command_window.width, 0)
@status_window.x = 0
end
#--------------------------------------------------------------------------
# Crea el comando de Objetos
#--------------------------------------------------------------------------
def command_item
SceneManager.call(Scene_Item)
end
#--------------------------------------------------------------------------
# Comandos Personales
#--------------------------------------------------------------------------
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
#--------------------------------------------------------------------------
# Informacion de comandos
#--------------------------------------------------------------------------
def command_formation
@status_window.select_last
@status_window.activate
@status_window.set_handler(:ok, method(:on_formation_ok))
@status_window.set_handler(:cancel, method(:on_formation_cancel))
end
#--------------------------------------------------------------------------
# Comandos de Guardado
#--------------------------------------------------------------------------
def command_save
SceneManager.call(Scene_Save)
end
#--------------------------------------------------------------------------
# Comandos de fin del juego
#--------------------------------------------------------------------------
def command_game_end
SceneManager.call(Scene_End)
end
#--------------------------------------------------------------------------
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
#--------------------------------------------------------------------------
def on_personal_cancel
@status_window.unselect
@command_window.activate
end
#--------------------------------------------------------------------------
def on_formation_ok
if @status_window.pending_index >= 0
$game_party.swap_order(@status_window.index,
@status_window.pending_index)
@status_window.pending_index = -1
@status_window.redraw_item(@status_window.index)
else
@status_window.pending_index = @status_window.index
end
@status_window.activate
end
#--------------------------------------------------------------------------
def on_formation_cancel
if @status_window.pending_index >= 0
@status_window.pending_index = -1
@status_window.activate
else
@status_window.unselect
@command_window.activate
end
end
end
Un saludo.