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

View File

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

View File

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

View File

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