mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Added decent spacing to all scripts thanks to Rubocop
This commit is contained in:
@@ -5,27 +5,27 @@
|
||||
# Settings::USE_CURRENT_REGION_DEX is false.
|
||||
#===============================================================================
|
||||
class Window_DexesList < Window_CommandPokemon
|
||||
def initialize(commands,commands2,width)
|
||||
def initialize(commands, commands2, width)
|
||||
@commands2 = commands2
|
||||
super(commands,width)
|
||||
super(commands, width)
|
||||
@selarrow = AnimatedBitmap.new("Graphics/Pictures/selarrow_white")
|
||||
self.baseColor = Color.new(248,248,248)
|
||||
self.shadowColor = Color.new(0,0,0)
|
||||
self.baseColor = Color.new(248, 248, 248)
|
||||
self.shadowColor = Color.new(0, 0, 0)
|
||||
self.windowskin = nil
|
||||
end
|
||||
|
||||
def drawItem(index,count,rect)
|
||||
super(index,count,rect)
|
||||
if index>=0 && index<@commands2.length
|
||||
pbDrawShadowText(self.contents,rect.x+254,rect.y,64,rect.height,
|
||||
sprintf("%d",@commands2[index][0]),self.baseColor,self.shadowColor,1)
|
||||
pbDrawShadowText(self.contents,rect.x+350,rect.y,64,rect.height,
|
||||
sprintf("%d",@commands2[index][1]),self.baseColor,self.shadowColor,1)
|
||||
allseen = (@commands2[index][0]>=@commands2[index][2])
|
||||
allown = (@commands2[index][1]>=@commands2[index][2])
|
||||
pbDrawImagePositions(self.contents,[
|
||||
["Graphics/Pictures/Pokedex/icon_menuseenown",rect.x+236,rect.y+2,(allseen) ? 24 : 0,0,24,24],
|
||||
["Graphics/Pictures/Pokedex/icon_menuseenown",rect.x+332,rect.y+2,(allown) ? 24 : 0,24,24,24]
|
||||
def drawItem(index, count, rect)
|
||||
super(index, count, rect)
|
||||
if index >= 0 && index < @commands2.length
|
||||
pbDrawShadowText(self.contents, rect.x + 254, rect.y, 64, rect.height,
|
||||
sprintf("%d", @commands2[index][0]), self.baseColor, self.shadowColor, 1)
|
||||
pbDrawShadowText(self.contents, rect.x + 350, rect.y, 64, rect.height,
|
||||
sprintf("%d", @commands2[index][1]), self.baseColor, self.shadowColor, 1)
|
||||
allseen = (@commands2[index][0] >= @commands2[index][2])
|
||||
allown = (@commands2[index][1] >= @commands2[index][2])
|
||||
pbDrawImagePositions(self.contents, [
|
||||
["Graphics/Pictures/Pokedex/icon_menuseenown", rect.x + 236, rect.y + 2, (allseen) ? 24 : 0, 0, 24, 24],
|
||||
["Graphics/Pictures/Pokedex/icon_menuseenown", rect.x + 332, rect.y + 2, (allown) ? 24 : 0, 24, 24, 24]
|
||||
])
|
||||
end
|
||||
end
|
||||
@@ -39,17 +39,17 @@ class PokemonPokedexMenu_Scene
|
||||
pbUpdateSpriteHash(@sprites)
|
||||
end
|
||||
|
||||
def pbStartScene(commands,commands2)
|
||||
def pbStartScene(commands, commands2)
|
||||
@commands = commands
|
||||
@viewport = Viewport.new(0,0,Graphics.width,Graphics.height)
|
||||
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
|
||||
@viewport.z = 99999
|
||||
@sprites = {}
|
||||
@sprites["background"] = IconSprite.new(0,0,@viewport)
|
||||
@sprites["background"] = IconSprite.new(0, 0, @viewport)
|
||||
@sprites["background"].setBitmap(_INTL("Graphics/Pictures/Pokedex/bg_menu"))
|
||||
@sprites["headings"]=Window_AdvancedTextPokemon.newWithSize(
|
||||
_INTL("<c3=F8F8F8,C02028>SEEN<r>OBTAINED</c3>"),286,136,208,64,@viewport)
|
||||
@sprites["headings"].windowskin = nil
|
||||
@sprites["commands"] = Window_DexesList.new(commands,commands2,Graphics.width-84)
|
||||
@sprites["headings"] = Window_AdvancedTextPokemon.newWithSize(
|
||||
_INTL("<c3=F8F8F8,C02028>SEEN<r>OBTAINED</c3>"), 286, 136, 208, 64, @viewport)
|
||||
@sprites["headings"].windowskin = nil
|
||||
@sprites["commands"] = Window_DexesList.new(commands, commands2, Graphics.width - 84)
|
||||
@sprites["commands"].x = 40
|
||||
@sprites["commands"].y = 192
|
||||
@sprites["commands"].height = 192
|
||||
@@ -68,7 +68,7 @@ class PokemonPokedexMenu_Scene
|
||||
break
|
||||
elsif Input.trigger?(Input::USE)
|
||||
ret = @sprites["commands"].index
|
||||
(ret==@commands.length-1) ? pbPlayCloseMenuSE : pbPlayDecisionSE
|
||||
(ret == @commands.length - 1) ? pbPlayCloseMenuSE : pbPlayDecisionSE
|
||||
break
|
||||
end
|
||||
end
|
||||
@@ -107,10 +107,10 @@ class PokemonPokedexMenuScreen
|
||||
pbGetRegionalDexLength(dex)])
|
||||
end
|
||||
commands.push(_INTL("Exit"))
|
||||
@scene.pbStartScene(commands,commands2)
|
||||
@scene.pbStartScene(commands, commands2)
|
||||
loop do
|
||||
cmd = @scene.pbScene
|
||||
break if cmd<0 || cmd>=commands2.length # Cancel/Exit
|
||||
break if cmd < 0 || cmd >= commands2.length # Cancel/Exit
|
||||
$PokemonGlobal.pokedexDex = $player.pokedex.accessible_dexes[cmd]
|
||||
pbFadeOutIn {
|
||||
scene = PokemonPokedex_Scene.new
|
||||
|
||||
Reference in New Issue
Block a user