Merge branch 'master' of https://github.com/runelite/runelite into upstream-03012022

 Conflicts:
	runelite-api/src/main/java/net/runelite/api/WallObject.java
This commit is contained in:
Justin
2022-01-04 13:23:56 +11:00
15 changed files with 156 additions and 90 deletions

View File

@@ -54,4 +54,14 @@ public interface DecorativeObject extends TileObject
* account for walls of varying widths.
*/
int getYOffset();
/**
* A bitfield containing various flags:
* <pre>{@code
* object type id = bits & 0x20
* orientation (0-3) = bits >>> 6 & 3
* supports items = bits >>> 8 & 1
* }</pre>
*/
int getConfig();
}

View File

@@ -93,4 +93,14 @@ public interface GameObject extends TileObject
* @see net.runelite.api.coords.Angle
*/
int getModelOrientation();
/**
* A bitfield containing various flags:
* <pre>{@code
* object type id = bits & 0x20
* orientation (0-3) = bits >>> 6 & 3
* supports items = bits >>> 8 & 1
* }</pre>
*/
int getConfig();
}

View File

@@ -42,4 +42,14 @@ public interface GroundObject extends TileObject
* @see net.runelite.api.model.Jarvis
*/
Shape getConvexHull();
/**
* A bitfield containing various flags:
* <pre>{@code
* object type id = bits & 0x20
* orientation (0-3) = bits >>> 6 & 3
* supports items = bits >>> 8 & 1
* }</pre>
*/
int getConfig();
}

View File

@@ -27,37 +27,46 @@ package net.runelite.api;
import java.awt.Shape;
/**
* Represents the wall of a tile, which is an un-passable boundary.
* Represents one or two walls on a tile
*/
public interface WallObject extends TileObject
{
/**
* Gets the first orientation of the wall.
*
* @return the first orientation, 0-2048 where 0 is north
* A bitfield with the orientation of the first wall
* 1 = West
* 2 = North
* 4 = East
* 8 = South
* 16 = North-west
* 32 = North-east
* 64 = South-east
* 128 = South-west
*/
int getOrientationA();
/**
* Gets the second orientation value of the wall.
*
* @return the second orientation, 0-2048 where 0 is north
* A bitfield with the orientation of the second wall
* 1 = West
* 2 = North
* 4 = East
* 8 = South
* 16 = North-west
* 32 = North-east
* 64 = South-east
* 128 = South-west
*/
int getOrientationB();
/**
* Gets the boundary configuration of the wall.
*
* @return the boundary configuration
* A bitfield containing various flags:
* <pre>{@code
* object type id = bits & 0x20
* orientation (0-3) = bits >>> 6 & 3
* supports items = bits >>> 8 & 1
* }</pre>
*/
int getConfig();
Renderable getRenderable1();
Renderable getRenderable2();
Model getModelA();
Model getModelB();
/**
* Gets the convex hull of the objects model.
*
@@ -66,4 +75,10 @@ public interface WallObject extends TileObject
*/
Shape getConvexHull();
Shape getConvexHull2();
Renderable getRenderable1();
Renderable getRenderable2();
Model getModelA();
Model getModelB();
}

View File

@@ -551,8 +551,8 @@ public enum WidgetInfo
TRAILBLAZER_AREA_TELEPORT(WidgetID.TRAILBLAZER_AREAS_GROUP_ID, WidgetID.TrailblazerAreas.TELEPORT),
MULTICOMBAT_FIXED(WidgetID.FIXED_VIEWPORT_GROUP_ID, WidgetID.FixedViewport.MULTICOMBAT_INDICATOR),
MULTICOMBAT_RESIZEABLE_MODERN(WidgetID.RESIZABLE_VIEWPORT_BOTTOM_LINE_GROUP_ID, WidgetID.ResizableViewport.MULTICOMBAT_INDICATOR),
MULTICOMBAT_RESIZEABLE_CLASSIC(WidgetID.RESIZABLE_VIEWPORT_OLD_SCHOOL_BOX_GROUP_ID, WidgetID.ResizableViewport.MULTICOMBAT_INDICATOR),
MULTICOMBAT_RESIZABLE_MODERN(WidgetID.RESIZABLE_VIEWPORT_BOTTOM_LINE_GROUP_ID, WidgetID.ResizableViewport.MULTICOMBAT_INDICATOR),
MULTICOMBAT_RESIZABLE_CLASSIC(WidgetID.RESIZABLE_VIEWPORT_OLD_SCHOOL_BOX_GROUP_ID, WidgetID.ResizableViewport.MULTICOMBAT_INDICATOR),
TEMPOROSS_STATUS_INDICATOR(WidgetID.TEMPOROSS_GROUP_ID, WidgetID.TemporossStatus.STATUS_INDICATOR),

