Basic Custom Picture Menu
Authors: Zexion
Version: 1.0
Type: Custom Picture Menu
Key Term: Custom Menu System
IntroductionThis script allows for an easy custom picture menu. It can be modified to make several menus.
Features
- Uses pictures to show a menu
- Requires 7 pictures
- Picture names can be defined in the layout module
- Comments on how to change the scenes
Screenshots
DemoPicture Menu Demo - 572 Kb
Script#==============================================================================#
# Basic CMS V 1.0 #
# This script is a modification of Mog's Sence Menu Itigo V1.5 #
#==============================================================================#
module Layout
# Main Menu Graphics Used
Background = "CM_Layout" # Main Menu Graphics
# MENU BUTTONS
MENU_TYPE_1 = "Buttons Layout1" # Button layout
MENU_TYPE_2 = "Buttons Layout2"
MENU_TYPE_3 = "Buttons Layout3"
MENU_TYPE_4 = "Buttons Layout4"
MENU_TYPE_5 = "Buttons Layout5"
MENU_TYPE_6 = "Buttons Layout6"
end
#==============================================================================
# ** Scene_Journal
#------------------------------------------------------------------------------
# This class performs journal screen processing.
#==============================================================================
class Scene_CustomMenu
#--------------------------------------------------------------------------
# * Object Initialization
# menu_index : command cursor's initial position
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Make command window
s1 = ""
s2 = ""
s3 = ""
s4 = ""
s5 = ""
s6 = ""
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
@command_window.index = @menu_index
@command_window.opacity = 0
@command_window.windowskin = RPG::Cache.windowskin("")
# Draws the pictures for the menu
@mnlay = Sprite.new
@mnlay.bitmap = RPG::Cache.picture(Layout::Background)
@mnlay.opacity = 255
@mncom = Sprite.new
@mncom.bitmap = RPG::Cache.picture(Layout::MENU_TYPE_1)
@mncom.z = 100
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
@mnlay.dispose
@mncom.dispose
# Dispose of windows
@command_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update windows
@command_window.update
# If command window is active: call update_command
if @command_window.active
update_command
return
end
end
def update_command
case @command_window.index
when 0
@mncom.bitmap = RPG::Cache.picture(Layout::MENU_TYPE_1)
when 1
@mncom.bitmap = RPG::Cache.picture(Layout::MENU_TYPE_2)
when 2
@mncom.bitmap = RPG::Cache.picture(Layout::MENU_TYPE_3)
when 3
@mncom.bitmap = RPG::Cache.picture(Layout::MENU_TYPE_4)
when 4
@mncom.bitmap = RPG::Cache.picture(Layout::MENU_TYPE_5)
when 5
@mncom.bitmap = RPG::Cache.picture(Layout::MENU_TYPE_6)
end
if Input.trigger?(Input::B)
# If the player presses cancel, what do you want it to do
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new
# Replace $scene = Scene_Menu.new with whichever scene you want
# to return to after they cancel this menu.
# to return to the map replace it with, $scene = Scene_Map.new
return
end
if Input.trigger?(Input::C)
# If the player presses the confirm button...
case @command_window.index
when 0
# and the first option is selected
$game_system.se_play($data_system.decision_se)
$scene = Scene_Item.new
when 1
# and the second option is selected
$game_system.se_play($data_system.decision_se)
$scene = Scene_Save.new
when 2
# and the third option is selected
$game_system.se_play($data_system.decision_se)
$scene = Scene_Load.new
when 3
# and the fourth option is selected
$game_system.se_play($data_system.decision_se)
$scene = Scene_Gameover.new
when 4
# and the fith option is selected
$game_system.se_play($data_system.decision_se)
$scene = Scene_Title.new
when 5
# and the sixth option is selected
$game_system.se_play($data_system.decision_se)
$scene = Scene_Map.new
end
# Keep in mind, Whatever scene you transfer to will still exit into whatever
# Menu it is defined to exit into, NOT this one (unless you change it to this 1)
end
end
end
Place above main in the script editor.
InstructionsJust make pictures on any graphic program, and name them appropriately.
You can change what scenes the menu accesses by reading the comments.
CompatibilityDoesn't modify anything, so it shouldn't have any issues.
Credits and Thanks
- Moghunter for his main menu script
- Me for removing much of the code to make a menu base menu.
Author's NotesRemember, just because you use the menu to acess the items menu, doesn't mean that the items menu will return to this menu on exit. You have to change that in scene_item, or scene_whatever else. Also, the graphics in the demo SUCK dont use them please
they would look bad in any game lol.
They are simply to show how the menu works.
Be creative when making your menu