overlay: add mouseover callback
This commit is contained in:
@@ -68,4 +68,8 @@ public abstract class Overlay implements LayoutableRenderableEntity
|
||||
{
|
||||
return this.getClass().getSimpleName();
|
||||
}
|
||||
|
||||
public void onMouseOver()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ public class OverlayRenderer extends MouseAdapter implements KeyListener
|
||||
if (!isResizeable)
|
||||
{
|
||||
// On fixed mode, ABOVE_CHATBOX_RIGHT is in the same location as
|
||||
// BOTTOM_RIGHT and CANVAST_TOP_RIGHT is same as TOP_RIGHT.
|
||||
// BOTTOM_RIGHT and CANVAS_TOP_RIGHT is same as TOP_RIGHT.
|
||||
// Just use BOTTOM_RIGHT and TOP_RIGHT to prevent overlays from
|
||||
// drawing over each other.
|
||||
switch (overlayPosition)
|
||||
@@ -304,9 +304,14 @@ public class OverlayRenderer extends MouseAdapter implements KeyListener
|
||||
graphics.setColor(previous);
|
||||
}
|
||||
|
||||
if (menuEntries == null && !client.isMenuOpen() && !client.getSpellSelected() && bounds.contains(mouse))
|
||||
if (!client.isMenuOpen() && !client.getSpellSelected() && bounds.contains(mouse))
|
||||
{
|
||||
menuEntries = createRightClickMenuEntries(overlay);
|
||||
if (menuEntries == null)
|
||||
{
|
||||
menuEntries = createRightClickMenuEntries(overlay);
|
||||
}
|
||||
|
||||
overlay.onMouseOver();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user