View File

@@ -127,6 +127,10 @@ public class ClientThread implements Executor
{
ir.remove();
}
else
{
log.trace("Deferring task {}", r);
}
}
}
}

View File

@@ -38,9 +38,7 @@ import net.runelite.api.FriendsChatRank;
import net.runelite.api.GameState;
import net.runelite.api.IndexedSprite;
import net.runelite.api.clan.ClanTitle;
import net.runelite.api.events.GameStateChanged;
import net.runelite.client.eventbus.EventBus;
import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.callback.ClientThread;
import net.runelite.client.util.ImageUtil;
@Singleton
@@ -55,15 +53,23 @@ public class ChatIconManager
private BufferedImage[] friendsChatRankImages;
private BufferedImage[] clanRankImages;
private int friendsChatOffset;
private int clanOffset;
private int friendsChatOffset = -1;
private int clanOffset = -1;
@Inject
private ChatIconManager(Client client, SpriteManager spriteManager, EventBus eventBus)
private ChatIconManager(Client client, SpriteManager spriteManager, ClientThread clientThread)
{
this.client = client;
this.spriteManager = spriteManager;
eventBus.register(this);
clientThread.invokeLater(() ->
{
if (client.getGameState().getState() >= GameState.LOGIN_SCREEN.getState())
{
loadRankIcons();
return true;
}
return false;
});
}
@Nullable
@@ -87,22 +93,13 @@ public class ChatIconManager
public int getIconNumber(final FriendsChatRank friendsChatRank)
{
return friendsChatOffset + friendsChatRank.ordinal() - 1;
return friendsChatOffset == -1 ? -1 : friendsChatOffset + friendsChatRank.ordinal() - 1;
}
public int getIconNumber(final ClanTitle clanTitle)
{
int rank = clanTitle.getId();
return clanOffset + clanRankToIdx(rank);
}
@Subscribe
public void onGameStateChanged(GameStateChanged gameStateChanged)
{
if (gameStateChanged.getGameState() == GameState.LOGIN_SCREEN && friendsChatOffset == 0)
{
loadRankIcons();
}
return clanOffset == -1 ? -1 : clanOffset + clanRankToIdx(rank);
}
private void loadRankIcons()

View File

@@ -632,18 +632,21 @@ public class ChatChannelPlugin extends Plugin
if (rank != null && rank != FriendsChatRank.UNRANKED)
{
int iconNumber = chatIconManager.getIconNumber(rank);
final String img = "<img=" + iconNumber + ">";
if (message.getType() == ChatMessageType.FRIENDSCHAT)
if (iconNumber > -1)
{
message.getMessageNode()
.setSender(message.getMessageNode().getSender() + " " + img);
final String img = "<img=" + iconNumber + ">";
if (message.getType() == ChatMessageType.FRIENDSCHAT)
{
message.getMessageNode()
.setSender(message.getMessageNode().getSender() + " " + img);
}
else
{
message.getMessageNode()
.setName(img + message.getMessageNode().getName());
}
client.refreshChat();
}
else
{
message.getMessageNode()
.setName(img + message.getMessageNode().getName());
}
client.refreshChat();
}
}

View File

