Removed the optimization of not recalculating the hover sprite when we were
still over a hover sprite as that prevents things from working properly if hover sprites overlap. This isn't much of a tradeoff as most of the time the mouse is not over a hover sprite in which case it does the full hit testing anyway. Also fixed a bug wherein the active sprite was not actually configured unless it implemented HoverSprite which the rest of the code takes pains not to require (it should be and is now possible to have action sprites that do not implement HoverSprite but still work). By the way, this whole action/hover/etc. sprite business is goddamned handy. It's *so* much nicer than having to implement mouse listeners and do a bunch of crap by hand. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3717 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -710,13 +710,11 @@ public class MediaPanel extends JComponent
|
||||
}
|
||||
}
|
||||
|
||||
if (_activeSprite == null) {
|
||||
Sprite s = getHit(me);
|
||||
if (s instanceof HoverSprite) {
|
||||
((HoverSprite) s).setHovered(true);
|
||||
_activeSprite = s;
|
||||
}
|
||||
Sprite s = getHit(me);
|
||||
if (s instanceof HoverSprite) {
|
||||
((HoverSprite) s).setHovered(true);
|
||||
}
|
||||
_activeSprite = s;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user