#--------------------------------------------------------------------------
# ● 连续按键?
#--------------------------------------------------------------------------
def self.press?(key)
case key
when LBUTTON
return @l_pressed
when RBUTTON
return @r_pressed
else
return false
end
end
#--------------------------------------------------------------------------
# ● 等同于:key_down
#--------------------------------------------------------------------------
def self.trigger?(key)
return key_down(key)
end
def trigger?(key)
if origin_trigger?(key)
return true
end
case key
when Input::C
return Mouse.key_down(Mouse::LBUTTON)
when Input::B
return Mouse.key_down(Mouse::RBUTTON)
else
return false
end
end
end
end
Mouse.start
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.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
if Mouse.scroll_up?
# 光标向上移动
$game_system.se_play($data_system.cursor_se)
@index = (@index - @column_max + @item_max) % @item_max
end
if Mouse.scroll_down?
# 光标向上移动
$game_system.se_play($data_system.cursor_se)
@index = (@index + @column_max) % @item_max
end
update_cursor_rect
#Mouse.click_lock
else
#Mouse.click_unlock
end
end
end
end 作者: 304475881 时间: 2008-7-28 23:18
啊!怎么没人顶啊!{/dk}{/dk}{/dk}作者: 做游戏的新手 时间: 2008-7-29 00:15
支持下作者: yangff 时间: 2008-7-29 00:32
杀啊!打击盗版,还我中国,还我主权
http://rpg.blue/viewthread.php?tid=88346作者: 虚幻死神 时间: 2008-7-29 02:38
無語.......可能是類同吧~~LS不要那么激動~~~~兩人交流一下嘛~~作者: 灯笼菜刀王 时间: 2008-7-29 02:52