mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 13:29:54 +00:00
Window_Selectable mouse wheel select
This commit is contained in:
parent
73316b99be
commit
0be019eec5
2 changed files with 9 additions and 2 deletions
|
|
@ -134,6 +134,13 @@ class Window_Selectable < Window_Base
|
||||||
# If cursor is movable
|
# If cursor is movable
|
||||||
if self.active and @item_max > 0 and @index >= 0
|
if self.active and @item_max > 0 and @index >= 0
|
||||||
self.oy = self.oy * 0.2 + @content_pos * 0.8
|
self.oy = self.oy * 0.2 + @content_pos * 0.8
|
||||||
|
|
||||||
|
new = (@index - Input.wheel_y.round).clamp(0, @item_max - 1)
|
||||||
|
if new != @index
|
||||||
|
$game_system.se_play($data_system.cursor_se)
|
||||||
|
@index = new
|
||||||
|
end
|
||||||
|
|
||||||
# If pressing down on the directional buttons
|
# If pressing down on the directional buttons
|
||||||
if Input.repeat?(Input::DOWN)
|
if Input.repeat?(Input::DOWN)
|
||||||
# If column count is 1 and directional button was pressed down with no
|
# If column count is 1 and directional button was pressed down with no
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue