Change attack style plugin to use overlay position ABOVE_CHATBOX_RIGHT
This commit is contained in:
@@ -34,6 +34,8 @@ import net.runelite.client.ui.overlay.components.PanelComponent;
|
|||||||
|
|
||||||
public class AttackIndicatorOverlay extends Overlay
|
public class AttackIndicatorOverlay extends Overlay
|
||||||
{
|
{
|
||||||
|
private static final int COMPONENT_WIDTH = 80;
|
||||||
|
|
||||||
private final AttackIndicatorConfig config;
|
private final AttackIndicatorConfig config;
|
||||||
private final AttackIndicatorPlugin plugin;
|
private final AttackIndicatorPlugin plugin;
|
||||||
private final PanelComponent panelComponent = new PanelComponent();
|
private final PanelComponent panelComponent = new PanelComponent();
|
||||||
@@ -41,7 +43,7 @@ public class AttackIndicatorOverlay extends Overlay
|
|||||||
@Inject
|
@Inject
|
||||||
public AttackIndicatorOverlay(AttackIndicatorPlugin plugin, AttackIndicatorConfig config)
|
public AttackIndicatorOverlay(AttackIndicatorPlugin plugin, AttackIndicatorConfig config)
|
||||||
{
|
{
|
||||||
setPosition(OverlayPosition.BOTTOM_RIGHT);
|
setPosition(OverlayPosition.ABOVE_CHATBOX_RIGHT);
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
this.config = config;
|
this.config = config;
|
||||||
}
|
}
|
||||||
@@ -56,7 +58,8 @@ public class AttackIndicatorOverlay extends Overlay
|
|||||||
|
|
||||||
final String attackStyleString = plugin.getAttackStyle().getName();
|
final String attackStyleString = plugin.getAttackStyle().getName();
|
||||||
panelComponent.setTitle(attackStyleString);
|
panelComponent.setTitle(attackStyleString);
|
||||||
panelComponent.setWidth(80);
|
panelComponent.setWidth(COMPONENT_WIDTH);
|
||||||
|
|
||||||
return panelComponent.render(graphics, parent);
|
return panelComponent.render(graphics, parent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user