motherlode: allow sack overlay to be resizable
Also makes the overlay adhere to overlayBackgroundColor config
This commit is contained in:
@@ -35,23 +35,20 @@ import static net.runelite.api.MenuAction.RUNELITE_OVERLAY_CONFIG;
|
||||
import net.runelite.api.Varbits;
|
||||
import net.runelite.api.widgets.Widget;
|
||||
import net.runelite.api.widgets.WidgetInfo;
|
||||
import net.runelite.client.ui.overlay.Overlay;
|
||||
import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
|
||||
import net.runelite.client.ui.overlay.OverlayMenuEntry;
|
||||
import net.runelite.client.ui.overlay.OverlayPanel;
|
||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||
import net.runelite.client.ui.overlay.components.ComponentConstants;
|
||||
import net.runelite.client.ui.overlay.components.LineComponent;
|
||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||
|
||||
class MotherlodeSackOverlay extends Overlay
|
||||
class MotherlodeSackOverlay extends OverlayPanel
|
||||
{
|
||||
private static final Color DANGER = new Color(150, 0, 0, 150);
|
||||
private final Client client;
|
||||
private final MotherlodeConfig config;
|
||||
private final MotherlodePlugin plugin;
|
||||
|
||||
private final PanelComponent panelComponent = new PanelComponent();
|
||||
|
||||
@Inject
|
||||
MotherlodeSackOverlay(Client client, MotherlodeConfig config, MotherlodePlugin plugin)
|
||||
{
|
||||
@@ -73,7 +70,6 @@ class MotherlodeSackOverlay extends Overlay
|
||||
|
||||
Widget sack = client.getWidget(WidgetInfo.MOTHERLODE_MINE);
|
||||
|
||||
panelComponent.getChildren().clear();
|
||||
panelComponent.setBackgroundColor(ComponentConstants.STANDARD_BACKGROUND_COLOR);
|
||||
|
||||
if (sack != null)
|
||||
@@ -119,6 +115,6 @@ class MotherlodeSackOverlay extends Overlay
|
||||
}
|
||||
}
|
||||
|
||||
return panelComponent.render(graphics);
|
||||
return super.render(graphics);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user