overlay: add mouseover callback
This commit is contained in:
@@ -68,4 +68,8 @@ public abstract class Overlay implements LayoutableRenderableEntity
|
|||||||
{
|
{
|
||||||
return this.getClass().getSimpleName();
|
return this.getClass().getSimpleName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onMouseOver()
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ public class OverlayRenderer extends MouseAdapter implements KeyListener
|
|||||||
if (!isResizeable)
|
if (!isResizeable)
|
||||||
{
|
{
|
||||||
// On fixed mode, ABOVE_CHATBOX_RIGHT is in the same location as
|
// 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
|
// Just use BOTTOM_RIGHT and TOP_RIGHT to prevent overlays from
|
||||||
// drawing over each other.
|
// drawing over each other.
|
||||||
switch (overlayPosition)
|
switch (overlayPosition)
|
||||||
@@ -304,9 +304,14 @@ public class OverlayRenderer extends MouseAdapter implements KeyListener
|
|||||||
graphics.setColor(previous);
|
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