# when you press the key on the map, the menu opens.
# it should be key [A] by default
class Scene_Map
alias update_old update
def update
# the key that's pressed to go to this menu
if Input.trigger?(Input::Z)
#$game_system.se_play($data_system.pokeselect_se)
$scene = Scene_BudgieItem.new
end
update_old
end
end
class Scene_BudgieItem
#---------------------------------------------------------------------------------------------
# Customised menu by budgie
# This is meant to work with the Keyboard script for Starter Kit
#---------------------------------------------------------------------------------------------
def main
s1 = "Items"
s2 = "TMs/HMs"
s3 = "Key Items"
s4 = "Accessories"
s5 = "Berry Pouch"
s6 = "Powder Pouch"
# put the menu-commands in a variable
commands = [s1,s2,s3,s4,s5,s6]
# and execute the menu
@command_window = Window_Command.new(240,commands)
@command_window.x = 16
@command_window.y = 16
@command_window.z = 999999
@spriteset = Spriteset_Map.new
# loops the scene, so graphics, input and the method 'update' are updated.
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end # end of if statement
end # end of loop
Graphics.freeze
@command_window.dispose
@spriteset.dispose
end # end of method['main']
# update method
def update
@command_window.update
@spriteset.update
# checks if key [C] is pressed
if Input.trigger?(Input::C)
$game_variables[3] = (@command_window.index + 1)
end # end of if statement
# checks if key [X] is pressed
if Input.trigger?(Input::B)
$game_variables[3] = 0
$scene = Scene_Map.new
end # end of if statement
end # end of method['update']
end # end of class