Project1
标题:
求解如何做到横向翻页?
[打印本页]
作者:
saturnfjh
时间:
2013-11-20 10:21
标题:
求解如何做到横向翻页?
MenuStatus里,每页显示4个角色,超出4个角色的进行横向翻页,要如何处理?
作者:
喵呜喵5
时间:
2013-11-20 22:33
本帖最后由 喵呜喵5 于 2013-11-20 22:43 编辑
=begin
===============================================================================
伪-横向翻页的状态窗口 By喵呜喵5
===============================================================================
【说明】
将打开菜单后右侧显示人物状态的窗口修改成了横向翻页的模式
因为修改的方式相当投机取巧,所以有一个小BUG:
这个状态窗口不会显示翻页的光标
=end
$m5script = {} if $m5script.nil?
$m5script["M5HorzMenuStatus"] = true
#==============================================================================
# 脚本部分
#==============================================================================
class Window_MenuStatus < Window_Selectable
alias m5_2013_1120_initialize initialize
def initialize(x, y)
m5_2013_1120_initialize(x, y)
self.arrows_visible = false
end
def process_cursor_move
return unless cursor_movable?
last_index = @index
cursor_down (Input.trigger?(:DOWN)) if Input.repeat?(:DOWN) and cursor_can_down?
cursor_up (Input.trigger?(:UP)) if Input.repeat?(:UP) and cursor_can_up?
cursor_pagedown if Input.repeat?(:RIGHT)
cursor_pageup if Input.repeat?(:LEFT)
Sound.play_cursor if [url=home.php?mod=space&uid=370741]@Index[/url] != last_index
end
def cursor_can_up?
row != self.top_row
end
def cursor_can_down?
row != self.bottom_row
end
end
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1