From 0be019eec5a232b505329f8ce1ab8e2a5b816abc Mon Sep 17 00:00:00 2001 From: Issac332 <119879937+Issac8658@users.noreply.github.com> Date: Mon, 22 Jun 2026 21:33:24 +0300 Subject: [PATCH] Window_Selectable mouse wheel select --- scripts/Window_Selectable.rb | 7 +++++++ scripts/Window_Settings.rb | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/Window_Selectable.rb b/scripts/Window_Selectable.rb index 1c9807a..52c2e46 100644 --- a/scripts/Window_Selectable.rb +++ b/scripts/Window_Selectable.rb @@ -134,6 +134,13 @@ class Window_Selectable < Window_Base # If cursor is movable if self.active and @item_max > 0 and @index >= 0 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 Input.repeat?(Input::DOWN) # If column count is 1 and directional button was pressed down with no diff --git a/scripts/Window_Settings.rb b/scripts/Window_Settings.rb index 4f445ae..08771ba 100644 --- a/scripts/Window_Settings.rb +++ b/scripts/Window_Settings.rb @@ -26,8 +26,8 @@ class Window_Settings @data_sprites = [] @viewport.z = 9998 - @left_hold_timer = 0 - @right_hold_timer = 0 + @left_hold_timer = 0 + @right_hold_timer = 0 self.visible = false @index = 0