O TEMA DO FÓRUM ESTÁ EM MANUTENÇÃO. FEEDBACKS AQUI: ACESSAR

Simple Custom Menu for Horror-style games

Iniciado por Doiza, 20/01/2016 às 14:59

20/01/2016 às 14:59 Última edição: 24/04/2019 às 23:33 por Doiza
Simple Custom Menu for Horror-style games


[box class=titlebg]
O que faz
[/box]

Um menu bem simples que só possui as opções de Save, Itens e sair.

[box class=titlebg]
Instruções
[/box]

Cole acima do Main.

[box class=titlebg]
Screenshots
[/box]



[box class=titlebg]
Script
[/box]

#===============================================================================
# YIA Simple Menu (requested by GreyInvidia)
# By YesImAaron
#
# IF USED MUST CREDIT
# YesImAaron
#===============================================================================
# This script set's up a simple menu at the bottom center of the screen
# The only commands in the menu are Items Save and Exit.
#===============================================================================
#===============================================================================
module YIA

#===============================================================================
# XPOS = x position of the menu
# YPOS = y position of the menu
# WIDTH = width of the menu
#===============================================================================
XPOS = 130
YPOS = 350
WIDTH = 300

end
#===============================================================================
# EDIT PAST HERE AT YOUR OWN RISK
#==============================================================================
# ** Window_YIA_Menu
#------------------------------------------------------------------------------
# This set's up the command window
#==============================================================================

class Window_YIA_Menu < Window_HorzCommand
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(x, y, width)
    @window_width = width
    super(x, y)
  end
  #--------------------------------------------------------------------------
  # * Get Window Width
  #--------------------------------------------------------------------------
  def window_width
    @window_width
  end
  #--------------------------------------------------------------------------
  # * Get Digit Count
  #--------------------------------------------------------------------------
  def col_max
    return 3
  end
  #--------------------------------------------------------------------------
  # * Create Command List
  #--------------------------------------------------------------------------
  def make_command_list
    add_command(Vocab::item,   :item)
    add_command(Vocab::save, :save)
    add_command(Vocab::game_end,    :game_end)
  end
end


class Scene_Map < Scene_Base
  #--------------------------------------------------------------------------
  # * Call Menu Screen
  #--------------------------------------------------------------------------
  alias :yia_call_menu call_menu
  def call_menu
    yia_call_menu
    Sound.play_ok
    SceneManager.call(Scene_YIA_Menu)
    Window_MenuCommand::init_command_position
  end  
  end

class Scene_YIA_Menu < Scene_MenuBase
  #--------------------------------------------------------------------------
  # * Start Processing
  #--------------------------------------------------------------------------
  def start
    super
    create_command_window
  end
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    @command_window = Window_YIA_Menu.new(YIA::XPOS,YIA::YPOS,YIA::WIDTH)
    @command_window.set_handler(:item,      method(:command_item))
    @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
  #--------------------------------------------------------------------------
  # * [Item] Command
  #--------------------------------------------------------------------------
  def command_item
    SceneManager.call(Scene_Item)
  end
  #--------------------------------------------------------------------------
  # * [Save] Command
  #--------------------------------------------------------------------------
  def command_save
    SceneManager.call(Scene_Save)
  end
  #--------------------------------------------------------------------------
  # * [Exit Game] Command
  #--------------------------------------------------------------------------
  def command_game_end
    SceneManager.call(Scene_End)
  end
  #--------------------------------------------------------------------------
  # * Return to Calling Scene
  #--------------------------------------------------------------------------
  def return_scene
    SceneManager.call(Scene_Map)
  end
end


Versão sem save:
#===============================================================================
# YIA Simple Menu (requested by GreyInvidia)
# By YesImAaron
#
# IF USED MUST CREDIT
# YesImAaron
#===============================================================================
# This script set's up a simple menu at the bottom center of the screen
# The only commands in the menu are Items Save and Exit.
#===============================================================================
#===============================================================================
module YIA
 
#===============================================================================
# XPOS = x position of the menu
# YPOS = y position of the menu
# WIDTH = width of the menu
#===============================================================================
XPOS = 175
YPOS = 350
WIDTH = 200
 
end
#===============================================================================
# EDIT PAST HERE AT YOUR OWN RISK
#==============================================================================
# ** Window_YIA_Menu
#------------------------------------------------------------------------------
# This set's up the command window
#==============================================================================
 
class Window_YIA_Menu < Window_HorzCommand
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(x, y, width)
    @window_width = width
    super(x, y)
  end
  #--------------------------------------------------------------------------
  # * Get Window Width
  #--------------------------------------------------------------------------
  def window_width
    @window_width
  end
  #--------------------------------------------------------------------------
  # * Get Digit Count
  #--------------------------------------------------------------------------
  def col_max
    return 2
  end
  #--------------------------------------------------------------------------
  # * Create Command List
  #--------------------------------------------------------------------------
  def make_command_list
    add_command(Vocab::item,   :item)
    add_command(Vocab::game_end,    :game_end)
  end
end
 
 
class Scene_Map < Scene_Base
  #--------------------------------------------------------------------------
  # * Call Menu Screen
  #--------------------------------------------------------------------------
  alias :yia_call_menu call_menu
  def call_menu
    yia_call_menu
    Sound.play_ok
    SceneManager.call(Scene_YIA_Menu)
    Window_MenuCommand::init_command_position
  end  
  end
 
class Scene_YIA_Menu < Scene_MenuBase
  #--------------------------------------------------------------------------
  # * Start Processing
  #--------------------------------------------------------------------------
  def start
    super
    create_command_window
  end
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    @command_window = Window_YIA_Menu.new(YIA::XPOS,YIA::YPOS,YIA::WIDTH)
    @command_window.set_handler(:item,      method(:command_item))
    @command_window.set_handler(:game_end,  method(:command_game_end))
    @command_window.set_handler(:cancel,    method(:return_scene))
  end
  #--------------------------------------------------------------------------
  # * [Item] Command
  #--------------------------------------------------------------------------
  def command_item
    SceneManager.call(Scene_Item)
  end
  #--------------------------------------------------------------------------
  # * [Exit Game] Command
  #--------------------------------------------------------------------------
  def command_game_end
    SceneManager.call(Scene_End)
  end
  #--------------------------------------------------------------------------
  # * Return to Calling Scene
  #--------------------------------------------------------------------------
  def return_scene
    SceneManager.call(Scene_Map)
  end
end


[box class=titlebg]
Demo
[/box]

Não necessário.

[box class=titlebg]
Condições de Uso
[/box]

Você deve creditar o autor (YesImAaron).

[box class=titlebg]
Agradecimentos
[/box]

YesImAaron — criação do script
GreyInvidia — pedido de criação do script


Fonte
Você adora as enormes árvores do XP? Você odeia as cores "datadas" delas? Que tal dar uma olhada no meu Remaster?

Simples mas muito útil! Com certeza serve perfeito pra jogos no estilo, valeu por compartilhar  :XD: