While I was working on my wizard i realized the mouse doesn't bring down the list(window_selectable).
I have this code here, in update;
any ideas?
I have this code here, in update;
PHP:
if mouse_over?(self) and @item_max > 0 and @index >= -1
w = (self.width / @column_max - 32)
xpos = $mouse.x - self.x - 16
ypos = ($mouse.y - self.y - 16)
i = (ypos.to_f/(32).to_f).floor
i *= (@row_max == nil ? 1 : @row_max)
if i + (xpos.to_f/(w).to_f) > 0 and i + (xpos.to_f/(w).to_f) < @item_max
i += (xpos.to_f/(w).to_f).floor
self.index = i if i >= 0 and i < @item_max
else
self.index = -1
end
else
self.index = -1
end
any ideas?