@@ -79,7 +79,7 @@ enum WidgetOffset
FIXED_2010_STATS_HIGHLIGHT(Skin.AROUND_2010, WidgetInfo.FIXED_VIEWPORT_STATS_TAB, 41, 1, null, null),
FIXED_2010_STATS_ICON(Skin.AROUND_2010, WidgetInfo.FIXED_VIEWPORT_STATS_ICON, 41, null, null, null),
FIXED_2010_QUESTS_HIGHLIGHT(Skin.AROUND_2010, WidgetInfo.FIXED_VIEWPORT_QUESTS_TAB, 75, 1, 33, null),
FIXED_2010_QUESTS_ICON(Skin.AROUND_2010, WidgetInfo.FIXED_VIEWPORT_QUESTS_ICON, 75, 0, null, null),
FIXED_2010_QUESTS_ICON(Skin.AROUND_2010, WidgetInfo.FIXED_VIEWPORT_QUESTS_ICON, 75, null, null, null),
FIXED_2010_INVENTORY_HIGHLIGHT(Skin.AROUND_2010, WidgetInfo.FIXED_VIEWPORT_INVENTORY_TAB, 109, 1, null, null),
FIXED_2010_INVENTORY_ICON(Skin.AROUND_2010, WidgetInfo.FIXED_VIEWPORT_INVENTORY_ICON, 111, -1, null, null),
FIXED_2010_EQUIPMENT_ICON(Skin.AROUND_2010, WidgetInfo.FIXED_VIEWPORT_EQUIPMENT_ICON, 143, 2, null, null),
@@ -87,7 +87,7 @@ enum WidgetOffset
FIXED_2010_PRAYER_ICON(Skin.AROUND_2010, WidgetInfo.FIXED_VIEWPORT_PRAYER_ICON, 178, 1, null, null),
FIXED_2010_MAGIC_HIGHLIGHT(Skin.AROUND_2010, WidgetInfo.FIXED_VIEWPORT_MAGIC_TAB, 211, 1, null, null),
FIXED_2010_MAGIC_ICON(Skin.AROUND_2010, WidgetInfo.FIXED_VIEWPORT_MAGIC_ICON, 212, 1, null, null),
FIXED_2010_FRIENDS_CHAT_HIGHLIGHT(Skin.AROUND_2010, WidgetInfo.FIXED_VIEWPORT_FRIENDS_CHAT_TAB, 0, 1, null, null),
FIXED_2010_FRIENDS_CHAT_HIGHLIGHT(Skin.AROUND_2010, WidgetInfo.FIXED_VIEWPORT_FRIENDS_CHAT_TAB, null, 1, null, null),
FIXED_2010_FRIENDS_CHAT_ICON(Skin.AROUND_2010, WidgetInfo.FIXED_VIEWPORT_FRIENDS_CHAT_ICON, 5, null, null, null),
FIXED_2010_FRIENDS_HIGHLIGHT(Skin.AROUND_2010, WidgetInfo.FIXED_VIEWPORT_FRIENDS_TAB, 38, 1, 33, null),
FIXED_2010_FRIENDS_ICON(Skin.AROUND_2010, WidgetInfo.FIXED_VIEWPORT_FRIENDS_ICON, 40, null, null, null),
@@ -102,17 +102,25 @@ enum WidgetOffset
FIXED_2010_MUSIC_HIGHLIGHT(Skin.AROUND_2010, WidgetInfo.FIXED_VIEWPORT_MUSIC_TAB, 208, 1, null, null),
FIXED_2010_MUSIC_ICON(Skin.AROUND_2010, WidgetInfo.FIXED_VIEWPORT_MUSIC_ICON, 209, 2, null, null),
RESIZABLE_2005_QUESTS_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_QUESTS_ICON, 72, 0, null, null),
RESIZABLE_2005_QUESTS_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_QUESTS_ICON, 71, -1, null, null),
RESIZABLE_2005_LOGOUT_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_LOGOUT_ICON, null, null, null, null),
RESIZABLE_2005_OPTIONS_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_OPTIONS_ICON, 137, null, null, null),
RESIZABLE_2005_EMOTE_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_EMOTES_ICON, 173, 1, null, null),
RESIZABLE_2005_INVENTORY_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_INVENTORY_ICON, null, -2, null, null),
RESIZABLE_2005_EQUIPMENT_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_EQUIPMENT_ICON, null, 2, null, null),
RESIZABLE_2005_EMOTE_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_EMOTES_ICON, 171, 2, null, null),
RESIZABLE_2005_INVENTORY_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_INVENTORY_ICON, 103, 1, null, null),
RESIZABLE_2005_EQUIPMENT_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_EQUIPMENT_ICON, 136, 3, null, null),
RESIZABLE_2005_MUSIC_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_MUSIC_ICON, null, 3, null, null),
RESIZABLE_2005_PRAYER_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_PRAYER_ICON, 169, -1, null, null),
RESIZABLE_2005_STATS_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_STATS_ICON, 37, null, null, null),
RESIZABLE_2005_FRIENDS_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_FRIENDS_ICON, 38, null, null, null),
RESIZABLE_BOTTOM_2005_INVENTORY_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_INVENTORY_ICON, 98, 2, null, null),
RESIZABLE_BOTTOM_2005_QUESTS_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_QUESTS_ICON, 67, 0, null, null),
RESIZABLE_BOTTOM_2005_EQUIPMENT_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_EQUIPMENT_ICON, 132, 2, null, null),
RESIZABLE_BOTTOM_2005_INVENTORY_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_INVENTORY_ICON, 98, 1, null, null),
RESIZABLE_BOTTOM_2005_QUESTS_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_QUESTS_ICON, 66, -1, null, null),
RESIZABLE_BOTTOM_2005_EQUIPMENT_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_EQUIPMENT_ICON, 131, 3, null, null),
RESIZABLE_BOTTOM_2005_MUSIC_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_MUSIC_ICON, null, 3, null, null),
RESIZABLE_BOTTOM_2005_EMOTE_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_EMOTES_ICON, 133, 1, null, null),
RESIZABLE_BOTTOM_2005_STATS_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_STATS_ICON, 32, null, null, null),
RESIZABLE_BOTTOM_2005_PRAYER_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_PRAYER_ICON, null, -1, null, null),
RESIZABLE_BOTTOM_2005_COMBAT_ICON(Skin.AROUND_2005, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_COMBAT_ICON, 1, -1, null, null),
FIXED_2005_ROOT_INTERFACE_CONTAINER(Skin.AROUND_2005, WidgetInfo.FIXED_VIEWPORT_ROOT_INTERFACE_CONTAINER, null, null, 197, null),
FIXED_2005_INTERFACE_CONTAINER(Skin.AROUND_2005, WidgetInfo.FIXED_VIEWPORT_INTERFACE_CONTAINER, 7, null, null, null),
@@ -128,11 +136,11 @@ enum WidgetOffset
FIXED_2005_EQUIPMENT_HIGHLIGHT(Skin.AROUND_2005, WidgetInfo.FIXED_VIEWPORT_EQUIPMENT_TAB, 153, 1, 30, null),
FIXED_2005_EQUIPMENT_ICON(Skin.AROUND_2005, WidgetInfo.FIXED_VIEWPORT_EQUIPMENT_ICON, 151, 4, null, null),
FIXED_2005_PRAYER_HIGHLIGHT(Skin.AROUND_2005, WidgetInfo.FIXED_VIEWPORT_PRAYER_TAB, 181, null, 30, null),
FIXED_2005_PRAYER_ICON(Skin.AROUND_2005, WidgetInfo.FIXED_VIEWPORT_PRAYER_ICON, 178, null, null, null),
FIXED_2005_PRAYER_ICON(Skin.AROUND_2005, WidgetInfo.FIXED_VIEWPORT_PRAYER_ICON, 179, null, null, null),
FIXED_2005_MAGIC_HIGHLIGHT(Skin.AROUND_2005, WidgetInfo.FIXED_VIEWPORT_MAGIC_TAB, 209, 1, 30, null),
FIXED_2005_MAGIC_ICON(Skin.AROUND_2005, WidgetInfo.FIXED_VIEWPORT_MAGIC_ICON, 206, 2, null, null),
FIXED_2005_MAGIC_ICON(Skin.AROUND_2005, WidgetInfo.FIXED_VIEWPORT_MAGIC_ICON, 206, 3, null, null),
FIXED_2005_FRIENDS_CHAT_HIGHLIGHT(Skin.AROUND_2005, WidgetInfo.FIXED_VIEWPORT_FRIENDS_CHAT_TAB, 15, null, null, null),
FIXED_2005_FRIENDS_CHAT_ICON(Skin.AROUND_2005, WidgetInfo.FIXED_VIEWPORT_FRIENDS_CHAT_ICON, 22, 0, null, null),
FIXED_2005_FRIENDS_CHAT_ICON(Skin.AROUND_2005, WidgetInfo.FIXED_VIEWPORT_FRIENDS_CHAT_ICON, 22, null, null, null),
FIXED_2005_FRIENDS_HIGHLIGHT(Skin.AROUND_2005, WidgetInfo.FIXED_VIEWPORT_FRIENDS_TAB, 51, null, 30, null),
FIXED_2005_FRIENDS_ICON(Skin.AROUND_2005, WidgetInfo.FIXED_VIEWPORT_FRIENDS_ICON, 49, -1, null, null),
FIXED_2005_IGNORES_HIGHLIGHT(Skin.AROUND_2005, WidgetInfo.FIXED_VIEWPORT_IGNORES_TAB, 79, null, 30, null),
@@ -144,7 +152,7 @@ enum WidgetOffset
FIXED_2005_EMOTES_HIGHLIGHT(Skin.AROUND_2005, WidgetInfo.FIXED_VIEWPORT_EMOTES_TAB, 178, null, 30, null),
FIXED_2005_EMOTES_ICON(Skin.AROUND_2005, WidgetInfo.FIXED_VIEWPORT_EMOTES_ICON, 178, 1, null, null),
FIXED_2005_MUSIC_HIGHLIGHT(Skin.AROUND_2005, WidgetInfo.FIXED_VIEWPORT_MUSIC_TAB, 206, null, 30, null),
FIXED_2005_MUSIC_ICON(Skin.AROUND_2005, WidgetInfo.FIXED_VIEWPORT_MUSIC_ICON, 202, 5, null, null),
FIXED_2005_MUSIC_ICON(Skin.AROUND_2005, WidgetInfo.FIXED_VIEWPORT_MUSIC_ICON, 202, 2, null, null),
FIXED_2006_ROOT_INTERFACE_CONTAINER(Skin.AROUND_2006, WidgetInfo.FIXED_VIEWPORT_ROOT_INTERFACE_CONTAINER, null, null, 197, null),
FIXED_2006_INTERFACE_CONTAINER(Skin.AROUND_2006, WidgetInfo.FIXED_VIEWPORT_INTERFACE_CONTAINER, 7, null, null, null),

