#==============================================================================
# - Scene_Pokegear
#------------------------------------------------------------------------------
# Modified By Harshboy
# Modified by Peter O.
# Also Modified By OblivionMew
#==============================================================================
class Scene_Pokegear
#--------------------------------------------------------------------------
# initialize
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
@menu_variable = 0
end
#--------------------------------------------------------------------------
# main
#--------------------------------------------------------------------------
def main
# Main Menu settings you can add or change these
commands=[
_INTL("Map"),
_INTL("Radio"),
_INTL("Phone"),
_INTL("Test"),
_INTL("Exit")
]
@sprites={}
@sprites["command_window"] = Window_CommandPokemon.new(commands,160)
@sprites["command_window"].index = @menu_variable
@sprites["command_window"].x = (Graphics.width - @sprites["command_window"].width) - 8
@sprites["command_window"].y = 640
@sprites["card"] = IconSprite.new(0,0)
@sprites["card"].setBitmap("Graphics/Pictures/Pokegearback3")
@sprites["button_choose"] = IconSprite.new(2,0)
@sprites["button_choose"].setBitmap("Graphics/Pictures/PokeGearChoose")
@sprites["button"] = IconSprite.new(20,264)
@sprites["button"].setBitmap("Graphics/Pictures/PokeGearButton")
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
pbDisposeSpriteHash(@sprites)
end
#--------------------------------------------------------------------------
# update the scene
#--------------------------------------------------------------------------
def update
pbUpdateSpriteHash(@sprites)
if Input.press?(Input::RIGHT)
@sprites["button"].setBitmap("Graphics/Pictures/PokeGearButton3")
case @sprites["command_window"].index
when 0
pbPlayDecisionSE()
@menu_variable = 1
when 1
pbPlayDecisionSE()
@menu_variable = 2
when 2
pbPlayDecisionSE()
@menu_variable = 3
when 3
pbPlayDecisionSE()
@menu_variable = 0
end
else
@sprites["button"].setBitmap("Graphics/Pictures/PokeGearButton")
end
if Input.press?(Input::LEFT)
@sprites["button"].setBitmap("Graphics/Pictures/PokeGearButton1")
case @sprites["command_window"].index
when 0
pbPlayDecisionSE()
@menu_variable = 3
when 1
pbPlayDecisionSE()
@menu_variable = 0
when 2
pbPlayDecisionSE()
@menu_variable = 1
when 3
pbPlayDecisionSE()
@menu_variable = 2
end
else
@sprites["button"].setBitmap("Graphics/Pictures/PokeGearButton")
end
case @sprites["command_window"].index
when 0
@sprites["button_choose"].setBitmap("Graphics/Pictures/PokeGearChoose1")
when 1
@sprites["button_choose"].setBitmap("Graphics/Pictures/PokeGearChoose2")
when 2
@sprites["button_choose"].setBitmap("Graphics/Pictures/PokeGearChoose3")
when 3
@sprites["button_choose"].setBitmap("Graphics/Pictures/PokeGearChoose4")
end
#update command window and the info if it's active
if @sprites["command_window"].active
update_command
return
end
end
#--------------------------------------------------------------------------
# update the command window
#--------------------------------------------------------------------------
def update_command
if Input.trigger?(Input::B)
pbPlayCancelSE()
$scene = Scene_Map.new
return
end
if Input.trigger?(Input::C)
case @sprites["command_window"].index
when 0
pbPlayDecisionSE()
@sprites["button"].setBitmap("Graphics/Pictures/PokeGearButton2")
pbFadeOutIn(99999) {
scene=PokemonRegionMapScene.new
screen=PokemonRegionMap.new(scene)
screen.pbStartScreen
}
when 1
pbPlayDecisionSE()
@sprites["button"].setBitmap("Graphics/Pictures/PokeGearButton2")
$scene = Scene_Jukebox.new
when 2
pbPlayDecisionSE()
@sprites["button"].setBitmap("Graphics/Pictures/PokeGearButton2")
pbFadeOutIn(99999) {
PokemonPhoneScene.new.start
}
when 3
pbPlayDecisionSE()
@sprites["button"].setBitmap("Graphics/Pictures/PokeGearButton2")
$scene = Scene_Map.new
end
return
end
end
end