Closed dwu4 closed 13 years ago
It's actually because the bounding box is rectangular while the buttons appear to be diamond shape. So there are overlapping regions within the buttons. Is it possible to add a mouse listener to a non-rectangular domain? Or we'll just have to move around the buttons to avoid this kind of problem.
Yea... that's what I thought was causing the bug. I think the best fix is to modify the button event trigger - it checks whether the click occurred within a certain, defined region of the button before deciding whether to trigger the action or not.
Arbitrary polygons may now be specified as clickable regions for buttons.
I am observing strange behavior with the direction panel. Clicking on certain regions of the buttons either does nothing or change the direction to something different... I suspect a problem/inconsistency with the coordinates specified in DirectionPanel