mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Fixes randomizer options menu
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -187,6 +187,13 @@ class Window_PokemonOption < Window_DrawableCommand
|
|||||||
super(x, y, width, height)
|
super(x, y, width, height)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def nameBaseColor=(value)
|
||||||
|
@nameBaseColor=value
|
||||||
|
end
|
||||||
|
def nameShadowColor=(value)
|
||||||
|
@nameShadowColor=value
|
||||||
|
end
|
||||||
|
|
||||||
def [](i)
|
def [](i)
|
||||||
return @optvalues[i]
|
return @optvalues[i]
|
||||||
end
|
end
|
||||||
@@ -206,7 +213,7 @@ class Window_PokemonOption < Window_DrawableCommand
|
|||||||
|
|
||||||
def drawItem(index, _count, rect)
|
def drawItem(index, _count, rect)
|
||||||
rect = drawCursor(index, 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
|
optionwidth = rect.width * 9 / 20
|
||||||
pbDrawShadowText(self.contents, rect.x, rect.y, optionwidth, rect.height, optionname,
|
pbDrawShadowText(self.contents, rect.x, rect.y, optionwidth, rect.height, optionname,
|
||||||
@nameBaseColor, @nameShadowColor)
|
@nameBaseColor, @nameShadowColor)
|
||||||
@@ -303,7 +310,27 @@ class PokemonOption_Scene
|
|||||||
# These are the different options in the game. To add an option, define a
|
# 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
|
# 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.
|
# 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,
|
SliderOption.new(_INTL("Music Volume"), 0, 100, 5,
|
||||||
proc { $PokemonSystem.bgmvolume },
|
proc { $PokemonSystem.bgmvolume },
|
||||||
proc { |value|
|
proc { |value|
|
||||||
@@ -377,10 +404,17 @@ class PokemonOption_Scene
|
|||||||
pbSetResizeFactor($PokemonSystem.screensize)
|
pbSetResizeFactor($PokemonSystem.screensize)
|
||||||
end
|
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
|
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")],
|
EnumOption.new(_INTL("Battle type"), [_INTL("1v1"), _INTL("2v2"), _INTL("3v3")],
|
||||||
proc { $PokemonSystem.battle_type },
|
proc { $PokemonSystem.battle_type },
|
||||||
proc { |value|
|
proc { |value|
|
||||||
@@ -398,30 +432,10 @@ class PokemonOption_Scene
|
|||||||
)
|
)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
return options
|
||||||
# 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 }
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def pbAddOnOptions(options)
|
def pbAddOnOptions(options)
|
||||||
return options
|
return options
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -15,10 +15,9 @@ class RandomizerOptionsScene < PokemonOption_Scene
|
|||||||
super
|
super
|
||||||
@openTrainerOptions = false
|
@openTrainerOptions = false
|
||||||
@openWildOptions = false
|
@openWildOptions = false
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def pbStartScene
|
def pbStartScene(inloadscreen = false)
|
||||||
super
|
super
|
||||||
@changedColor = true
|
@changedColor = true
|
||||||
@sprites["title"]=Window_UnformattedTextPokemon.newWithSize(
|
@sprites["title"]=Window_UnformattedTextPokemon.newWithSize(
|
||||||
@@ -27,7 +26,7 @@ class RandomizerOptionsScene < PokemonOption_Scene
|
|||||||
pbFadeInAndShow(@sprites) { pbUpdate }
|
pbFadeInAndShow(@sprites) { pbUpdate }
|
||||||
end
|
end
|
||||||
|
|
||||||
def pbGetOptionsIngame()
|
def pbGetOptions(inloadscreen = false)
|
||||||
options = [
|
options = [
|
||||||
EnumOption.new(_INTL("Starters"), [_INTL("On"), _INTL("Off")],
|
EnumOption.new(_INTL("Starters"), [_INTL("On"), _INTL("Off")],
|
||||||
proc { $game_switches[RANDOM_STARTERS] ? 0 : 1 },
|
proc { $game_switches[RANDOM_STARTERS] ? 0 : 1 },
|
||||||
@@ -77,22 +76,20 @@ class RandomizerOptionsScene < PokemonOption_Scene
|
|||||||
|
|
||||||
def openTrainerOptionsMenu()
|
def openTrainerOptionsMenu()
|
||||||
return if !@openTrainerOptions
|
return if !@openTrainerOptions
|
||||||
|
pbFadeOutIn {
|
||||||
scene = RandomizerTrainerOptionsScene.new
|
scene = RandomizerTrainerOptionsScene.new
|
||||||
screen = PokemonOption.new(scene)
|
screen = PokemonOptionScreen.new(scene)
|
||||||
pbFadeOutIn(99999) {
|
|
||||||
screen.pbStartScreen
|
screen.pbStartScreen
|
||||||
pbUpdateSceneMap
|
|
||||||
}
|
}
|
||||||
@openTrainerOptions = false
|
@openTrainerOptions = false
|
||||||
end
|
end
|
||||||
|
|
||||||
def openWildPokemonOptionsMenu()
|
def openWildPokemonOptionsMenu()
|
||||||
return if !@openWildOptions
|
return if !@openWildOptions
|
||||||
|
pbFadeOutIn {
|
||||||
scene = RandomizerWildPokemonOptionsScene.new
|
scene = RandomizerWildPokemonOptionsScene.new
|
||||||
screen = PokemonOption.new(scene)
|
screen = PokemonOptionScreen.new(scene)
|
||||||
pbFadeOutIn(99999) {
|
|
||||||
screen.pbStartScreen
|
screen.pbStartScreen
|
||||||
pbUpdateSceneMap
|
|
||||||
}
|
}
|
||||||
@openWildOptions = false
|
@openWildOptions = false
|
||||||
end
|
end
|
||||||
@@ -110,7 +107,7 @@ class RandomizerTrainerOptionsScene < PokemonOption_Scene
|
|||||||
@changedColor = false
|
@changedColor = false
|
||||||
end
|
end
|
||||||
|
|
||||||
def pbStartScene
|
def pbStartScene(inloadscreen = false)
|
||||||
super
|
super
|
||||||
@sprites["option"].nameBaseColor = Color.new(35, 130, 200)
|
@sprites["option"].nameBaseColor = Color.new(35, 130, 200)
|
||||||
@sprites["option"].nameShadowColor = Color.new(20, 75, 115)
|
@sprites["option"].nameShadowColor = Color.new(20, 75, 115)
|
||||||
@@ -131,7 +128,7 @@ class RandomizerTrainerOptionsScene < PokemonOption_Scene
|
|||||||
super
|
super
|
||||||
end
|
end
|
||||||
|
|
||||||
def pbGetOptionsIngame()
|
def pbGetOptions(inloadscreen = false)
|
||||||
options = [
|
options = [
|
||||||
EnumOption.new(_INTL("Custom Sprites only"), [_INTL("On"), _INTL("Off")],
|
EnumOption.new(_INTL("Custom Sprites only"), [_INTL("On"), _INTL("Off")],
|
||||||
proc { $game_switches[RANDOM_TEAMS_CUSTOM_SPRITES] ? 0 : 1 },
|
proc { $game_switches[RANDOM_TEAMS_CUSTOM_SPRITES] ? 0 : 1 },
|
||||||
@@ -169,7 +166,7 @@ class RandomizerWildPokemonOptionsScene < PokemonOption_Scene
|
|||||||
@changedColor = false
|
@changedColor = false
|
||||||
end
|
end
|
||||||
|
|
||||||
def pbStartScene
|
def pbStartScene(inloadscreen = false)
|
||||||
super
|
super
|
||||||
@sprites["option"].nameBaseColor = Color.new(70, 170, 40)
|
@sprites["option"].nameBaseColor = Color.new(70, 170, 40)
|
||||||
@sprites["option"].nameShadowColor = Color.new(40, 100, 20)
|
@sprites["option"].nameShadowColor = Color.new(40, 100, 20)
|
||||||
@@ -188,7 +185,7 @@ class RandomizerWildPokemonOptionsScene < PokemonOption_Scene
|
|||||||
super
|
super
|
||||||
end
|
end
|
||||||
|
|
||||||
def pbGetOptionsIngame()
|
def pbGetOptions(inloadscreen = false)
|
||||||
options = [
|
options = [
|
||||||
EnumOption.new(_INTL("Type"), [_INTL("Global"), _INTL("Area")],
|
EnumOption.new(_INTL("Type"), [_INTL("Global"), _INTL("Area")],
|
||||||
proc {
|
proc {
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user