deactivates arrows quick scroll outside of long lists and pokedex

This commit is contained in:
infinitefusion
2023-07-16 11:55:10 -04:00
parent 17a2d9b97a
commit 321f89282c
6 changed files with 13 additions and 5 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -741,6 +741,7 @@ class SpriteWindow_Selectable < SpriteWindow_Base
@row_height = 32
@column_spacing = 32
@ignore_input = false
@allow_arrows_jump=false
end
def itemCount
@@ -767,6 +768,10 @@ class SpriteWindow_Selectable < SpriteWindow_Base
end
end
def setAllowArrowsJump(value)
@allow_arrows_jump=value
end
def columns
return @column_max || 1
end
@@ -851,13 +856,13 @@ class SpriteWindow_Selectable < SpriteWindow_Base
scroll_up()
elsif Input.repeat?(Input::DOWN)
scroll_down()
elsif Input.repeat?(Input::LEFT) && @column_max > 1
elsif Input.repeat?(Input::LEFT) && !@allow_arrows_jump
scroll_left()
elsif Input.repeat?(Input::RIGHT) && @column_max > 1
elsif Input.repeat?(Input::RIGHT) && !@allow_arrows_jump
scroll_right()
elsif Input.repeat?(Input::JUMPUP) || Input.repeat?(Input::LEFT)
elsif Input.repeat?(Input::JUMPUP) || (Input.repeat?(Input::LEFT) && @allow_arrows_jump)
jump_up()
elsif Input.repeat?(Input::JUMPDOWN) || Input.repeat?(Input::RIGHT)
elsif Input.repeat?(Input::JUMPDOWN) || (Input.repeat?(Input::RIGHT) && @allow_arrows_jump)
jump_down()
end
end

View File

@@ -8,6 +8,7 @@ class Window_Pokedex < Window_DrawableCommand
@selarrow = AnimatedBitmap.new("Graphics/Pictures/Pokedex/cursor_list")
@pokeballOwn = AnimatedBitmap.new("Graphics/Pictures/Pokedex/icon_own")
@pokeballSeen = AnimatedBitmap.new("Graphics/Pictures/Pokedex/icon_seen")
@allow_arrows_jump=true
self.baseColor = Color.new(88,88,80)
self.shadowColor = Color.new(168,184,184)
self.windowskin = nil

View File

@@ -196,9 +196,10 @@ class Window_PokemonOption < Window_DrawableCommand
@selBaseColor = Color.new(31 * 8, 6 * 8, 3 * 8)
@selShadowColor = Color.new(31 * 8, 17 * 8, 16 * 8)
@optvalues = []
@mustUpdateOptions = false
@mustUpdateOptions = false
@mustUpdateDescription = false
@selected_position = 0
@allow_arrows_jump=false
for i in 0...@options.length
@optvalues[i] = 0
end

View File

@@ -3,6 +3,7 @@
#===============================================================================
def pbListWindow(cmds, width = Graphics.width / 2)
list = Window_CommandPokemon.newWithSize(cmds, 0, 0, width, Graphics.height)
list.setAllowArrowsJump(true)
list.index = 0
list.rowHeight = 24
pbSetSmallFont(list.contents)