View File

@@ -29,7 +29,6 @@ import javax.inject.Inject;
import net.runelite.api.Client;
import net.runelite.api.GameState;
import net.runelite.api.events.BeforeRender;
import net.runelite.api.events.GameStateChanged;
import net.runelite.client.callback.ClientThread;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.eventbus.Subscribe;
@@ -57,10 +56,18 @@ public class LowMemoryPlugin extends Plugin
@Override
protected void startUp()
{
if (client.getGameState() == GameState.LOGGED_IN)
clientThread.invoke(() ->
{
clientThread.invoke(() -> client.changeMemoryMode(config.lowDetail()));
}
// When the client starts it initializes the texture size based on the memory mode setting.
// Don't set low memory before the login screen is ready to prevent loading the low detail textures,
// which breaks the gpu plugin due to it requiring the 128x128px textures
if (client.getGameState().getState() >= GameState.LOGIN_SCREEN.getState())
{
client.changeMemoryMode(config.lowDetail());
return true;
}
return false;
});
}
@Override
@@ -80,19 +87,13 @@ public class LowMemoryPlugin extends Plugin
{
if (configChanged.getGroup().equals(LowMemoryConfig.GROUP))
{
clientThread.invoke(() -> client.changeMemoryMode(config.lowDetail()));
}
}
@Subscribe
public void onGameStateChanged(GameStateChanged event)
{
// When the client starts it initializes the texture size based on the memory mode setting.
// Don't set low memory before the login screen is ready to prevent loading the low detail textures,
// which breaks the gpu plugin due to it requiring the 128x128px textures
if (event.getGameState() == GameState.LOGIN_SCREEN)
{
client.changeMemoryMode(config.lowDetail());
clientThread.invoke(() ->
{
if (client.getGameState().getState() >= GameState.LOGIN_SCREEN.getState())
{
client.changeMemoryMode(config.lowDetail());
}
});
}
}

