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
(http://img710.imageshack.us/img710/764/screenshotxzh.png)
DemoPicture Menu Demo - 572 Kb (http://up.ht/eJ3Kxf)
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 :)
Very cool, I always wanted to figure this out. This adds a whole 'nother level of custom to your game.
now, if you add the options to position the pictures (if it isn't there already, I only looked at the listed features) this script will be awesome. *Moves*
Looks nice :D! *level up*
WOW first wtf lol I thought this post didn't go through I barely saw it in the replies post :P. Second its actually easy to position the pictures, just get the 640x480 picture and draw your menu anywhere on it. The screen is 640x480 in most xp games, so the picture just covers the whole screen. That means no matter where you want your menu, you can have it there :) you can even make them jump around, change color, or even change backgrounds completely if you place a picture behind the buttons in the same image. There's alot you can do :P but like i said creativity is the key, and really your only limit.(besides not going left to right that is)
Just to show an example of what can be made :P
(http://imageshack.us/a/img837/8746/lookxm.jpg)
Took around 1 hour yesterday and like 20 minutes today to put in the status boxes. I used only this script (and some general scripting knowlege) to make this fully animated menu. I thought I was done, but I just realised that I still need the map name lol. Either way, it goes to show that nice looking menus can be made with imagination.
Edit: btw the status boxes(box with green and blue lines) can't be finished till I finish the battle system lol hp/mp is based on a variable and I haven't decided that
very nice sir!...