diff --git a/Data/CommonEvents.rxdata b/Data/CommonEvents.rxdata index eda286d51..a5a6a83e8 100644 Binary files a/Data/CommonEvents.rxdata and b/Data/CommonEvents.rxdata differ diff --git a/Data/Map019.rxdata b/Data/Map019.rxdata index c1bc75a91..1e4848a87 100644 Binary files a/Data/Map019.rxdata and b/Data/Map019.rxdata differ diff --git a/Data/Scripts/016_UI/015_UI_Options.rb b/Data/Scripts/016_UI/015_UI_Options.rb index a35a5bb56..b8f4c7ad0 100644 --- a/Data/Scripts/016_UI/015_UI_Options.rb +++ b/Data/Scripts/016_UI/015_UI_Options.rb @@ -187,6 +187,13 @@ class Window_PokemonOption < Window_DrawableCommand super(x, y, width, height) end + def nameBaseColor=(value) + @nameBaseColor=value + end + def nameShadowColor=(value) + @nameShadowColor=value + end + def [](i) return @optvalues[i] end @@ -206,7 +213,7 @@ class Window_PokemonOption < Window_DrawableCommand def drawItem(index, _count, rect) rect = drawCursor(index, rect) - optionname = (index == @options.length) ? _INTL("Cancel") : @options[index].name + optionname = (index == @options.length) ? _INTL("Confirm") : @options[index].name optionwidth = rect.width * 9 / 20 pbDrawShadowText(self.contents, rect.x, rect.y, optionwidth, rect.height, optionname, @nameBaseColor, @nameShadowColor) @@ -303,7 +310,27 @@ class PokemonOption_Scene # These are the different options in the game. To add an option, define a # setter and a getter for that option. To delete an option, comment it out # or delete it. The game's options may be placed in any order. - @PokemonOptions = [ + @PokemonOptions = pbGetOptions(inloadscreen) + + + + @PokemonOptions = pbAddOnOptions(@PokemonOptions) + @sprites["option"] = Window_PokemonOption.new(@PokemonOptions, 0, + @sprites["title"].height, Graphics.width, + Graphics.height - @sprites["title"].height - @sprites["textbox"].height) + @sprites["option"].viewport = @viewport + @sprites["option"].visible = true + # Get the values of each option + for i in 0...@PokemonOptions.length + @sprites["option"].setValueNoRefresh(i, (@PokemonOptions[i].get || 0)) + end + @sprites["option"].refresh + pbDeactivateWindows(@sprites) + pbFadeInAndShow(@sprites) { pbUpdate } + end + + def pbGetOptions(inloadscreen = false) + options = [ SliderOption.new(_INTL("Music Volume"), 0, 100, 5, proc { $PokemonSystem.bgmvolume }, proc { |value| @@ -377,10 +404,17 @@ class PokemonOption_Scene pbSetResizeFactor($PokemonSystem.screensize) end } + ), + EnumOption.new(_INTL("Quick Surf"), [_INTL("Off"), _INTL("On")], + proc { $PokemonSystem.quicksurf }, + proc { |value| $PokemonSystem.quicksurf = value } ) + ] + + if $game_switches && ($game_switches[NEW_GAME_PLUS] || $game_switches[BEAT_THE_LEAGUE]) #beat the league - @PokemonOptions << + options << EnumOption.new(_INTL("Battle type"), [_INTL("1v1"), _INTL("2v2"), _INTL("3v3")], proc { $PokemonSystem.battle_type }, proc { |value| @@ -398,30 +432,10 @@ class PokemonOption_Scene ) end - - # if $game_switches && $game_switches[GOT_BADGE_5] #badge for Surf - @PokemonOptions << - EnumOption.new(_INTL("Quick Surf"), [_INTL("Off"), _INTL("On")], - proc { $PokemonSystem.quicksurf }, - proc { |value| $PokemonSystem.quicksurf = value } - ) - # end - - @PokemonOptions = pbAddOnOptions(@PokemonOptions) - @sprites["option"] = Window_PokemonOption.new(@PokemonOptions, 0, - @sprites["title"].height, Graphics.width, - Graphics.height - @sprites["title"].height - @sprites["textbox"].height) - @sprites["option"].viewport = @viewport - @sprites["option"].visible = true - # Get the values of each option - for i in 0...@PokemonOptions.length - @sprites["option"].setValueNoRefresh(i, (@PokemonOptions[i].get || 0)) - end - @sprites["option"].refresh - pbDeactivateWindows(@sprites) - pbFadeInAndShow(@sprites) { pbUpdate } + return options end + def pbAddOnOptions(options) return options end diff --git a/Data/Scripts/025-Randomizer/RandomizerSettings.rb b/Data/Scripts/025-Randomizer/RandomizerSettings.rb index 4b043ef3b..a66ac7e48 100644 --- a/Data/Scripts/025-Randomizer/RandomizerSettings.rb +++ b/Data/Scripts/025-Randomizer/RandomizerSettings.rb @@ -15,10 +15,9 @@ class RandomizerOptionsScene < PokemonOption_Scene super @openTrainerOptions = false @openWildOptions = false - end - def pbStartScene + def pbStartScene(inloadscreen = false) super @changedColor = true @sprites["title"]=Window_UnformattedTextPokemon.newWithSize( @@ -27,7 +26,7 @@ class RandomizerOptionsScene < PokemonOption_Scene pbFadeInAndShow(@sprites) { pbUpdate } end - def pbGetOptionsIngame() + def pbGetOptions(inloadscreen = false) options = [ EnumOption.new(_INTL("Starters"), [_INTL("On"), _INTL("Off")], proc { $game_switches[RANDOM_STARTERS] ? 0 : 1 }, @@ -77,22 +76,20 @@ class RandomizerOptionsScene < PokemonOption_Scene def openTrainerOptionsMenu() return if !@openTrainerOptions - scene = RandomizerTrainerOptionsScene.new - screen = PokemonOption.new(scene) - pbFadeOutIn(99999) { + pbFadeOutIn { + scene = RandomizerTrainerOptionsScene.new + screen = PokemonOptionScreen.new(scene) screen.pbStartScreen - pbUpdateSceneMap } @openTrainerOptions = false end def openWildPokemonOptionsMenu() return if !@openWildOptions - scene = RandomizerWildPokemonOptionsScene.new - screen = PokemonOption.new(scene) - pbFadeOutIn(99999) { + pbFadeOutIn { + scene = RandomizerWildPokemonOptionsScene.new + screen = PokemonOptionScreen.new(scene) screen.pbStartScreen - pbUpdateSceneMap } @openWildOptions = false end @@ -110,7 +107,7 @@ class RandomizerTrainerOptionsScene < PokemonOption_Scene @changedColor = false end - def pbStartScene + def pbStartScene(inloadscreen = false) super @sprites["option"].nameBaseColor = Color.new(35, 130, 200) @sprites["option"].nameShadowColor = Color.new(20, 75, 115) @@ -131,7 +128,7 @@ class RandomizerTrainerOptionsScene < PokemonOption_Scene super end - def pbGetOptionsIngame() + def pbGetOptions(inloadscreen = false) options = [ EnumOption.new(_INTL("Custom Sprites only"), [_INTL("On"), _INTL("Off")], proc { $game_switches[RANDOM_TEAMS_CUSTOM_SPRITES] ? 0 : 1 }, @@ -169,7 +166,7 @@ class RandomizerWildPokemonOptionsScene < PokemonOption_Scene @changedColor = false end - def pbStartScene + def pbStartScene(inloadscreen = false) super @sprites["option"].nameBaseColor = Color.new(70, 170, 40) @sprites["option"].nameShadowColor = Color.new(40, 100, 20) @@ -188,7 +185,7 @@ class RandomizerWildPokemonOptionsScene < PokemonOption_Scene super end - def pbGetOptionsIngame() + def pbGetOptions(inloadscreen = false) options = [ EnumOption.new(_INTL("Type"), [_INTL("Global"), _INTL("Area")], proc { diff --git a/Data/System.rxdata b/Data/System.rxdata index 23e213b6a..e9857e0b2 100644 Binary files a/Data/System.rxdata and b/Data/System.rxdata differ