From a112a21a87f1d8cfcd9da73c29be58ceffcc039a Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Sat, 27 Feb 2021 22:02:46 +0000 Subject: [PATCH] Renamed ABC inputs --- Data/Scripts/001_Technical/011_Input.rb | 6 +++ .../003_Game classes/002_Game_System.rb | 2 +- .../003_Game classes/007_Game_Player.rb | 2 +- .../008_Game_Player_Visuals.rb | 2 +- .../006_Game processing/002_Scene_Map.rb | 8 +-- .../009_Objects and windows/011_Messages.rb | 16 +++--- .../009_Objects and windows/012_TextEntry.rb | 16 +++--- Data/Scripts/010_Scenes/002_EventScene.rb | 4 +- Data/Scripts/010_Scenes/003_Scene_Intro.rb | 2 +- Data/Scripts/010_Scenes/005_Scene_Credits.rb | 2 +- .../005_Battle scene/006_PokeBattle_Scene.rb | 10 ++-- .../005_Battle scene/008_Scene_Commands.rb | 16 +++--- .../Scripts/013_Overworld/002_PField_Field.rb | 4 +- .../014_PField_DependentEvents.rb | 2 +- Data/Scripts/015_Items/001_PItem_Items.rb | 2 +- Data/Scripts/015_Items/006_PItem_Mail.rb | 2 +- Data/Scripts/017_UI/001_PScreen_PauseMenu.rb | 4 +- .../Scripts/017_UI/002_PScreen_PokedexMenu.rb | 4 +- .../Scripts/017_UI/003_PScreen_PokedexMain.rb | 18 +++---- .../017_UI/004_PScreen_PokedexEntry.rb | 16 +++--- Data/Scripts/017_UI/005_PScreen_Party.rb | 20 ++++---- Data/Scripts/017_UI/006_PScreen_Summary.rb | 34 ++++++------- Data/Scripts/017_UI/007_PScreen_Bag.rb | 14 +++--- Data/Scripts/017_UI/008_PScreen_Pokegear.rb | 4 +- Data/Scripts/017_UI/009_PScreen_RegionMap.rb | 6 +-- Data/Scripts/017_UI/010_PScreen_Phone.rb | 4 +- Data/Scripts/017_UI/011_PScreen_Jukebox.rb | 4 +- .../Scripts/017_UI/012_PScreen_TrainerCard.rb | 2 +- Data/Scripts/017_UI/013_PScreen_Load.rb | 2 +- Data/Scripts/017_UI/015_PScreen_Options.rb | 4 +- Data/Scripts/017_UI/016_PScreen_ReadyMenu.rb | 4 +- .../017_UI/017_PScreen_PokemonStorage.rb | 24 ++++----- .../Scripts/017_UI/018_PScreen_ItemStorage.rb | 20 ++++---- Data/Scripts/017_UI/021_PScreen_Evolution.rb | 2 +- .../017_UI/023_PScreen_MoveRelearner.rb | 4 +- .../017_UI/024_PScreen_PurifyChamber.rb | 8 +-- Data/Scripts/017_UI/025_PScreen_Mart.rb | 16 +++--- Data/Scripts/017_UI/027_PScreen_HallOfFame.rb | 4 +- .../002_PMinigame_TripleTriad.rb | 30 +++++------ .../003_PMinigame_SlotMachine.rb | 8 +-- .../004_PMinigame_VoltorbFlip.rb | 6 +-- .../018_Minigames/006_PMinigame_Mining.rb | 6 +-- .../007_PMinigame_TilePuzzles.rb | 14 +++--- .../006_PBattle_BattleSwap.rb | 4 +- .../001_Debug menus/001_Debug_Menus.rb | 4 +- .../001_Debug menus/002_Debug_MenuCommands.rb | 2 +- .../003_Debug_MenuExtraCode.rb | 30 +++++------ .../001_AnimEditor_SceneElements.rb | 4 +- .../003_AnimEditor_Interpolation.rb | 4 +- .../004_AnimEditor_ExportImport.rb | 4 +- .../005_AnimEditor_Functions.rb | 50 +++++++++---------- Data/Scripts/021_Debug/004_Editor_Screens.rb | 16 +++--- .../Scripts/021_Debug/007_Editor_DataTypes.rb | 8 +-- Data/Scripts/021_Debug/008_Editor_Listers.rb | 14 +++--- .../Scripts/021_Debug/009_Editor_Utilities.rb | 36 ++++++------- .../010_Editor_TilesetTerrainTags.rb | 6 +-- .../021_Debug/011_Editor_MapConnections.rb | 4 +- .../021_Debug/012_Editor_SpritePositioning.rb | 20 ++++---- mkxp.json | 8 +++ 59 files changed, 303 insertions(+), 289 deletions(-) diff --git a/Data/Scripts/001_Technical/011_Input.rb b/Data/Scripts/001_Technical/011_Input.rb index 861456ffd..cd0836ff2 100644 --- a/Data/Scripts/001_Technical/011_Input.rb +++ b/Data/Scripts/001_Technical/011_Input.rb @@ -1,3 +1,9 @@ +module Input + USE = C + BACK = B + SPECIAL = A +end + module Mouse module_function diff --git a/Data/Scripts/003_Game classes/002_Game_System.rb b/Data/Scripts/003_Game classes/002_Game_System.rb index 44f2919b4..6b8181098 100644 --- a/Data/Scripts/003_Game classes/002_Game_System.rb +++ b/Data/Scripts/003_Game classes/002_Game_System.rb @@ -276,7 +276,7 @@ class Game_System def update @timer -= 1 if @timer_working and @timer>0 - if Input.trigger?(Input::F5) && pbCurrentEventCommentInput(1,"Cut Scene") + if Input.trigger?(Input::Z) && pbCurrentEventCommentInput(1,"Cut Scene") event = @map_interpreter.get_character(0) @map_interpreter.pbSetSelfSwitch(event.id,"A",true) @map_interpreter.command_end diff --git a/Data/Scripts/003_Game classes/007_Game_Player.rb b/Data/Scripts/003_Game classes/007_Game_Player.rb index 93a946eea..0dab7f2a8 100644 --- a/Data/Scripts/003_Game classes/007_Game_Player.rb +++ b/Data/Scripts/003_Game classes/007_Game_Player.rb @@ -401,7 +401,7 @@ class Game_Player < Game_Character pbOnStepTaken(result) end # If C button was pressed, try to manually interact with events - if Input.trigger?(Input::C) && !$PokemonTemp.miniupdate + if Input.trigger?(Input::USE) && !$PokemonTemp.miniupdate # Same position and front event determinant check_event_trigger_here([0]) check_event_trigger_there([0,2]) diff --git a/Data/Scripts/003_Game classes/008_Game_Player_Visuals.rb b/Data/Scripts/003_Game classes/008_Game_Player_Visuals.rb index 7e57e4eb1..af9fb70e4 100644 --- a/Data/Scripts/003_Game classes/008_Game_Player_Visuals.rb +++ b/Data/Scripts/003_Game classes/008_Game_Player_Visuals.rb @@ -24,7 +24,7 @@ class Game_Player < Game_Character @move_route_forcing || $game_temp.message_window_showing || pbMapInterpreterRunning? terrain = pbGetTerrainTag - input = ($PokemonSystem.runstyle==1) ? $PokemonGlobal.runtoggle : Input.press?(Input::A) + input = ($PokemonSystem.runstyle==1) ? $PokemonGlobal.runtoggle : Input.press?(Input::SPECIAL) return input && $PokemonGlobal.runningShoes && !jumping? && !$PokemonGlobal.diving && !$PokemonGlobal.surfing && !$PokemonGlobal.bicycle && !PBTerrain.onlyWalk?(terrain) diff --git a/Data/Scripts/006_Game processing/002_Scene_Map.rb b/Data/Scripts/006_Game processing/002_Scene_Map.rb index b2fd8922f..b8d41e205 100644 --- a/Data/Scripts/006_Game processing/002_Scene_Map.rb +++ b/Data/Scripts/006_Game processing/002_Scene_Map.rb @@ -176,18 +176,18 @@ class Scene_Map end return if $game_temp.message_window_showing if !pbMapInterpreterRunning? - if Input.trigger?(Input::C) + if Input.trigger?(Input::USE) $PokemonTemp.hiddenMoveEventCalling = true - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) unless $game_system.menu_disabled or $game_player.moving? $game_temp.menu_calling = true $game_temp.menu_beep = true end - elsif Input.trigger?(Input::F5) + elsif Input.trigger?(Input::Z) unless $game_player.moving? $PokemonTemp.keyItemCalling = true end - elsif Input.trigger?(Input::A) + elsif Input.trigger?(Input::SPECIAL) if $PokemonSystem.runstyle==1 $PokemonGlobal.runtoggle = !$PokemonGlobal.runtoggle end diff --git a/Data/Scripts/009_Objects and windows/011_Messages.rb b/Data/Scripts/009_Objects and windows/011_Messages.rb index 82a1db9be..1ca715a41 100644 --- a/Data/Scripts/009_Objects and windows/011_Messages.rb +++ b/Data/Scripts/009_Objects and windows/011_Messages.rb @@ -275,7 +275,7 @@ def pbChooseNumber(msgwindow,params) cmdwindow.update msgwindow.update if msgwindow yield if block_given? - if Input.trigger?(Input::C) + if Input.trigger?(Input::USE) ret=cmdwindow.number if ret>maximum pbPlayBuzzerSE() @@ -285,7 +285,7 @@ def pbChooseNumber(msgwindow,params) pbPlayDecisionSE() break end - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) pbPlayCancelSE() ret=cancelNumber break @@ -736,7 +736,7 @@ def pbMessageDisplay(msgwindow,message,letterbyletter=true,commandProc=nil) msgwindow.resume if msgwindow.busy? break if !msgwindow.busy? end - if Input.trigger?(Input::C) || Input.trigger?(Input::B) + if Input.trigger?(Input::USE) || Input.trigger?(Input::BACK) if msgwindow.busy? pbPlayDecisionSE if msgwindow.pausing? msgwindow.resume @@ -834,7 +834,7 @@ def pbShowCommands(msgwindow,commands=nil,cmdIfCancel=0,defaultCmd=0) cmdwindow.update msgwindow.update if msgwindow yield if block_given? - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) if cmdIfCancel>0 command=cmdIfCancel-1 break @@ -843,7 +843,7 @@ def pbShowCommands(msgwindow,commands=nil,cmdIfCancel=0,defaultCmd=0) break end end - if Input.trigger?(Input::C) + if Input.trigger?(Input::USE) command=cmdwindow.index break end @@ -880,7 +880,7 @@ def pbShowCommandsWithHelp(msgwindow,commands,help,cmdIfCancel=0,defaultCmd=0) end msgwin.update yield if block_given? - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) if cmdIfCancel>0 command=cmdIfCancel-1 break @@ -889,7 +889,7 @@ def pbShowCommandsWithHelp(msgwindow,commands,help,cmdIfCancel=0,defaultCmd=0) break end end - if Input.trigger?(Input::C) + if Input.trigger?(Input::USE) command=cmdwindow.index break end @@ -914,7 +914,7 @@ def pbMessageWaitForInput(msgwindow,frames,showPause=false) Input.update msgwindow.update if msgwindow pbUpdateSceneMap - if Input.trigger?(Input::C) || Input.trigger?(Input::B) + if Input.trigger?(Input::USE) || Input.trigger?(Input::BACK) break end yield if block_given? diff --git a/Data/Scripts/009_Objects and windows/012_TextEntry.rb b/Data/Scripts/009_Objects and windows/012_TextEntry.rb index ae7a1848d..48899eefa 100644 --- a/Data/Scripts/009_Objects and windows/012_TextEntry.rb +++ b/Data/Scripts/009_Objects and windows/012_TextEntry.rb @@ -226,19 +226,19 @@ class Window_TextEntry < SpriteWindow_Base self.refresh if (@frame%10)==0 return if !self.active # Moving cursor - if Input.repeat?(Input::LEFT) && Input.press?(Input::A) + if Input.repeat?(Input::LEFT) && Input.press?(Input::SPECIAL) if @helper.cursor > 0 @helper.cursor -= 1 @frame = 0 self.refresh end - elsif Input.repeat?(Input::RIGHT) && Input.press?(Input::A) + elsif Input.repeat?(Input::RIGHT) && Input.press?(Input::SPECIAL) if @helper.cursor < self.text.scan(/./m).length @helper.cursor += 1 @frame = 0 self.refresh end - elsif Input.repeat?(Input::B) # Backspace + elsif Input.repeat?(Input::BACK) # Backspace self.delete if @helper.cursor > 0 end end @@ -837,7 +837,7 @@ class PokemonEntryScene @sprites["entry"].update @sprites["entry2"].update @sprites["subject"].update if @sprites["subject"] - if Input.trigger?(Input::C) + if Input.trigger?(Input::USE) index=@sprites["entry2"].command if index==-3 # Confirm text ret=@sprites["entry"].text @@ -1311,16 +1311,16 @@ class PokemonEntryScene2 Input.update pbUpdate next if pbMoveCursor - if Input.trigger?(Input::F5) + if Input.trigger?(Input::Z) pbChangeTab - elsif Input.trigger?(Input::A) + elsif Input.trigger?(Input::SPECIAL) @cursorpos = OK @sprites["cursor"].setCursorPos(@cursorpos) - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) @helper.delete pbPlayCancelSE() pbUpdateOverlay - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) case @cursorpos when BACK # Backspace @helper.delete diff --git a/Data/Scripts/010_Scenes/002_EventScene.rb b/Data/Scripts/010_Scenes/002_EventScene.rb index 80007aee3..94e9de3e1 100644 --- a/Data/Scripts/010_Scenes/002_EventScene.rb +++ b/Data/Scripts/010_Scenes/002_EventScene.rb @@ -167,9 +167,9 @@ class EventScene sprite.update end @onUpdate.trigger(self) - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) @onBTrigger.trigger(self) - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) @onCTrigger.trigger(self) end end diff --git a/Data/Scripts/010_Scenes/003_Scene_Intro.rb b/Data/Scripts/010_Scenes/003_Scene_Intro.rb index d5a36855d..0d3957f2f 100644 --- a/Data/Scripts/010_Scenes/003_Scene_Intro.rb +++ b/Data/Scripts/010_Scenes/003_Scene_Intro.rb @@ -111,7 +111,7 @@ class IntroEventScene < EventScene @pic2.moveOpacity(TICKS_PER_ENTER_FLASH*6/10,TICKS_PER_ENTER_FLASH*4/10,255) end if Input.press?(Input::DOWN) && - Input.press?(Input::B) && + Input.press?(Input::BACK) && Input.press?(Input::CTRL) closeSplashDelete(scene,args) end diff --git a/Data/Scripts/010_Scenes/005_Scene_Credits.rb b/Data/Scripts/010_Scenes/005_Scene_Credits.rb index ad9c1a28b..d748d7eb4 100644 --- a/Data/Scripts/010_Scenes/005_Scene_Credits.rb +++ b/Data/Scripts/010_Scenes/005_Scene_Credits.rb @@ -196,7 +196,7 @@ _END_ # Check if the credits should be cancelled def cancel? - if Input.trigger?(Input::C) && $PokemonGlobal.creditsPlayed + if Input.trigger?(Input::USE) && $PokemonGlobal.creditsPlayed $scene = Scene_Map.new pbBGMFade(1.0) return true diff --git a/Data/Scripts/012_Battle/005_Battle scene/006_PokeBattle_Scene.rb b/Data/Scripts/012_Battle/005_Battle scene/006_PokeBattle_Scene.rb index 3a3f4fd85..227f2b75f 100644 --- a/Data/Scripts/012_Battle/005_Battle scene/006_PokeBattle_Scene.rb +++ b/Data/Scripts/012_Battle/005_Battle scene/006_PokeBattle_Scene.rb @@ -44,7 +44,7 @@ class PokeBattle_Scene def pbInputUpdate Input.update - if Input.trigger?(Input::B) && @abortable && !@aborted + if Input.trigger?(Input::BACK) && @abortable && !@aborted @aborted = true @battle.pbAbort end @@ -140,7 +140,7 @@ class PokeBattle_Scene end i += 1 end - if Input.trigger?(Input::B) || Input.trigger?(Input::C) || @abortable + if Input.trigger?(Input::BACK) || Input.trigger?(Input::USE) || @abortable if cw.busy? pbPlayDecisionSE if cw.pausing? && !@abortable cw.skipAhead @@ -182,7 +182,7 @@ class PokeBattle_Scene i += 1 end end - if Input.trigger?(Input::B) || Input.trigger?(Input::C) || @abortable + if Input.trigger?(Input::BACK) || Input.trigger?(Input::USE) || @abortable if cw.busy? pbPlayDecisionSE if cw.pausing? && !@abortable cw.skipAhead @@ -215,7 +215,7 @@ class PokeBattle_Scene cw.visible = (!dw.busy?) pbUpdate(cw) dw.update - if Input.trigger?(Input::B) && defaultValue>=0 + if Input.trigger?(Input::BACK) && defaultValue>=0 if dw.busy? pbPlayDecisionSE if dw.pausing? dw.resume @@ -224,7 +224,7 @@ class PokeBattle_Scene dw.text = "" return defaultValue end - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) if dw.busy? pbPlayDecisionSE if dw.pausing? dw.resume diff --git a/Data/Scripts/012_Battle/005_Battle scene/008_Scene_Commands.rb b/Data/Scripts/012_Battle/005_Battle scene/008_Scene_Commands.rb index 1feab770a..d55abf1f0 100644 --- a/Data/Scripts/012_Battle/005_Battle scene/008_Scene_Commands.rb +++ b/Data/Scripts/012_Battle/005_Battle scene/008_Scene_Commands.rb @@ -45,12 +45,12 @@ class PokeBattle_Scene end pbPlayCursorSE if cw.index!=oldIndex # Actions - if Input.trigger?(Input::C) # Confirm choice + if Input.trigger?(Input::USE) # Confirm choice pbPlayDecisionSE ret = cw.index @lastCmd[idxBattler] = ret break - elsif Input.trigger?(Input::B) && mode==1 # Cancel + elsif Input.trigger?(Input::BACK) && mode==1 # Cancel pbPlayCancelSE break elsif Input.trigger?(Input::F9) && $DEBUG # Debug menu @@ -110,22 +110,22 @@ class PokeBattle_Scene end pbPlayCursorSE if cw.index!=oldIndex # Actions - if Input.trigger?(Input::C) # Confirm choice + if Input.trigger?(Input::USE) # Confirm choice pbPlayDecisionSE break if yield cw.index needFullRefresh = true needRefresh = true - elsif Input.trigger?(Input::B) # Cancel fight menu + elsif Input.trigger?(Input::BACK) # Cancel fight menu pbPlayCancelSE break if yield -1 needRefresh = true - elsif Input.trigger?(Input::A) # Toggle Mega Evolution + elsif Input.trigger?(Input::SPECIAL) # Toggle Mega Evolution if megaEvoPossible pbPlayDecisionSE break if yield -2 needRefresh = true end - elsif Input.trigger?(Input::F5) # Shift + elsif Input.trigger?(Input::Z) # Shift if cw.shiftMode>0 pbPlayDecisionSE break if yield -3 @@ -420,11 +420,11 @@ class PokeBattle_Scene pbSelectBattler(cw.index,2) # Select the new battler/data box end end - if Input.trigger?(Input::C) # Confirm + if Input.trigger?(Input::USE) # Confirm ret = cw.index pbPlayDecisionSE break - elsif Input.trigger?(Input::B) # Cancel + elsif Input.trigger?(Input::BACK) # Cancel ret = -1 pbPlayCancelSE break diff --git a/Data/Scripts/013_Overworld/002_PField_Field.rb b/Data/Scripts/013_Overworld/002_PField_Field.rb index 37d3daeee..f66685433 100644 --- a/Data/Scripts/013_Overworld/002_PField_Field.rb +++ b/Data/Scripts/013_Overworld/002_PField_Field.rb @@ -961,7 +961,7 @@ def pbWaitMessage(msgWindow,time) Graphics.update Input.update pbUpdateSceneMap - if Input.trigger?(Input::C) || Input.trigger?(Input::B) + if Input.trigger?(Input::USE) || Input.trigger?(Input::BACK) return true end end @@ -987,7 +987,7 @@ def pbWaitForInput(msgWindow,message,frames) else $game_player.pattern = 0 end - if Input.trigger?(Input::C) || Input.trigger?(Input::B) + if Input.trigger?(Input::USE) || Input.trigger?(Input::BACK) $game_player.pattern = 0 return true end diff --git a/Data/Scripts/013_Overworld/014_PField_DependentEvents.rb b/Data/Scripts/013_Overworld/014_PField_DependentEvents.rb index 6d809980d..868177636 100644 --- a/Data/Scripts/013_Overworld/014_PField_DependentEvents.rb +++ b/Data/Scripts/013_Overworld/014_PField_DependentEvents.rb @@ -394,7 +394,7 @@ class DependentEvents events[i][5]=event.direction end # Check event triggers - if Input.trigger?(Input::C) && !$game_temp.in_menu && !$game_temp.in_battle && + if Input.trigger?(Input::USE) && !$game_temp.in_menu && !$game_temp.in_battle && !$game_player.move_route_forcing && !$game_temp.message_window_showing && !pbMapInterpreterRunning? # Get position of tile facing the player diff --git a/Data/Scripts/015_Items/001_PItem_Items.rb b/Data/Scripts/015_Items/001_PItem_Items.rb index 14212f8fe..eaa0eca96 100644 --- a/Data/Scripts/015_Items/001_PItem_Items.rb +++ b/Data/Scripts/015_Items/001_PItem_Items.rb @@ -200,7 +200,7 @@ def pbTopRightWindow(text, scene = nil) Input.update window.update scene.pbUpdate if scene - break if Input.trigger?(Input::C) + break if Input.trigger?(Input::USE) end window.dispose end diff --git a/Data/Scripts/015_Items/006_PItem_Mail.rb b/Data/Scripts/015_Items/006_PItem_Mail.rb index fe3f542e8..a474ff708 100644 --- a/Data/Scripts/015_Items/006_PItem_Mail.rb +++ b/Data/Scripts/015_Items/006_PItem_Mail.rb @@ -96,7 +96,7 @@ def pbDisplayMail(mail,_bearer=nil) Graphics.update Input.update pbUpdateSpriteHash(sprites) - if Input.trigger?(Input::B) || Input.trigger?(Input::C) + if Input.trigger?(Input::BACK) || Input.trigger?(Input::USE) break end end diff --git a/Data/Scripts/017_UI/001_PScreen_PauseMenu.rb b/Data/Scripts/017_UI/001_PScreen_PauseMenu.rb index 4785b315a..3b3fb613a 100644 --- a/Data/Scripts/017_UI/001_PScreen_PauseMenu.rb +++ b/Data/Scripts/017_UI/001_PScreen_PauseMenu.rb @@ -59,11 +59,11 @@ class PokemonPauseMenu_Scene Graphics.update Input.update pbUpdateSceneMap - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) pbPlayCloseMenuSE ret = -1 break - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) pbPlayDecisionSE ret = cmdwindow.index $PokemonTemp.menuLastChoice = ret diff --git a/Data/Scripts/017_UI/002_PScreen_PokedexMenu.rb b/Data/Scripts/017_UI/002_PScreen_PokedexMenu.rb index ef136f963..b792c61eb 100644 --- a/Data/Scripts/017_UI/002_PScreen_PokedexMenu.rb +++ b/Data/Scripts/017_UI/002_PScreen_PokedexMenu.rb @@ -63,10 +63,10 @@ class PokemonPokedexMenu_Scene Graphics.update Input.update pbUpdate - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) pbPlayCloseMenuSE break - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) ret = @sprites["commands"].index (ret==@commands.length-1) ? pbPlayCloseMenuSE : pbPlayDecisionSE break diff --git a/Data/Scripts/017_UI/003_PScreen_PokedexMain.rb b/Data/Scripts/017_UI/003_PScreen_PokedexMain.rb index 963cff0f8..49219e210 100644 --- a/Data/Scripts/017_UI/003_PScreen_PokedexMain.rb +++ b/Data/Scripts/017_UI/003_PScreen_PokedexMain.rb @@ -951,14 +951,14 @@ class PokemonPokedex_Scene pbPlayCursorSE if index!=oldindex end end - if Input.trigger?(Input::A) + if Input.trigger?(Input::SPECIAL) index = -2 pbPlayCursorSE if index!=oldindex - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) pbPlayCloseMenuSE ret = nil break - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) if index==-2 # OK pbPlayDecisionSE ret = selindex @@ -1066,13 +1066,13 @@ class PokemonPokedex_Scene elsif index==7 || index==8; index += 1 end pbPlayCursorSE if index!=oldindex - elsif Input.trigger?(Input::A) + elsif Input.trigger?(Input::SPECIAL) index = 8 pbPlayCursorSE if index!=oldindex - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) pbPlayCloseMenuSE break - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) pbPlayDecisionSE if index!=9 case index when 0 # Choose sort order @@ -1159,12 +1159,12 @@ class PokemonPokedex_Scene $PokemonGlobal.pokedexIndex[pbGetSavePositionIndex] = @sprites["pokedex"].index if !@searchResults pbRefresh end - if Input.trigger?(Input::A) + if Input.trigger?(Input::SPECIAL) pbPlayDecisionSE @sprites["pokedex"].active = false pbDexSearch @sprites["pokedex"].active = true - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) if @searchResults pbPlayCancelSE pbCloseSearch @@ -1172,7 +1172,7 @@ class PokemonPokedex_Scene pbPlayCloseMenuSE break end - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) if $Trainer.seen?(@sprites["pokedex"].species) pbPlayDecisionSE pbDexEntry(@sprites["pokedex"].index) diff --git a/Data/Scripts/017_UI/004_PScreen_PokedexEntry.rb b/Data/Scripts/017_UI/004_PScreen_PokedexEntry.rb index 690f9495b..9bf2cecb5 100644 --- a/Data/Scripts/017_UI/004_PScreen_PokedexEntry.rb +++ b/Data/Scripts/017_UI/004_PScreen_PokedexEntry.rb @@ -436,10 +436,10 @@ class PokemonPokedexInfo_Scene elsif Input.trigger?(Input::DOWN) pbPlayCursorSE index = (index+1)%@available.length - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) pbPlayCancelSE break - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) pbPlayDecisionSE break end @@ -455,13 +455,13 @@ class PokemonPokedexInfo_Scene Input.update pbUpdate dorefresh = false - if Input.trigger?(Input::A) + if Input.trigger?(Input::SPECIAL) pbSEStop GameData::Species.play_cry_from_species(@species, @form) if @page == 1 - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) pbPlayCloseMenuSE break - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) if @page==2 # Area # dorefresh = true elsif @page==3 # Forms @@ -523,13 +523,13 @@ class PokemonPokedexInfo_Scene Graphics.update Input.update pbUpdate - if Input.trigger?(Input::A) + if Input.trigger?(Input::SPECIAL) pbSEStop GameData::Species.play_cry_from_species(@species, @form) - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) pbPlayCloseMenuSE break - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) pbPlayDecisionSE break end diff --git a/Data/Scripts/017_UI/005_PScreen_Party.rb b/Data/Scripts/017_UI/005_PScreen_Party.rb index 5e7b28e2d..539ed285c 100644 --- a/Data/Scripts/017_UI/005_PScreen_Party.rb +++ b/Data/Scripts/017_UI/005_PScreen_Party.rb @@ -489,12 +489,12 @@ class PokemonParty_Scene Input.update self.update if @sprites["messagebox"].busy? - if Input.trigger?(Input::C) + if Input.trigger?(Input::USE) pbPlayDecisionSE if @sprites["messagebox"].pausing? @sprites["messagebox"].resume end else - if Input.trigger?(Input::B) || Input.trigger?(Input::C) + if Input.trigger?(Input::BACK) || Input.trigger?(Input::USE) break end end @@ -520,10 +520,10 @@ class PokemonParty_Scene cmdwindow.update self.update if !@sprites["messagebox"].busy? - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) ret = false break - elsif Input.trigger?(Input::C) && @sprites["messagebox"].resume + elsif Input.trigger?(Input::USE) && @sprites["messagebox"].resume ret = (cmdwindow.index==0) break end @@ -551,11 +551,11 @@ class PokemonParty_Scene Input.update cmdwindow.update self.update - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) pbPlayCancelSE ret = -1 break - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) pbPlayDecisionSE ret = cmdwindow.index break @@ -706,15 +706,15 @@ class PokemonParty_Scene end end cancelsprite = Settings::MAX_PARTY_SIZE + ((@multiselect) ? 1 : 0) - if Input.trigger?(Input::A) && canswitch==1 && @activecmd!=cancelsprite + if Input.trigger?(Input::SPECIAL) && canswitch==1 && @activecmd!=cancelsprite pbPlayDecisionSE return [1,@activecmd] - elsif Input.trigger?(Input::A) && canswitch==2 + elsif Input.trigger?(Input::SPECIAL) && canswitch==2 return -1 - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) pbPlayCloseMenuSE if !switching return -1 - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) if @activecmd==cancelsprite (switching) ? pbPlayDecisionSE : pbPlayCloseMenuSE return -1 diff --git a/Data/Scripts/017_UI/006_PScreen_Summary.rb b/Data/Scripts/017_UI/006_PScreen_Summary.rb index c478d3ec2..84b601567 100644 --- a/Data/Scripts/017_UI/006_PScreen_Summary.rb +++ b/Data/Scripts/017_UI/006_PScreen_Summary.rb @@ -213,11 +213,11 @@ class PokemonSummary_Scene Input.update pbUpdate if @sprites["messagebox"].busy? - if Input.trigger?(Input::C) + if Input.trigger?(Input::USE) pbPlayDecisionSE() if @sprites["messagebox"].pausing? @sprites["messagebox"].resume end - elsif Input.trigger?(Input::C) || Input.trigger?(Input::B) + elsif Input.trigger?(Input::USE) || Input.trigger?(Input::BACK) break end end @@ -240,10 +240,10 @@ class PokemonSummary_Scene cmdwindow.update pbUpdate if !@sprites["messagebox"].busy? - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) ret = false break - elsif Input.trigger?(Input::C) && @sprites["messagebox"].resume + elsif Input.trigger?(Input::USE) && @sprites["messagebox"].resume ret = (cmdwindow.index==0) break end @@ -265,11 +265,11 @@ class PokemonSummary_Scene Input.update cmdwindow.update pbUpdate - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) pbPlayCancelSE ret = -1 break - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) pbPlayDecisionSE ret = cmdwindow.index break @@ -929,12 +929,12 @@ class PokemonSummary_Scene else @sprites["movepresel"].z = @sprites["movesel"].z end - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) (switching) ? pbPlayCancelSE : pbPlayCloseMenuSE break if !switching @sprites["movepresel"].visible = false switching = false - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) pbPlayDecisionSE if selmove==Pokemon::MAX_MOVES break if !switching @@ -1001,12 +1001,12 @@ class PokemonSummary_Scene @sprites["ribbonpresel"].z = @sprites["ribbonsel"].z end hasMovedCursor = false - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) (switching) ? pbPlayCancelSE : pbPlayCloseMenuSE break if !switching @sprites["ribbonpresel"].visible = false switching = false - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) if !switching if @pokemon.ribbons[selribbon] pbPlayDecisionSE @@ -1110,10 +1110,10 @@ class PokemonSummary_Scene Graphics.update Input.update pbUpdate - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) pbPlayCloseMenuSE break - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) pbPlayDecisionSE if index==6 # OK ret = markings @@ -1216,11 +1216,11 @@ class PokemonSummary_Scene Graphics.update Input.update pbUpdate - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) selmove = Pokemon::MAX_MOVES pbPlayCloseMenuSE if new_move break - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) pbPlayDecisionSE break elsif Input.trigger?(Input::UP) @@ -1253,13 +1253,13 @@ class PokemonSummary_Scene Input.update pbUpdate dorefresh = false - if Input.trigger?(Input::A) + if Input.trigger?(Input::SPECIAL) pbSEStop GameData::Species.play_cry_from_pokemon(@pokemon) - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) pbPlayCloseMenuSE break - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) if @page==4 pbPlayDecisionSE pbMoveSelection diff --git a/Data/Scripts/017_UI/007_PScreen_Bag.rb b/Data/Scripts/017_UI/007_PScreen_Bag.rb index 2804d403b..37c3a0875 100644 --- a/Data/Scripts/017_UI/007_PScreen_Bag.rb +++ b/Data/Scripts/017_UI/007_PScreen_Bag.rb @@ -356,12 +356,12 @@ class PokemonBag_Scene pbRefresh end if itemwindow.sorting - if Input.trigger?(Input::A) || - Input.trigger?(Input::C) + if Input.trigger?(Input::SPECIAL) || + Input.trigger?(Input::USE) itemwindow.sorting = false pbPlayDecisionSE pbRefresh - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) thispocket.insert(swapinitialpos,thispocket.delete_at(itemwindow.index)) itemwindow.index = swapinitialpos itemwindow.sorting = false @@ -406,7 +406,7 @@ class PokemonBag_Scene pbPlayCursorSE pbRefresh end -# elsif Input.trigger?(Input::F5) # Register/unregister selected item +# elsif Input.trigger?(Input::Z) # Register/unregister selected item # if !@choosing && itemwindow.index1 && itemwindow.index=0 pbCallTrainer(@trainers[index][0],@trainers[index][1]) diff --git a/Data/Scripts/017_UI/011_PScreen_Jukebox.rb b/Data/Scripts/017_UI/011_PScreen_Jukebox.rb index 02b3b835c..6eae56e8d 100644 --- a/Data/Scripts/017_UI/011_PScreen_Jukebox.rb +++ b/Data/Scripts/017_UI/011_PScreen_Jukebox.rb @@ -30,9 +30,9 @@ class PokemonJukebox_Scene Graphics.update Input.update pbUpdate - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) break - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) ret = @sprites["commands"].index break end diff --git a/Data/Scripts/017_UI/012_PScreen_TrainerCard.rb b/Data/Scripts/017_UI/012_PScreen_TrainerCard.rb index fd1cf1085..504760e3c 100644 --- a/Data/Scripts/017_UI/012_PScreen_TrainerCard.rb +++ b/Data/Scripts/017_UI/012_PScreen_TrainerCard.rb @@ -81,7 +81,7 @@ class PokemonTrainerCard_Scene Graphics.update Input.update pbUpdate - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) pbPlayCloseMenuSE break end diff --git a/Data/Scripts/017_UI/013_PScreen_Load.rb b/Data/Scripts/017_UI/013_PScreen_Load.rb index e9809c8f1..3035d77c8 100644 --- a/Data/Scripts/017_UI/013_PScreen_Load.rb +++ b/Data/Scripts/017_UI/013_PScreen_Load.rb @@ -188,7 +188,7 @@ class PokemonLoad_Scene Graphics.update Input.update pbUpdate - if Input.trigger?(Input::C) + if Input.trigger?(Input::USE) return @sprites["cmdwindow"].index end end diff --git a/Data/Scripts/017_UI/015_PScreen_Options.rb b/Data/Scripts/017_UI/015_PScreen_Options.rb index 10f197d98..7e4928bd8 100644 --- a/Data/Scripts/017_UI/015_PScreen_Options.rb +++ b/Data/Scripts/017_UI/015_PScreen_Options.rb @@ -448,9 +448,9 @@ class PokemonOption_Scene oldFont = $PokemonSystem.font end end - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) break - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) break if @sprites["option"].index==@PokemonOptions.length end end diff --git a/Data/Scripts/017_UI/016_PScreen_ReadyMenu.rb b/Data/Scripts/017_UI/016_PScreen_ReadyMenu.rb index 222c1175f..cf9a74a8c 100644 --- a/Data/Scripts/017_UI/016_PScreen_ReadyMenu.rb +++ b/Data/Scripts/017_UI/016_PScreen_ReadyMenu.rb @@ -170,11 +170,11 @@ class PokemonReadyMenu_Scene elsif Input.trigger?(Input::RIGHT) && @index[2]==0 && @itemcommands.length>0 @index[2] = 1 pbChangeSide - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) pbPlayCloseMenuSE ret = -1 break - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) ret = [@index[2],cmdwindow.index] break end diff --git a/Data/Scripts/017_UI/017_PScreen_PokemonStorage.rb b/Data/Scripts/017_UI/017_PScreen_PokemonStorage.rb index 6848ac4ac..addec65c8 100644 --- a/Data/Scripts/017_UI/017_PScreen_PokemonStorage.rb +++ b/Data/Scripts/017_UI/017_PScreen_PokemonStorage.rb @@ -647,7 +647,7 @@ class PokemonStorageScene loop do Graphics.update Input.update - if Input.trigger?(Input::B) || Input.trigger?(Input::C) + if Input.trigger?(Input::BACK) || Input.trigger?(Input::USE) break end msgwindow.update @@ -679,10 +679,10 @@ class PokemonStorageScene Input.update msgwindow.update cmdwindow.update - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) ret = -1 break - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) ret = cmdwindow.index break end @@ -858,7 +858,7 @@ class PokemonStorageScene @storage.currentBox = nextbox pbUpdateOverlay(selection) pbSetMosaic(selection) - elsif Input.trigger?(Input::F5) # Jump to box name + elsif Input.trigger?(Input::Z) # Jump to box name if selection!=-1 pbPlayCursorSE selection = -1 @@ -866,13 +866,13 @@ class PokemonStorageScene pbUpdateOverlay(selection) pbSetMosaic(selection) end - elsif Input.trigger?(Input::A) && @command==0 # Organize only + elsif Input.trigger?(Input::SPECIAL) && @command==0 # Organize only pbPlayDecisionSE pbSetQuickSwap(!@quickswap) - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) @selection = selection return nil - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) @selection = selection if selection>=0 return [@storage.currentBox,selection] @@ -945,13 +945,13 @@ class PokemonStorageScene pbSetMosaic(selection) end self.update - if Input.trigger?(Input::A) && @command == 0 # Organize only + if Input.trigger?(Input::SPECIAL) && @command == 0 # Organize only pbPlayDecisionSE pbSetQuickSwap(!@quickswap) - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) @selection = selection return -1 - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) if selection >= 0 && selection < Settings::MAX_PARTY_SIZE @selection = selection return selection @@ -1337,10 +1337,10 @@ class PokemonStorageScene pbMarkingSetArrow(@sprites["arrow"],index) end self.update - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) pbPlayCancelSE break - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) pbPlayDecisionSE if index==6 # OK pokemon.markings = markings diff --git a/Data/Scripts/017_UI/018_PScreen_ItemStorage.rb b/Data/Scripts/017_UI/018_PScreen_ItemStorage.rb index 073d3fcee..3792efad2 100644 --- a/Data/Scripts/017_UI/018_PScreen_ItemStorage.rb +++ b/Data/Scripts/017_UI/018_PScreen_ItemStorage.rb @@ -158,9 +158,9 @@ class ItemStorage_Scene olditem = itemwindow.item self.update pbRefresh if itemwindow.item!=olditem - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) return nil - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) if itemwindow.index<@bag.length pbRefresh return @bag[itemwindow.index][0] @@ -210,7 +210,7 @@ module UIHelper Input.update (block_given?) ? yield : cw.update if !cw.busy? - if brief || (Input.trigger?(Input::C) && cw.resume) + if brief || (Input.trigger?(Input::USE) && cw.resume) break end end @@ -230,7 +230,7 @@ module UIHelper Graphics.update Input.update (block_given?) ? yield : msgwindow.update - if Input.trigger?(Input::B) || Input.trigger?(Input::C) + if Input.trigger?(Input::BACK) || Input.trigger?(Input::USE) break end end @@ -261,10 +261,10 @@ module UIHelper cw.update (block_given?) ? yield : dw.update if !dw.busy? && dw.resume - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) pbPlayCancelSE break - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) pbPlayDecisionSE ret = (cw.index==0) break @@ -296,11 +296,11 @@ module UIHelper Input.update numwindow.update (block_given?) ? yield : helpwindow.update - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) ret = 0 pbPlayCancelSE break - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) ret = curnumber pbPlayDecisionSE break @@ -349,12 +349,12 @@ module UIHelper Input.update yield cmdwindow.update - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) ret = -1 pbPlayCancelSE break end - if Input.trigger?(Input::C) + if Input.trigger?(Input::USE) ret = cmdwindow.index pbPlayDecisionSE break diff --git a/Data/Scripts/017_UI/021_PScreen_Evolution.rb b/Data/Scripts/017_UI/021_PScreen_Evolution.rb index 17dd6321e..f2e9aae83 100644 --- a/Data/Scripts/017_UI/021_PScreen_Evolution.rb +++ b/Data/Scripts/017_UI/021_PScreen_Evolution.rb @@ -549,7 +549,7 @@ class PokemonEvolutionScene Graphics.update Input.update pbUpdate(true) - if Input.trigger?(Input::B) && cancancel + if Input.trigger?(Input::BACK) && cancancel pbBGMStop pbPlayCancelSE canceled = true diff --git a/Data/Scripts/017_UI/023_PScreen_MoveRelearner.rb b/Data/Scripts/017_UI/023_PScreen_MoveRelearner.rb index 5a8f925c6..7b3f177fb 100644 --- a/Data/Scripts/017_UI/023_PScreen_MoveRelearner.rb +++ b/Data/Scripts/017_UI/023_PScreen_MoveRelearner.rb @@ -126,9 +126,9 @@ class MoveRelearner_Scene @sprites["background"].y=78+(@sprites["commands"].index-@sprites["commands"].top_item)*64 pbDrawMoveList end - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) return 0 - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) return @moves[@sprites["commands"].index] end end diff --git a/Data/Scripts/017_UI/024_PScreen_PurifyChamber.rb b/Data/Scripts/017_UI/024_PScreen_PurifyChamber.rb index 0cf0068b8..f6d7e4be2 100644 --- a/Data/Scripts/017_UI/024_PScreen_PurifyChamber.rb +++ b/Data/Scripts/017_UI/024_PScreen_PurifyChamber.rb @@ -1187,10 +1187,10 @@ class PurifyChamberScene nextset=(@sprites["setview"].set==PurifyChamber::NUMSETS-1) ? 0 : @sprites["setview"].set+1 pbPlayCursorSE() return [1,nextset] - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) pbPlayDecisionSE() return [0,@sprites["setview"].cursor] - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) pbPlayCancelSE() return [3,0] end @@ -1207,11 +1207,11 @@ class PurifyChamberScene @sprites["setview"].set=oldindex end Graphics.update; Input.update; pbUpdate - if Input.trigger?(Input::C) + if Input.trigger?(Input::USE) pbPlayDecisionSE() return @sprites["setwindow"].index end - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) pbPlayCancelSE() return -1 end diff --git a/Data/Scripts/017_UI/025_PScreen_Mart.rb b/Data/Scripts/017_UI/025_PScreen_Mart.rb index 3f2ff96f0..02badde39 100644 --- a/Data/Scripts/017_UI/025_PScreen_Mart.rb +++ b/Data/Scripts/017_UI/025_PScreen_Mart.rb @@ -341,7 +341,7 @@ class PokemonMart_Scene return if brief pbRefresh if i == 0 end - if Input.trigger?(Input::C) && cw.busy? + if Input.trigger?(Input::USE) && cw.busy? cw.resume end return if i >= Graphics.frame_rate * 3 / 2 @@ -367,7 +367,7 @@ class PokemonMart_Scene yielded = true end pbRefresh if !cw.busy? && wasbusy - if Input.trigger?(Input::C) && cw.resume && !cw.busy? + if Input.trigger?(Input::USE) && cw.resume && !cw.busy? @sprites["helpwindow"].visible = false return end @@ -393,12 +393,12 @@ class PokemonMart_Scene Input.update cw.update self.update - if Input.trigger?(Input::B) && dw.resume && !dw.busy? + if Input.trigger?(Input::BACK) && dw.resume && !dw.busy? cw.dispose @sprites["helpwindow"].visible = false return false end - if Input.trigger?(Input::C) && dw.resume && !dw.busy? + if Input.trigger?(Input::USE) && dw.resume && !dw.busy? cw.dispose @sprites["helpwindow"].visible = false return (cw.index == 0) @@ -461,11 +461,11 @@ class PokemonMart_Scene curnumber -= 1 curnumber = maximum if curnumber < 1 numwindow.text = _INTL("x{1}$ {2}", curnumber, (curnumber * itemprice).to_s_formatted) - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) pbPlayDecisionSE ret = curnumber break - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) pbPlayCancelSE ret = 0 break @@ -492,10 +492,10 @@ class PokemonMart_Scene @sprites["itemtextwindow"].text = (itemwindow.item) ? @adapter.getDescription(itemwindow.item) : _INTL("Quit shopping.") end - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) pbPlayCloseMenuSE return nil - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) if itemwindow.index < @stock.length pbRefresh return @stock[itemwindow.index] diff --git a/Data/Scripts/017_UI/027_PScreen_HallOfFame.rb b/Data/Scripts/017_UI/027_PScreen_HallOfFame.rb index d9744c116..ea6fc3ce2 100644 --- a/Data/Scripts/017_UI/027_PScreen_HallOfFame.rb +++ b/Data/Scripts/017_UI/027_PScreen_HallOfFame.rb @@ -346,8 +346,8 @@ class HallOfFame_Scene Input.update pbUpdate continueScene=true - break if Input.trigger?(Input::B) # Exits - if Input.trigger?(Input::C) # Moves the selection one entry backward + break if Input.trigger?(Input::BACK) # Exits + if Input.trigger?(Input::USE) # Moves the selection one entry backward @battlerIndex+=10 continueScene=pbUpdatePC end diff --git a/Data/Scripts/018_Minigames/002_PMinigame_TripleTriad.rb b/Data/Scripts/018_Minigames/002_PMinigame_TripleTriad.rb index 44582011d..597c07691 100644 --- a/Data/Scripts/018_Minigames/002_PMinigame_TripleTriad.rb +++ b/Data/Scripts/018_Minigames/002_PMinigame_TripleTriad.rb @@ -227,7 +227,7 @@ class TriadScene Graphics.update Input.update pbUpdate - if Input.trigger?(Input::C) + if Input.trigger?(Input::USE) if @sprites["helpwindow"].busy? pbPlayDecisionSE if @sprites["helpwindow"].pausing? @sprites["helpwindow"].resume @@ -277,7 +277,7 @@ class TriadScene end index = command.index end - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) if chosenCards.length>0 item = chosenCards.pop @battle.pbAdd(cardStorage,item) @@ -290,7 +290,7 @@ class TriadScene else pbPlayBuzzerSE end - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) break if chosenCards.length==@battle.maxCards item = cardStorage[command.index] if !item || @battle.pbQuantity(cardStorage,item[0])==0 @@ -312,7 +312,7 @@ class TriadScene index = -1 end end - if Input.trigger?(Input::C) || Input.trigger?(Input::B) + if Input.trigger?(Input::USE) || Input.trigger?(Input::BACK) for i in 0...@battle.maxCards @sprites["player#{i}"].visible = (i=@battle.width doRefresh = true - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) return nil - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) if @battle.isOccupied?(boardX,boardY) pbPlayBuzzerSE else @@ -1089,9 +1089,9 @@ def pbBuyTriads preview.bitmap = TriadCard.new(commands[cmdwindow.index][3]).createBitmap(1) olditem = commands[cmdwindow.index][3] end - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) break - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) price = commands[cmdwindow.index][0] item = commands[cmdwindow.index][3] itemname = commands[cmdwindow.index][1] @@ -1181,11 +1181,11 @@ def pbSellTriads end olditem = item end - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) done = true break end - if Input.trigger?(Input::C) + if Input.trigger?(Input::USE) if cmdwindow.index>=$PokemonGlobal.triads.length done = true break @@ -1271,11 +1271,11 @@ def pbTriadList end lastIndex = cmdwindow.index end - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) done = true break end - if Input.trigger?(Input::C) + if Input.trigger?(Input::USE) if cmdwindow.index>=$PokemonGlobal.triads.length done = true break diff --git a/Data/Scripts/018_Minigames/003_PMinigame_SlotMachine.rb b/Data/Scripts/018_Minigames/003_PMinigame_SlotMachine.rb index 269bf265a..ab4c12ff2 100644 --- a/Data/Scripts/018_Minigames/003_PMinigame_SlotMachine.rb +++ b/Data/Scripts/018_Minigames/003_PMinigame_SlotMachine.rb @@ -212,7 +212,7 @@ class SlotMachineScene update @sprites["payout"].score -= 1 @sprites["credit"].score += 1 - if Input.trigger?(Input::C) || @sprites["credit"].score == Settings::MAX_COINS + if Input.trigger?(Input::USE) || @sprites["credit"].score == Settings::MAX_COINS @sprites["credit"].score += @sprites["payout"].score @sprites["payout"].score = 0 end @@ -295,7 +295,7 @@ class SlotMachineScene elsif @gameRunning # Reels are spinning @sprites["window1"].setBitmap(sprintf("Graphics/Pictures/Slot Machine/stop")) @sprites["window1"].src_rect.set(152*((frame/spinFrameTime)%4),0,152,208) - if Input.trigger?(Input::C) + if Input.trigger?(Input::USE) pbSEPlay("Slots stop") if @sprites["reel1"].spinning @sprites["reel1"].stopSpinning(@replay) @@ -343,7 +343,7 @@ class SlotMachineScene @sprites["row1"].visible=true end elsif @wager>=3 || (@wager>0 && @sprites["credit"].score==0) || - (Input.trigger?(Input::C) && @wager>0) || @replay + (Input.trigger?(Input::USE) && @wager>0) || @replay if @replay @wager=3 for i in 1..5 @@ -355,7 +355,7 @@ class SlotMachineScene @sprites["reel3"].startSpinning frame=0 @gameRunning=true - elsif Input.trigger?(Input::B) && @wager==0 + elsif Input.trigger?(Input::BACK) && @wager==0 break end end diff --git a/Data/Scripts/018_Minigames/004_PMinigame_VoltorbFlip.rb b/Data/Scripts/018_Minigames/004_PMinigame_VoltorbFlip.rb index 8d8b04944..c5dee2d0a 100644 --- a/Data/Scripts/018_Minigames/004_PMinigame_VoltorbFlip.rb +++ b/Data/Scripts/018_Minigames/004_PMinigame_VoltorbFlip.rb @@ -255,7 +255,7 @@ class VoltorbFlip @index[0]=0 @sprites["cursor"].x=0 end - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) if @cursor[0][3]==64 # If in mark mode for i in 0...@squares.length if @index[0]*64+128==@squares[i][0] && @index[1]*64==@squares[i][1] && @squares[i][3]==false @@ -404,7 +404,7 @@ class VoltorbFlip @cursor[0]=[@directory+"cursor",128,0,0,0,64,64] @sprites["memo"].visible=false end - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) @sprites["curtain"].opacity=100 if @points==0 if pbConfirmMessage("You haven't found any Coins! Are you sure you want to quit?") @@ -518,7 +518,7 @@ class VoltorbFlip Graphics.update Input.update update - if Input.trigger?(Input::C) || Input.trigger?(Input::B) + if Input.trigger?(Input::USE) || Input.trigger?(Input::BACK) break end end diff --git a/Data/Scripts/018_Minigames/006_PMinigame_Mining.rb b/Data/Scripts/018_Minigames/006_PMinigame_Mining.rb index ee3d4118d..7dbd75d45 100644 --- a/Data/Scripts/018_Minigames/006_PMinigame_Mining.rb +++ b/Data/Scripts/018_Minigames/006_PMinigame_Mining.rb @@ -561,15 +561,15 @@ class MiningGameScene pbSEPlay("Mining cursor") @sprites["cursor"].position+=1 end - elsif Input.trigger?(Input::A) # Change tool mode + elsif Input.trigger?(Input::SPECIAL) # Change tool mode pbSEPlay("Mining tool change") newmode=(@sprites["cursor"].mode+1)%2 @sprites["cursor"].mode=newmode @sprites["tool"].src_rect.set(newmode*68,0,68,100) @sprites["tool"].y=254-144*newmode - elsif Input.trigger?(Input::C) # Hit + elsif Input.trigger?(Input::USE) # Hit pbHit - elsif Input.trigger?(Input::B) # Quit + elsif Input.trigger?(Input::BACK) # Quit break if pbConfirmMessage(_INTL("Are you sure you want to give up?")) end end diff --git a/Data/Scripts/018_Minigames/007_PMinigame_TilePuzzles.rb b/Data/Scripts/018_Minigames/007_PMinigame_TilePuzzles.rb index 07ebc03aa..da665d98b 100644 --- a/Data/Scripts/018_Minigames/007_PMinigame_TilePuzzles.rb +++ b/Data/Scripts/018_Minigames/007_PMinigame_TilePuzzles.rb @@ -512,12 +512,12 @@ class TilePuzzleScene loop do Graphics.update Input.update - break if Input.trigger?(Input::C) || Input.trigger?(Input::B) + break if Input.trigger?(Input::USE) || Input.trigger?(Input::BACK) end return true end # Input - @sprites["cursor"].selected=(Input.press?(Input::C) && @game>=3 && @game<=6) + @sprites["cursor"].selected=(Input.press?(Input::USE) && @game>=3 && @game<=6) dir=0 dir=2 if Input.trigger?(Input::DOWN) || Input.repeat?(Input::DOWN) dir=4 if Input.trigger?(Input::LEFT) || Input.repeat?(Input::LEFT) @@ -535,13 +535,13 @@ class TilePuzzleScene @sprites["cursor"].position=pbMoveCursor(@sprites["cursor"].position,dir) end end - elsif (@game==1 || @game==2) && Input.trigger?(Input::C) + elsif (@game==1 || @game==2) && Input.trigger?(Input::USE) pbGrabTile(@sprites["cursor"].position) - elsif (@game==2 && Input.trigger?(Input::A)) || - (@game==5 && Input.trigger?(Input::A)) || - (@game==7 && Input.trigger?(Input::C)) + elsif (@game==2 && Input.trigger?(Input::SPECIAL)) || + (@game==5 && Input.trigger?(Input::SPECIAL)) || + (@game==7 && Input.trigger?(Input::USE)) pbRotateTile(@sprites["cursor"].position) - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) return false end end diff --git a/Data/Scripts/019_Other battles/006_PBattle_BattleSwap.rb b/Data/Scripts/019_Other battles/006_PBattle_BattleSwap.rb index e83c41a9e..ad10ab5a0 100644 --- a/Data/Scripts/019_Other battles/006_PBattle_BattleSwap.rb +++ b/Data/Scripts/019_Other battles/006_PBattle_BattleSwap.rb @@ -92,10 +92,10 @@ class BattleSwapScene Graphics.update Input.update pbUpdate - if Input.trigger?(Input::B) && canCancel + if Input.trigger?(Input::BACK) && canCancel return -1 end - if Input.trigger?(Input::C) + if Input.trigger?(Input::USE) index=@sprites["list"].index if index==@sprites["list"].commands.length-1 && canCancel return -1 diff --git a/Data/Scripts/021_Debug/001_Debug menus/001_Debug_Menus.rb b/Data/Scripts/021_Debug/001_Debug menus/001_Debug_Menus.rb index 195438172..c51626f78 100644 --- a/Data/Scripts/021_Debug/001_Debug menus/001_Debug_Menus.rb +++ b/Data/Scripts/021_Debug/001_Debug menus/001_Debug_Menus.rb @@ -98,7 +98,7 @@ def pbDebugMenu(show_all = true) end Graphics.update Input.update - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) parent = commands.getParent if parent pbPlayCancelSE @@ -110,7 +110,7 @@ def pbDebugMenu(show_all = true) ret = -1 break end - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) ret = cmdwindow.index break end diff --git a/Data/Scripts/021_Debug/001_Debug menus/002_Debug_MenuCommands.rb b/Data/Scripts/021_Debug/001_Debug menus/002_Debug_MenuCommands.rb index 4dc7e85fa..8d7100cab 100644 --- a/Data/Scripts/021_Debug/001_Debug menus/002_Debug_MenuCommands.rb +++ b/Data/Scripts/021_Debug/001_Debug menus/002_Debug_MenuCommands.rb @@ -448,7 +448,7 @@ DebugMenuCommands.register("additem", { "description" => _INTL("Choose an item and a quantity of it to add to the Bag."), "effect" => proc { pbListScreenBlock(_INTL("ADD ITEM"), ItemLister.new) { |button, item| - if button == Input::C && item + if button == Input::USE && item params = ChooseNumberParams.new params.setRange(1, Settings::BAG_MAX_PER_SLOT) params.setInitialValue(1) diff --git a/Data/Scripts/021_Debug/001_Debug menus/003_Debug_MenuExtraCode.rb b/Data/Scripts/021_Debug/001_Debug menus/003_Debug_MenuExtraCode.rb index 3e1efa4a8..171a9a699 100644 --- a/Data/Scripts/021_Debug/001_Debug menus/003_Debug_MenuExtraCode.rb +++ b/Data/Scripts/021_Debug/001_Debug menus/003_Debug_MenuExtraCode.rb @@ -155,13 +155,13 @@ def pbDebugVariables(mode) Graphics.update Input.update pbUpdateSpriteHash(sprites) - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) pbPlayCancelSE break end current_id = right_window.index+1 if mode==0 # Switches - if Input.trigger?(Input::C) + if Input.trigger?(Input::USE) pbPlayDecisionSE $game_switches[current_id] = !$game_switches[current_id] right_window.refresh @@ -174,7 +174,7 @@ def pbDebugVariables(mode) elsif Input.repeat?(Input::RIGHT) pbDebugSetVariable(current_id,1) right_window.refresh - elsif Input.trigger?(Input::A) + elsif Input.trigger?(Input::SPECIAL) if $game_variables[current_id]==0 $game_variables[current_id] = "" elsif $game_variables[current_id]=="" @@ -186,7 +186,7 @@ def pbDebugVariables(mode) end right_window.refresh $game_map.need_refresh = true - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) pbPlayDecisionSE pbDebugVariableScreen(current_id) right_window.refresh @@ -284,9 +284,9 @@ def pbDebugDayCare pbUpdateSpriteHash(sprites) Graphics.update Input.update - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) break - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) case cmdwindow.index when 0 # Withdraw Pokémon 1 if !$PokemonGlobal.daycare[0][0] @@ -451,7 +451,7 @@ def pbDebugRoamers Graphics.update Input.update pbUpdateSpriteHash(sprites) - if Input.trigger?(Input::A) && cmdwindow.index0 + if Input.trigger?(Input::USE) && animfiles.length>0 begin textdata=loadBase64Anim(IO.read(animfiles[cmdwin.index])) throw "Bad data" if !textdata.is_a?(PBAnimation) @@ -74,7 +74,7 @@ def pbImportAnim(animations,canvas,animwin) animwin.animbitmap=canvas.animbitmap break end - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) break end end diff --git a/Data/Scripts/021_Debug/002_Animation editor/005_AnimEditor_Functions.rb b/Data/Scripts/021_Debug/002_Animation editor/005_AnimEditor_Functions.rb index de98bfdd5..4622076db 100644 --- a/Data/Scripts/021_Debug/002_Animation editor/005_AnimEditor_Functions.rb +++ b/Data/Scripts/021_Debug/002_Animation editor/005_AnimEditor_Functions.rb @@ -46,7 +46,7 @@ def pbSelectAnim(canvas,animwin) bmpwin.update ctlwin.update bmpwin.hue=ctlwin.value(0) if ctlwin.changed?(0) - if Input.trigger?(Input::C) && animfiles.length>0 + if Input.trigger?(Input::USE) && animfiles.length>0 bitmap=AnimatedBitmap.new("Graphics/Animations/"+cmdwin.commands[cmdwin.index],ctlwin.value(0)).deanimate canvas.animation.graphic=cmdwin.commands[cmdwin.index] canvas.animation.hue=ctlwin.value(0) @@ -54,7 +54,7 @@ def pbSelectAnim(canvas,animwin) animwin.animbitmap=bitmap break end - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) break end end @@ -79,7 +79,7 @@ def pbChangeMaximum(canvas) canvas.animation.resize(sliderwin2.value(0)) break end - if sliderwin2.changed?(cancelbutton) || Input.trigger?(Input::B) + if sliderwin2.changed?(cancelbutton) || Input.trigger?(Input::BACK) break end end @@ -149,7 +149,7 @@ def pbAnimList(animations,canvas,animwin) cmdwin.index=animations.selected next end - if Input.trigger?(Input::C) && animations.length>0 + if Input.trigger?(Input::USE) && animations.length>0 cmd2=pbShowCommands(helpwindow,[ _INTL("Load Animation"), _INTL("Rename"), @@ -171,7 +171,7 @@ def pbAnimList(animations,canvas,animwin) end end end - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) break end end @@ -199,7 +199,7 @@ def pbChooseNum(cel) ret=sliderwin2.value(1) break end - if sliderwin2.changed?(cancelbutton) || Input.trigger?(Input::B) + if sliderwin2.changed?(cancelbutton) || Input.trigger?(Input::BACK) ret=-1 break end @@ -234,7 +234,7 @@ def pbSetTone(cel,previewsprite) cel[AnimFrame::TONEGRAY]=sliderwin2.value(3) break end - if sliderwin2.changed?(cancelbutton) || Input.trigger?(Input::B) + if sliderwin2.changed?(cancelbutton) || Input.trigger?(Input::BACK) break end end @@ -268,7 +268,7 @@ def pbSetFlash(cel,previewsprite) cel[AnimFrame::COLORALPHA]=sliderwin2.value(3) break end - if sliderwin2.changed?(cancelbutton) || Input.trigger?(Input::B) + if sliderwin2.changed?(cancelbutton) || Input.trigger?(Input::BACK) break end end @@ -366,7 +366,7 @@ def pbCellProperties(canvas) thiscel[0,thiscel.length]=cel break end - if sliderwin2.changed?(cancelbutton) || Input.trigger?(Input::B) + if sliderwin2.changed?(cancelbutton) || Input.trigger?(Input::BACK) break end end @@ -435,7 +435,7 @@ def pbTimingList(canvas) next end end - if Input.trigger?(Input::C) + if Input.trigger?(Input::USE) redrawcmds=false if cmdwin.index==cmdNewSound # Add new sound newaudio=PBAnimTiming.new(0) @@ -500,7 +500,7 @@ def pbTimingList(canvas) cmdwin.commands[cmdEditFO=cmdwin.commands.length]=_INTL("Add: Edit Foreground Color/Location...") cmdwin.refresh end - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) break end end @@ -562,11 +562,11 @@ def pbSelectSE(canvas,audio) if maxsizewindow.changed?(6) # Cancel break end - if Input.trigger?(Input::C) && animfiles.length>0 + if Input.trigger?(Input::USE) && animfiles.length>0 filename=(cmdwin.index==0) ? "" : cmdwin.commands[cmdwin.index] displayname=(filename!="") ? filename : _INTL("") maxsizewindow.controls[0].text=_INTL("File: \"{1}\"",displayname) - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) break end end @@ -625,10 +625,10 @@ def pbSelectBG(canvas,timing) if maxsizewindow.changed?(9) # Cancel break end - if Input.trigger?(Input::C) && animfiles.length>0 + if Input.trigger?(Input::USE) && animfiles.length>0 filename=(cmdwin.index==cmdErase) ? "" : cmdwin.commands[cmdwin.index] maxsizewindow.controls[0].text=_INTL("File: \"{1}\"",filename) - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) break end end @@ -688,7 +688,7 @@ def pbEditBG(canvas,timing) if maxsizewindow.changed?(9) # Cancel break end - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) break end end @@ -735,7 +735,7 @@ def pbCopyFrames(canvas) end break end - if sliderwin2.changed?(cancelbutton) || Input.trigger?(Input::B) + if sliderwin2.changed?(cancelbutton) || Input.trigger?(Input::BACK) break end end @@ -763,7 +763,7 @@ def pbClearFrames(canvas) end break end - if sliderwin2.changed?(cancelbutton) || Input.trigger?(Input::B) + if sliderwin2.changed?(cancelbutton) || Input.trigger?(Input::BACK) break end end @@ -788,7 +788,7 @@ def pbTweening(canvas) Graphics.update Input.update sliderwin2.update - if sliderwin2.changed?(okbutton) || Input.trigger?(Input::C) + if sliderwin2.changed?(okbutton) || Input.trigger?(Input::USE) startframe=sliderwin2.value(s1set0)-1 endframe=sliderwin2.value(s1set1)-1 break if startframe>=endframe @@ -841,7 +841,7 @@ def pbTweening(canvas) canvas.invalidate break end - if sliderwin2.changed?(cancelbutton) || Input.trigger?(Input::B) + if sliderwin2.changed?(cancelbutton) || Input.trigger?(Input::BACK) break end end @@ -880,7 +880,7 @@ def pbCellBatch(canvas) Input.update sliderwin1.update sliderwin2.update - if sliderwin2.changed?(okbutton) || Input.trigger?(Input::C) + if sliderwin2.changed?(okbutton) || Input.trigger?(Input::USE) startframe=sliderwin1.value(s1set0)-1 endframe=sliderwin1.value(s1set1)-1 startcel=sliderwin1.value(s1set2) @@ -905,7 +905,7 @@ def pbCellBatch(canvas) canvas.invalidate break end - if sliderwin2.changed?(cancelbutton) || Input.trigger?(Input::B) + if sliderwin2.changed?(cancelbutton) || Input.trigger?(Input::BACK) break end end @@ -937,7 +937,7 @@ def pbEntireSlide(canvas) end break end - if sliderwin2.changed?(cancelbutton) || Input.trigger?(Input::B) + if sliderwin2.changed?(cancelbutton) || Input.trigger?(Input::BACK) break end end @@ -960,7 +960,7 @@ def pbAnimEditorHelpWindow Graphics.update Input.update cmdwin.update - break if Input.trigger?(Input::B) || Input.trigger?(Input::C) + break if Input.trigger?(Input::BACK) || Input.trigger?(Input::USE) end cmdwin.dispose end @@ -1013,7 +1013,7 @@ def animationEditorMain(animation) if animwin.changed? canvas.pattern=animwin.selected end - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) if pbConfirmMessage(_INTL("Save changes?")) save_data(animation,"Data/PkmnAnimations.rxdata") $PokemonTemp.battleAnims = nil diff --git a/Data/Scripts/021_Debug/004_Editor_Screens.rb b/Data/Scripts/021_Debug/004_Editor_Screens.rb index 3741c54a7..32ad4ad4e 100644 --- a/Data/Scripts/021_Debug/004_Editor_Screens.rb +++ b/Data/Scripts/021_Debug/004_Editor_Screens.rb @@ -353,7 +353,7 @@ def pbTrainerTypeEditor ] pbListScreenBlock(_INTL("Trainer Types"), TrainerTypeLister.new(0, true)) { |button, tr_type| if tr_type - if button == Input::A + if button == Input::SPECIAL if tr_type.is_a?(Symbol) if pbConfirmMessageSerious("Delete this trainer type?") id_number = GameData::TrainerType.get(tr_type).id_number @@ -364,7 +364,7 @@ def pbTrainerTypeEditor pbMessage(_INTL("The Trainer type was deleted.")) end end - elsif button == Input::C + elsif button == Input::USE if tr_type.is_a?(Symbol) t_data = GameData::TrainerType.get(tr_type) data = [ @@ -501,7 +501,7 @@ def pbTrainerBattleEditor modified = false pbListScreenBlock(_INTL("Trainer Battles"), TrainerBattleLister.new(0, true)) { |button, trainer_id| if trainer_id - if button == Input::A + if button == Input::SPECIAL if trainer_id.is_a?(Array) if pbConfirmMessageSerious("Delete this trainer battle?") tr_data = GameData::Trainer::DATA[trainer_id] @@ -511,7 +511,7 @@ def pbTrainerBattleEditor pbMessage(_INTL("The Trainer battle was deleted.")) end end - elsif button == Input::C + elsif button == Input::USE if trainer_id.is_a?(Array) # Edit existing trainer tr_data = GameData::Trainer::DATA[trainer_id] old_type = tr_data.trainer_type @@ -826,7 +826,7 @@ def pbItemEditor ] pbListScreenBlock(_INTL("Items"), ItemLister.new(0, true)) { |button, item| if item - if button == Input::A + if button == Input::SPECIAL if item.is_a?(Symbol) if pbConfirmMessageSerious("Delete this item?") id_number = GameData::Item.get(item).id_number @@ -837,7 +837,7 @@ def pbItemEditor pbMessage(_INTL("The item was deleted.")) end end - elsif button == Input::C + elsif button == Input::USE if item.is_a?(Symbol) itm = GameData::Item.get(item) data = [ @@ -993,7 +993,7 @@ def pbPokemonEditor ] pbListScreenBlock(_INTL("Pokémon species"), SpeciesLister.new(0, false)) { |button, species| if species - if button == Input::A + if button == Input::SPECIAL if species.is_a?(Symbol) if pbConfirmMessageSerious("Delete this species?") id_number = GameData::Species.get(species).id_number @@ -1004,7 +1004,7 @@ def pbPokemonEditor pbMessage(_INTL("The species was deleted.")) end end - elsif button == Input::C + elsif button == Input::USE if species.is_a?(Symbol) spec = GameData::Species.get(species) moves = [] diff --git a/Data/Scripts/021_Debug/007_Editor_DataTypes.rb b/Data/Scripts/021_Debug/007_Editor_DataTypes.rb index 92db198c7..cc0f6ad6f 100644 --- a/Data/Scripts/021_Debug/007_Editor_DataTypes.rb +++ b/Data/Scripts/021_Debug/007_Editor_DataTypes.rb @@ -646,7 +646,7 @@ def chooseMapPoint(map,rgnmap=false) ret=xy break end - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) ret=nil break end @@ -1485,7 +1485,7 @@ def pbPropertyList(title,data,properties,saveprompt=false) desc.text = properties[list.index][2] selectedmap = list.index end - if Input.trigger?(Input::A) + if Input.trigger?(Input::SPECIAL) propobj = properties[selectedmap][1] if propobj!=ReadOnlyProperty && !propobj.is_a?(ReadOnlyProperty) && pbConfirmMessage(_INTL("Reset the setting {1}?",properties[selectedmap][0])) @@ -1501,10 +1501,10 @@ def pbPropertyList(title,data,properties,saveprompt=false) commands.push(sprintf("%s=%s",properties[i][0],propobj.format(data[i]))) end list.commands = commands - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) selectedmap = -1 break - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) propobj = properties[selectedmap][1] oldsetting = data[selectedmap] newsetting = propobj.set(properties[selectedmap][0],oldsetting) diff --git a/Data/Scripts/021_Debug/008_Editor_Listers.rb b/Data/Scripts/021_Debug/008_Editor_Listers.rb index 74aaac281..5c19b9fe0 100644 --- a/Data/Scripts/021_Debug/008_Editor_Listers.rb +++ b/Data/Scripts/021_Debug/008_Editor_Listers.rb @@ -41,10 +41,10 @@ def pbListScreen(title,lister) lister.refresh(list.index) selectedmap = list.index end - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) selectedmap = -1 break - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) break end end @@ -88,17 +88,17 @@ def pbListScreenBlock(title,lister) lister.refresh(list.index) selectedmap = list.index end - if Input.trigger?(Input::A) - yield(Input::A, lister.value(selectedmap)) + if Input.trigger?(Input::SPECIAL) + yield(Input::SPECIAL, lister.value(selectedmap)) list.commands = lister.commands if list.index==list.commands.length list.index = list.commands.length end lister.refresh(list.index) - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) break - elsif Input.trigger?(Input::C) - yield(Input::C, lister.value(selectedmap)) + elsif Input.trigger?(Input::USE) + yield(Input::USE, lister.value(selectedmap)) list.commands = lister.commands if list.index==list.commands.length list.index = list.commands.length diff --git a/Data/Scripts/021_Debug/009_Editor_Utilities.rb b/Data/Scripts/021_Debug/009_Editor_Utilities.rb index 5e27503f8..7117e25e8 100644 --- a/Data/Scripts/021_Debug/009_Editor_Utilities.rb +++ b/Data/Scripts/021_Debug/009_Editor_Utilities.rb @@ -113,8 +113,8 @@ end #=============================================================================== # Displays a list of all Pokémon species, and returns the ID of the species # selected (or nil if the selection was canceled). "default", if specified, is -# the ID of the species to initially select. Pressing Input::A will toggle the -# list sorting between numerical and alphabetical. +# the ID of the species to initially select. Pressing Input::SPECIAL will toggle +# the list sorting between numerical and alphabetical. def pbChooseSpeciesList(default = nil) commands = [] GameData::Species.each { |s| commands.push([s.id_number, s.real_name, s.id]) if s.form == 0 } @@ -132,8 +132,8 @@ end # Displays a list of all moves, and returns the ID of the move selected (or nil # if the selection was canceled). "default", if specified, is the ID of the move -# to initially select. Pressing Input::A will toggle the list sorting between -# numerical and alphabetical. +# to initially select. Pressing Input::SPECIAL will toggle the list sorting +# between numerical and alphabetical. def pbChooseMoveList(default = nil) commands = [] GameData::Move.each { |i| commands.push([i.id_number, i.real_name, i.id]) } @@ -178,8 +178,8 @@ end # Displays a list of all types, and returns the ID of the type selected (or nil # if the selection was canceled). "default", if specified, is the ID of the type -# to initially select. Pressing Input::A will toggle the list sorting between -# numerical and alphabetical. +# to initially select. Pressing Input::SPECIAL will toggle the list sorting +# between numerical and alphabetical. def pbChooseTypeList(default = nil) commands = [] GameData::Type.each { |t| commands.push([t.id_number, t.name, t.id]) if !t.pseudo_type } @@ -188,8 +188,8 @@ end # Displays a list of all items, and returns the ID of the item selected (or nil # if the selection was canceled). "default", if specified, is the ID of the item -# to initially select. Pressing Input::A will toggle the list sorting between -# numerical and alphabetical. +# to initially select. Pressing Input::SPECIAL will toggle the list sorting +# between numerical and alphabetical. def pbChooseItemList(default = nil) commands = [] GameData::Item.each { |i| commands.push([i.id_number, i.name, i.id]) } @@ -198,7 +198,7 @@ end # Displays a list of all abilities, and returns the ID of the ability selected # (or nil if the selection was canceled). "default", if specified, is the ID of -# the ability to initially select. Pressing Input::A will toggle the list +# the ability to initially select. Pressing Input::SPECIAL will toggle the list # sorting between numerical and alphabetical. def pbChooseAbilityList(default = nil) commands = [] @@ -253,7 +253,7 @@ def pbCommands2(cmdwindow,commands,cmdIfCancel,defaultindex=-1,noresize=false) Graphics.update Input.update cmdwindow.update - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) if cmdIfCancel>0 command = cmdIfCancel-1 break @@ -261,7 +261,7 @@ def pbCommands2(cmdwindow,commands,cmdIfCancel,defaultindex=-1,noresize=false) command = cmdIfCancel break end - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) command = cmdwindow.index break end @@ -290,10 +290,10 @@ def pbCommands3(cmdwindow,commands,cmdIfCancel,defaultindex=-1,noresize=false) Graphics.update Input.update cmdwindow.update - if Input.trigger?(Input::F5) + if Input.trigger?(Input::Z) command = [5,cmdwindow.index] break - elsif Input.press?(Input::A) + elsif Input.press?(Input::SPECIAL) if Input.repeat?(Input::UP) command = [1,cmdwindow.index] break @@ -307,7 +307,7 @@ def pbCommands3(cmdwindow,commands,cmdIfCancel,defaultindex=-1,noresize=false) command = [4,cmdwindow.index] break end - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) if cmdIfCancel>0 command = [0,cmdIfCancel-1] break @@ -315,7 +315,7 @@ def pbCommands3(cmdwindow,commands,cmdIfCancel,defaultindex=-1,noresize=false) command = [0,cmdIfCancel] break end - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) command = [0,cmdwindow.index] break end @@ -381,13 +381,13 @@ def pbCommandsSortable(cmdwindow,commands,cmdIfCancel,defaultindex=-1,sortable=f Graphics.update Input.update cmdwindow.update - if Input.trigger?(Input::A) && sortable + if Input.trigger?(Input::SPECIAL) && sortable command = [1,cmdwindow.index] break - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) command = [0,(cmdIfCancel>0) ? cmdIfCancel-1 : cmdIfCancel] break - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) command = [0,cmdwindow.index] break end diff --git a/Data/Scripts/021_Debug/010_Editor_TilesetTerrainTags.rb b/Data/Scripts/021_Debug/010_Editor_TilesetTerrainTags.rb index d4824db07..96571f5a0 100644 --- a/Data/Scripts/021_Debug/010_Editor_TilesetTerrainTags.rb +++ b/Data/Scripts/021_Debug/010_Editor_TilesetTerrainTags.rb @@ -172,7 +172,7 @@ class PokemonTilesetScene update_cursor_position(0, -Graphics.height / TILE_SIZE) elsif Input.repeat?(Input::R) update_cursor_position(0, Graphics.height / TILE_SIZE) - elsif Input.trigger?(Input::A) + elsif Input.trigger?(Input::SPECIAL) commands = [ _INTL("Go to bottom"), _INTL("Go to top"), @@ -191,7 +191,7 @@ class PokemonTilesetScene when 2 pbChooseTileset end - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) if pbConfirmMessage(_INTL("Save changes?")) @tilesetwrapper.save $data_tilesets = @tilesetwrapper.data @@ -206,7 +206,7 @@ class PokemonTilesetScene pbMessage(_INTL("To ensure that the changes remain, close and reopen RPG Maker XP.")) end break if pbConfirmMessage(_INTL("Exit from the editor?")) - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) selected = pbGetSelected(@x, @y) params = ChooseNumberParams.new params.setRange(0, 99) diff --git a/Data/Scripts/021_Debug/011_Editor_MapConnections.rb b/Data/Scripts/021_Debug/011_Editor_MapConnections.rb index d3a97b899..42bfa8fb2 100644 --- a/Data/Scripts/021_Debug/011_Editor_MapConnections.rb +++ b/Data/Scripts/021_Debug/011_Editor_MapConnections.rb @@ -367,7 +367,7 @@ class MapScreenScene loop do Graphics.update Input.update - break if Input.trigger?(Input::B) || Input.trigger?(Input::C) + break if Input.trigger?(Input::BACK) || Input.trigger?(Input::USE) end Input.update title.dispose @@ -560,7 +560,7 @@ class MapScreenScene Graphics.update Input.update update - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) if pbConfirmMessage(_INTL("Save changes?")) serializeConnectionData MapFactoryHelper.clear diff --git a/Data/Scripts/021_Debug/012_Editor_SpritePositioning.rb b/Data/Scripts/021_Debug/012_Editor_SpritePositioning.rb index 257d23b5f..00aafee25 100644 --- a/Data/Scripts/021_Debug/012_Editor_SpritePositioning.rb +++ b/Data/Scripts/021_Debug/012_Editor_SpritePositioning.rb @@ -195,16 +195,16 @@ class SpritePositioner pbChangeSpecies(@species) refresh end - if Input.trigger?(Input::A) # Cycle to next option + if Input.trigger?(Input::SPECIAL) # Cycle to next option pbPlayDecisionSE @metricsChanged = true if species_data.shadow_size != oldval ret = true break - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) species_data.shadow_size = oldval pbPlayCancelSE break - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) pbPlayDecisionSE break end @@ -266,12 +266,12 @@ class SpritePositioner end refresh end - if Input.repeat?(Input::A) && param != 3 # Cycle to next option + if Input.repeat?(Input::SPECIAL) && param != 3 # Cycle to next option @metricsChanged = true if xpos != oldxpos || ypos != oldypos ret = true pbPlayDecisionSE break - elsif Input.repeat?(Input::B) + elsif Input.repeat?(Input::BACK) case param when 0 species_data.back_sprite_x = oldxpos @@ -285,7 +285,7 @@ class SpritePositioner pbPlayCancelSE refresh break - elsif Input.repeat?(Input::C) + elsif Input.repeat?(Input::USE) @metricsChanged = true if xpos != oldxpos || (param != 3 && ypos != oldypos) pbPlayDecisionSE break @@ -315,11 +315,11 @@ class SpritePositioner Input.update cw.update self.update - if Input.trigger?(Input::C) + if Input.trigger?(Input::USE) pbPlayDecisionSE ret = cw.index break - elsif Input.trigger?(Input::B) + elsif Input.trigger?(Input::BACK) pbPlayCancelSE break end @@ -360,11 +360,11 @@ class SpritePositioner refresh end self.update - if Input.trigger?(Input::B) + if Input.trigger?(Input::BACK) pbChangeSpecies(nil) refresh break - elsif Input.trigger?(Input::C) + elsif Input.trigger?(Input::USE) pbChangeSpecies(allspecies[cw.index][0]) ret = allspecies[cw.index][0] break diff --git a/mkxp.json b/mkxp.json index 38ad99f59..53b449963 100644 --- a/mkxp.json +++ b/mkxp.json @@ -194,6 +194,14 @@ // "allowSymlinks": false, + // Names of the input buttons in the F1 key bindings + // window. This only affects the names displayed + // there, and won't enable those names as Input + // constants in the scripts. + "bindingNames": {"c": "Use", + "b": "Back", + "a": "Special"}, + // Organisation / company and application / game // name to build the directory path where mkxp // will store game specific data (eg. key bindings).