View File

@@ -128,7 +128,6 @@ public class MenuEntrySwapperPlugin extends Plugin
MenuAction.ITEM_THIRD_OPTION,
MenuAction.ITEM_FOURTH_OPTION,
MenuAction.ITEM_FIFTH_OPTION,
MenuAction.EXAMINE_ITEM,
MenuAction.ITEM_USE
);
@@ -791,7 +790,7 @@ public class MenuEntrySwapperPlugin extends Plugin
ItemComposition itemComposition = event.getItemComposition();
Integer option = getSwapConfig(true, itemComposition.getId());
if (option != null)
if (option != null && option < itemComposition.getInventoryActions().length)
{
itemComposition.setShiftClickActionIndex(option);
}

View File

@@ -488,17 +488,14 @@ public class WorldMapPlugin extends Plugin
}
// Must setup the quest icons on the client thread, after the player has logged in.
clientThread.invokeLater(() ->
clientThread.invoke(() ->
{
if (client.getGameState() != GameState.LOGGED_IN)
if (client.getGameState() == GameState.LOGGED_IN)
{
return false;
Arrays.stream(QuestStartLocation.values())
.map(this::createQuestStartPoint)
.forEach(worldMapPointManager::add);
}
Arrays.stream(QuestStartLocation.values())
.map(this::createQuestStartPoint)
.forEach(worldMapPointManager::add);
return true;
});
}

