Merge remote-tracking branch 'runelite/master'
This commit is contained in:
@@ -44,7 +44,7 @@ import okhttp3.HttpUrl;
|
||||
@Slf4j
|
||||
public class ClientLoader implements Supplier<Applet>
|
||||
{
|
||||
private static final String CONFIG_URL = "http://oldschool.runescape.com/jav_config.ws";
|
||||
private static final String CONFIG_URL = "https://oldschool.runescape.com/jav_config.ws";
|
||||
private static final String BACKUP_CONFIG_URL = "https://raw.githubusercontent.com/open-osrs/hosting/master/jav_config.ws";
|
||||
|
||||
private static final int NUM_ATTEMPTS = 10;
|
||||
|
||||
@@ -115,6 +115,7 @@ public class ClientUI
|
||||
private static final String CONFIG_CLIENT_MAXIMIZED = "clientMaximized";
|
||||
private static final String CONFIG_OPACITY = "enableOpacity";
|
||||
private static final String CONFIG_OPACITY_AMOUNT = "opacityPercentage";
|
||||
private static final String CONFIG_CLIENT_SIDEBAR_CLOSED = "clientSidebarClosed";
|
||||
private static final int CLIENT_WELL_HIDDEN_MARGIN = 160;
|
||||
private static final int CLIENT_WELL_HIDDEN_MARGIN_TOP = 10;
|
||||
public static final BufferedImage ICON = ImageUtil.getResourceStreamFromClass(ClientUI.class, "/openosrs.png");
|
||||
@@ -502,7 +503,8 @@ public class ClientUI
|
||||
sidebarNavigationButton = NavigationButton
|
||||
.builder()
|
||||
.priority(100)
|
||||
.icon(sidebarClosedIcon)
|
||||
.icon(sidebarOpenIcon)
|
||||
.tooltip("Open SideBar")
|
||||
.onClick(this::toggleSidebar)
|
||||
.build();
|
||||
|
||||
@@ -512,7 +514,12 @@ public class ClientUI
|
||||
null);
|
||||
|
||||
titleToolbar.addComponent(sidebarNavigationButton, sidebarNavigationJButton);
|
||||
toggleSidebar();
|
||||
|
||||
// Open sidebar if the config closed state is unset
|
||||
if (configManager.getConfiguration(CONFIG_GROUP, CONFIG_CLIENT_SIDEBAR_CLOSED) == null)
|
||||
{
|
||||
toggleSidebar();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -918,6 +925,7 @@ public class ClientUI
|
||||
{
|
||||
sidebarNavigationJButton.setIcon(new ImageIcon(sidebarOpenIcon));
|
||||
sidebarNavigationJButton.setToolTipText("Open SideBar");
|
||||
configManager.setConfiguration(CONFIG_GROUP, CONFIG_CLIENT_SIDEBAR_CLOSED, true);
|
||||
|
||||
contract();
|
||||
|
||||
@@ -928,6 +936,7 @@ public class ClientUI
|
||||
{
|
||||
sidebarNavigationJButton.setIcon(new ImageIcon(sidebarClosedIcon));
|
||||
sidebarNavigationJButton.setToolTipText("Close SideBar");
|
||||
configManager.unsetConfiguration(CONFIG_GROUP, CONFIG_CLIENT_SIDEBAR_CLOSED);
|
||||
|
||||
// Try to restore last panel
|
||||
expand(currentNavButton);
|
||||
@@ -1164,15 +1173,8 @@ public class ClientUI
|
||||
}
|
||||
else
|
||||
{
|
||||
// Try to expand sidebar
|
||||
if (!sidebarOpen)
|
||||
{
|
||||
bounds.width += pluginToolbar.getWidth();
|
||||
}
|
||||
|
||||
if (config.automaticResizeType() == ExpandResizeType.KEEP_GAME_SIZE)
|
||||
{
|
||||
|
||||
// Try to contract plugin panel
|
||||
if (pluginPanel != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user