overlay renderer: add check for chatbox being minimized
This commit is contained in:
@@ -197,7 +197,7 @@ public class OverlayRenderer
|
|||||||
? new Rectangle(viewport.getBounds())
|
? new Rectangle(viewport.getBounds())
|
||||||
: new Rectangle(0, 0, surface.getWidth(), surface.getHeight());
|
: new Rectangle(0, 0, surface.getWidth(), surface.getHeight());
|
||||||
|
|
||||||
final Widget chatbox = client.getWidget(WidgetInfo.CHATBOX);
|
final Widget chatbox = client.getWidget(WidgetInfo.CHATBOX_MESSAGES);
|
||||||
final Rectangle chatboxBounds = chatbox != null
|
final Rectangle chatboxBounds = chatbox != null
|
||||||
? chatbox.getBounds() : new Rectangle(0, bounds.height, 519, 165);
|
? chatbox.getBounds() : new Rectangle(0, bounds.height, 519, 165);
|
||||||
|
|
||||||
@@ -213,6 +213,13 @@ public class OverlayRenderer
|
|||||||
final Point rightChatboxPoint = new Point();
|
final Point rightChatboxPoint = new Point();
|
||||||
rightChatboxPoint.move(bounds.x + chatboxBounds.width - BORDER_RIGHT,bounds.y + bounds.height - BORDER_BOTTOM);
|
rightChatboxPoint.move(bounds.x + chatboxBounds.width - BORDER_RIGHT,bounds.y + bounds.height - BORDER_BOTTOM);
|
||||||
|
|
||||||
|
//check to see if Chatbox is minimized
|
||||||
|
if (chatbox != null && client.isResized() && chatbox.isHidden())
|
||||||
|
{
|
||||||
|
rightChatboxPoint.y += chatboxBounds.height;
|
||||||
|
bottomLeftPoint.y += chatboxBounds.height;
|
||||||
|
}
|
||||||
|
|
||||||
overlays.stream()
|
overlays.stream()
|
||||||
.filter(overlay -> overlay.getLayer() == layer)
|
.filter(overlay -> overlay.getLayer() == layer)
|
||||||
.forEach(overlay ->
|
.forEach(overlay ->
|
||||||
|
|||||||
Reference in New Issue
Block a user