View File

@@ -71,8 +71,8 @@ public class WidgetOverlay extends Overlay
new WidgetOverlay(client, WidgetInfo.VOLCANIC_MINE_VENTS_INFOBOX_GROUP, OverlayPosition.BOTTOM_RIGHT),
new WidgetOverlay(client, WidgetInfo.VOLCANIC_MINE_STABILITY_INFOBOX_GROUP, OverlayPosition.BOTTOM_LEFT),
new WidgetOverlay(client, WidgetInfo.MULTICOMBAT_FIXED, OverlayPosition.BOTTOM_RIGHT),
new WidgetOverlay(client, WidgetInfo.MULTICOMBAT_RESIZEABLE_MODERN, OverlayPosition.CANVAS_TOP_RIGHT),
new WidgetOverlay(client, WidgetInfo.MULTICOMBAT_RESIZEABLE_CLASSIC, OverlayPosition.CANVAS_TOP_RIGHT),
new WidgetOverlay(client, WidgetInfo.MULTICOMBAT_RESIZABLE_MODERN, OverlayPosition.CANVAS_TOP_RIGHT),
new WidgetOverlay(client, WidgetInfo.MULTICOMBAT_RESIZABLE_CLASSIC, OverlayPosition.CANVAS_TOP_RIGHT),
new WidgetOverlay(client, WidgetInfo.TEMPOROSS_STATUS_INDICATOR, OverlayPosition.TOP_LEFT),
new WidgetOverlay(client, WidgetInfo.BA_HEAL_TEAMMATES, OverlayPosition.BOTTOM_LEFT),
new WidgetOverlay(client, WidgetInfo.BA_TEAM, OverlayPosition.TOP_RIGHT),

View File

@@ -1131,7 +1131,7 @@ public class ModelOutlineRenderer
{
drawModelOutline(model, lp.getX(), lp.getY(),
Perspective.getTileHeight(client, lp, wallObject.getPlane()),
wallObject.getOrientationA(), outlineWidth, color, feather);
0, outlineWidth, color, feather);
}
}
@@ -1143,7 +1143,7 @@ public class ModelOutlineRenderer
{
drawModelOutline(model, lp.getX(), lp.getY(),
Perspective.getTileHeight(client, lp, wallObject.getPlane()),
wallObject.getOrientationB(), outlineWidth, color, feather);
0, outlineWidth, color, feather);
}
}
}

View File

@@ -187,6 +187,18 @@ public class SwingUtil
@Override
public void mouseClicked(MouseEvent e)
{
if (OSType.getOSType() == OSType.MacOS)
{
// On macOS, frame.setVisible(true) only restores focus when the visibility was previously false.
// The frame's visibility is not set to false when the window loses focus, so we set it manually.
// Additionally, in order to bring the window to the foreground,
// frame.setVisible(true) calls CPlatformWindow::nativePushNSWindowToFront.
// However, this native method is not called with activateIgnoringOtherApps:YES,
// so any other active window will prevent our window from being brought to the front.
// To work around this, we use our macOS-specific requestForeground().
frame.setVisible(false);
OSXUtil.requestForeground();
}
frame.setVisible(true);
frame.setState(Frame.NORMAL); // Restore
}