def self.repeat?(key_code) if @self_repeat.call(key_code) return true end if key_code == C return Mouse.repeat?(Mouse::LEFT) elsif key_code == B return Mouse.repeat?(Mouse::RIGHT) else return @self_repeat.call(key_code) end end end class Window_Selectable if @self_alias == nil alias self_update update @self_alias = true end def update #self.cursor_rect.empty self_update if self.active and @item_max > 0 index_var = @index tp_index = @index mouse_x, mouse_y = Mouse.get_mouse_pos mouse_not_in_rect = true for i in 0...@item_max @index = i update_cursor_rect top_x = self.cursor_rect.x + self.x + 16 top_y = self.cursor_rect.y + self.y + 16 bottom_x = top_x + self.cursor_rect.width bottom_y = top_y + self.cursor_rect.height if (mouse_x > top_x) and (mouse_y > top_y) and (mouse_x < bottom_x) and (mouse_y < bottom_y) mouse_not_in_rect = false if tp_index != @index tp_index = @index $game_system.se_play($data_system.cursor_se) end break end end if mouse_not_in_rect @index = index_var update_cursor_rect Mouse.click_lock else Mouse.click_unlock end end end end class Window_NameInput if @self_alias == nil alias self_update update @self_alias = true end def update #self.cursor_rect.empty self_update if self.active index_var = @index mouse_x, mouse_y = Mouse.get_mouse_pos mouse_not_in_rect = true for i in (0...CHARACTER_TABLE.size).to_a.push(180) @index = i update_cursor_rect top_x = self.cursor_rect.x + self.x + 16 top_y = self.cursor_rect.y + self.y + 16 bottom_x = top_x + self.cursor_rect.width bottom_y = top_y + self.cursor_rect.height # if (mouse_x > top_x) and (mouse_y > top_y) and (mouse_x < bottom_x) and (mouse_y < bottom_y) mouse_not_in_rect = false break end end if mouse_not_in_rect @index = index_var update_cursor_rect Mouse.click_lock else Mouse.click_unlock end end end end class Window_InputNumber if @self_alias == nil alias self_update update @self_alias = true end def update #self.cursor_rect.empty self_update mouse_x, mouse_y = Mouse.get_mouse_pos if self.active and @digits_max > 0 index_var = @index mouse_not_in_rect = true for i in 0...@digits_max @index = i update_cursor_rect top_x = self.cursor_rect.x + self.x + 16 bottom_x = top_x + self.cursor_rect.width # if (mouse_x > top_x) and (mouse_x < bottom_x) mouse_not_in_rect = false break end end if mouse_not_in_rect @index = index_var update_cursor_rect Mouse.click_lock else Mouse.click_unlock end end if @last_mouse_y == nil @last_mouse_y = mouse_y end check_pos = (@last_mouse_y - mouse_y).abs if check_pos > 10 $game_system.se_play($data_system.cursor_se) place = 10 ** (@digits_max - 1 - @index) n = @number / place % 10 @number -= n * place n = (n + 1) % 10 if mouse_y < @last_mouse_y n = (n + 9) % 10 if mouse_y > @last_mouse_y @number += n * place refresh @last_mouse_y = mouse_y end end end class Scene_File if @self_alias == nil alias self_update update @self_alias = true end def update mouse_x, mouse_y = Mouse.get_mouse_pos Mouse.click_lock idx = 0 for i in @savefile_windows top_x = i.x + 16 top_y = i.y + 16 bottom_x = top_x + i.width bottom_y = top_y + i.height if (mouse_x > top_x) and (mouse_y > top_y) and (mouse_x < bottom_x) and (mouse_y < bottom_y) i.selected = true if @file_index != idx @file_index = idx $game_system.se_play($data_system.cursor_se) end Mouse.click_unlock else i.selected = false end idx += 1 end self_update end end class Arrow_Enemy if @self_alias == nil alias self_update update @self_alias = true end