原来设置高亮的部分:
#--------------------------------------------------------------------------
# ● 刷新图片项目
#--------------------------------------------------------------------------
def update_item
if Mouse.get_mouse_pos != nil
$mouse_x,$mouse_y = Mouse.get_mouse_pos
end
if @type == 2
for index in @dash
if @sprite[index] != nil
#top_x = @sprite[index].x
#top_y = @sprite[index].y
top_x = @sprite[index].x - @sprite[index].bitmap.width / 2
top_y = @sprite[index].y - @sprite[index].bitmap.height / 2
bottom_x = top_x + @sprite[index].bitmap.width
bottom_y = top_y + @sprite[index].bitmap.height
if ($mouse_x > top_x) and ($mouse_y > top_y) and
($mouse_x < bottom_x) and ($mouse_y < bottom_y)
self.index = @sprite[index].index
if @move_index != self.index
Se.ok
@move_index = self.index
end
end
if @sprite[index].index != self.index
@sprite[index].color = Color.new(0,0,0,100)
else
@sprite[index].color = Color.new(0,0,0,0)
end
end
end
elsif @type == 1
for index in @dash
if @sprite[index].index != self.index
@sprite[index].color = Color.new(0,0,0,100)
else
@sprite[index].color = Color.new(0,0,0,0)
end
end
end
end dsu_plus_rewardpost_czw作者: Wind2010 时间: 2011-11-6 09:56