Raids: Add clan chat and world to scouting overlay
This commit is contained in:
@@ -88,6 +88,17 @@ public interface RaidsConfig extends Config
|
|||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 5,
|
position = 5,
|
||||||
|
keyName = "ccDisplay",
|
||||||
|
name = "CC and World in scout overlay",
|
||||||
|
description = "Display current Clan Chat and World in scouting overlay"
|
||||||
|
)
|
||||||
|
default boolean ccDisplay()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
position = 6,
|
||||||
keyName = "whitelistedRooms",
|
keyName = "whitelistedRooms",
|
||||||
name = "Whitelisted rooms",
|
name = "Whitelisted rooms",
|
||||||
description = "Display whitelisted rooms in green on the overlay. Separate with comma (full name)"
|
description = "Display whitelisted rooms in green on the overlay. Separate with comma (full name)"
|
||||||
@@ -98,7 +109,7 @@ public interface RaidsConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 6,
|
position = 7,
|
||||||
keyName = "blacklistedRooms",
|
keyName = "blacklistedRooms",
|
||||||
name = "Blacklisted rooms",
|
name = "Blacklisted rooms",
|
||||||
description = "Display blacklisted rooms in red on the overlay. Separate with comma (full name)"
|
description = "Display blacklisted rooms in red on the overlay. Separate with comma (full name)"
|
||||||
@@ -109,7 +120,7 @@ public interface RaidsConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 7,
|
position = 8,
|
||||||
keyName = "enableRotationWhitelist",
|
keyName = "enableRotationWhitelist",
|
||||||
name = "Enable rotation whitelist",
|
name = "Enable rotation whitelist",
|
||||||
description = "Enable the rotation whitelist"
|
description = "Enable the rotation whitelist"
|
||||||
@@ -120,7 +131,7 @@ public interface RaidsConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 8,
|
position = 9,
|
||||||
keyName = "whitelistedRotations",
|
keyName = "whitelistedRotations",
|
||||||
name = "Whitelisted rotations",
|
name = "Whitelisted rotations",
|
||||||
description = "Warn when boss rotation doesn't match a whitelisted one. Add rotations like: tekton, muttadiles, guardians - each rotation on its own line"
|
description = "Warn when boss rotation doesn't match a whitelisted one. Add rotations like: tekton, muttadiles, guardians - each rotation on its own line"
|
||||||
@@ -131,7 +142,7 @@ public interface RaidsConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 9,
|
position = 10,
|
||||||
keyName = "enableLayoutWhitelist",
|
keyName = "enableLayoutWhitelist",
|
||||||
name = "Enable layout whitelist",
|
name = "Enable layout whitelist",
|
||||||
description = "Enable the layout whitelist"
|
description = "Enable the layout whitelist"
|
||||||
@@ -142,7 +153,7 @@ public interface RaidsConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 10,
|
position = 11,
|
||||||
keyName = "whitelistedLayouts",
|
keyName = "whitelistedLayouts",
|
||||||
name = "Whitelisted layouts",
|
name = "Whitelisted layouts",
|
||||||
description = "Warn when layout doesn't match a whitelisted one. Add layouts like CFSCPPCSCF separated with comma"
|
description = "Warn when layout doesn't match a whitelisted one. Add layouts like CFSCPPCSCF separated with comma"
|
||||||
@@ -153,7 +164,7 @@ public interface RaidsConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 11,
|
position = 12,
|
||||||
keyName = "layoutMessage",
|
keyName = "layoutMessage",
|
||||||
name = "Send raid layout message when entering raid",
|
name = "Send raid layout message when entering raid",
|
||||||
description = "Sends game message with raid layout on entering new raid"
|
description = "Sends game message with raid layout on entering new raid"
|
||||||
|
|||||||
@@ -26,9 +26,11 @@ package net.runelite.client.plugins.raids;
|
|||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
|
import java.awt.FontMetrics;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
import net.runelite.api.ClanMemberManager;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import static net.runelite.api.MenuAction.RUNELITE_OVERLAY;
|
import static net.runelite.api.MenuAction.RUNELITE_OVERLAY;
|
||||||
import static net.runelite.api.MenuAction.RUNELITE_OVERLAY_CONFIG;
|
import static net.runelite.api.MenuAction.RUNELITE_OVERLAY_CONFIG;
|
||||||
@@ -38,6 +40,7 @@ import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
|
|||||||
import net.runelite.client.ui.overlay.OverlayMenuEntry;
|
import net.runelite.client.ui.overlay.OverlayMenuEntry;
|
||||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||||
import net.runelite.client.ui.overlay.OverlayPriority;
|
import net.runelite.client.ui.overlay.OverlayPriority;
|
||||||
|
import net.runelite.client.ui.overlay.components.ComponentConstants;
|
||||||
import net.runelite.client.ui.overlay.components.LineComponent;
|
import net.runelite.client.ui.overlay.components.LineComponent;
|
||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
import net.runelite.client.ui.overlay.components.TitleComponent;
|
import net.runelite.client.ui.overlay.components.TitleComponent;
|
||||||
@@ -101,6 +104,28 @@ public class RaidsOverlay extends Overlay
|
|||||||
.color(color)
|
.color(color)
|
||||||
.build());
|
.build());
|
||||||
|
|
||||||
|
if (config.ccDisplay())
|
||||||
|
{
|
||||||
|
color = Color.RED;
|
||||||
|
ClanMemberManager clanMemberManager = client.getClanMemberManager();
|
||||||
|
FontMetrics metrics = graphics.getFontMetrics();
|
||||||
|
String worldString = "W" + client.getWorld();
|
||||||
|
String clanOwner = "Join a CC";
|
||||||
|
if (clanMemberManager != null)
|
||||||
|
{
|
||||||
|
clanOwner = clanMemberManager.getClanOwner();
|
||||||
|
color = Color.ORANGE;
|
||||||
|
}
|
||||||
|
|
||||||
|
panelComponent.setPreferredSize(new Dimension(Math.max(ComponentConstants.STANDARD_WIDTH, metrics.stringWidth(worldString) + metrics.stringWidth(clanOwner) + 14), 0));
|
||||||
|
panelComponent.getChildren().add(LineComponent.builder()
|
||||||
|
.left(worldString)
|
||||||
|
.right(clanOwner)
|
||||||
|
.leftColor(Color.ORANGE)
|
||||||
|
.rightColor(color)
|
||||||
|
.build());
|
||||||
|
}
|
||||||
|
|
||||||
for (Room layoutRoom : plugin.getRaid().getLayout().getRooms())
|
for (Room layoutRoom : plugin.getRaid().getLayout().getRooms())
|
||||||
{
|
{
|
||||||
int position = layoutRoom.getPosition();
|
int position = layoutRoom.getPosition();
|
||||||
|
|||||||
Reference in New Issue
Block a user