Merge remote-tracking branch 'origin/master' into HEAD
This commit is contained in:
@@ -1917,6 +1917,8 @@ public interface Client extends GameEngine
|
|||||||
|
|
||||||
TextureProvider getTextureProvider();
|
TextureProvider getTextureProvider();
|
||||||
|
|
||||||
|
NodeCache getCachedModels2();
|
||||||
|
|
||||||
void setRenderArea(boolean[][] renderArea);
|
void setRenderArea(boolean[][] renderArea);
|
||||||
|
|
||||||
int getRasterizer3D_clipMidX2();
|
int getRasterizer3D_clipMidX2();
|
||||||
|
|||||||
@@ -33,4 +33,8 @@ public interface NodeCache
|
|||||||
* Resets cache.
|
* Resets cache.
|
||||||
*/
|
*/
|
||||||
void reset();
|
void reset();
|
||||||
|
|
||||||
|
void setCapacity(int capacity);
|
||||||
|
|
||||||
|
void setRemainingCapacity(int remainingCapacity);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,6 +122,7 @@ public class ClientUI
|
|||||||
private final Provider<ClientThread> clientThreadProvider;
|
private final Provider<ClientThread> clientThreadProvider;
|
||||||
private final EventBus eventBus;
|
private final EventBus eventBus;
|
||||||
private final boolean safeMode;
|
private final boolean safeMode;
|
||||||
|
private final String title;
|
||||||
|
|
||||||
private final CardLayout cardLayout = new CardLayout();
|
private final CardLayout cardLayout = new CardLayout();
|
||||||
private final Rectangle sidebarButtonPosition = new Rectangle();
|
private final Rectangle sidebarButtonPosition = new Rectangle();
|
||||||
@@ -166,6 +167,7 @@ public class ClientUI
|
|||||||
this.clientThreadProvider = clientThreadProvider;
|
this.clientThreadProvider = clientThreadProvider;
|
||||||
this.eventBus = eventBus;
|
this.eventBus = eventBus;
|
||||||
this.safeMode = safeMode;
|
this.safeMode = safeMode;
|
||||||
|
this.title = RuneLiteProperties.getTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
@@ -299,7 +301,7 @@ public class ClientUI
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
frame.setTitle(RuneLiteProperties.getTitle() + " - " + name);
|
frame.setTitle(title + " - " + name);
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -326,7 +328,7 @@ public class ClientUI
|
|||||||
// Try to enable fullscreen on OSX
|
// Try to enable fullscreen on OSX
|
||||||
OSXUtil.tryEnableFullscreen(frame);
|
OSXUtil.tryEnableFullscreen(frame);
|
||||||
|
|
||||||
frame.setTitle(RuneLiteProperties.getTitle());
|
frame.setTitle(title);
|
||||||
frame.setIconImage(ICON);
|
frame.setIconImage(ICON);
|
||||||
frame.getLayeredPane().setCursor(Cursor.getDefaultCursor()); // Prevent substance from using a resize cursor for pointing
|
frame.getLayeredPane().setCursor(Cursor.getDefaultCursor()); // Prevent substance from using a resize cursor for pointing
|
||||||
frame.setLocationRelativeTo(frame.getOwner());
|
frame.setLocationRelativeTo(frame.getOwner());
|
||||||
@@ -512,7 +514,7 @@ public class ClientUI
|
|||||||
frame.revalidateMinimumSize();
|
frame.revalidateMinimumSize();
|
||||||
|
|
||||||
// Create tray icon (needs to be created after frame is packed)
|
// Create tray icon (needs to be created after frame is packed)
|
||||||
trayIcon = SwingUtil.createTrayIcon(ICON, RuneLiteProperties.getTitle(), frame);
|
trayIcon = SwingUtil.createTrayIcon(ICON, title, frame);
|
||||||
|
|
||||||
// Move frame around (needs to be done after frame is packed)
|
// Move frame around (needs to be done after frame is packed)
|
||||||
if (config.rememberScreenBounds() && !safeMode)
|
if (config.rememberScreenBounds() && !safeMode)
|
||||||
@@ -745,6 +747,7 @@ public class ClientUI
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns current cursor set on game container
|
* Returns current cursor set on game container
|
||||||
|
*
|
||||||
* @return awt cursor
|
* @return awt cursor
|
||||||
*/
|
*/
|
||||||
public Cursor getCurrentCursor()
|
public Cursor getCurrentCursor()
|
||||||
@@ -754,6 +757,7 @@ public class ClientUI
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns current custom cursor or default system cursor if cursor is not set
|
* Returns current custom cursor or default system cursor if cursor is not set
|
||||||
|
*
|
||||||
* @return awt cursor
|
* @return awt cursor
|
||||||
*/
|
*/
|
||||||
public Cursor getDefaultCursor()
|
public Cursor getDefaultCursor()
|
||||||
@@ -764,6 +768,7 @@ public class ClientUI
|
|||||||
/**
|
/**
|
||||||
* Changes cursor for client window. Requires ${@link ClientUI#init()} to be called first.
|
* Changes cursor for client window. Requires ${@link ClientUI#init()} to be called first.
|
||||||
* FIXME: This is working properly only on Windows, Linux and Mac are displaying cursor incorrectly
|
* FIXME: This is working properly only on Windows, Linux and Mac are displaying cursor incorrectly
|
||||||
|
*
|
||||||
* @param image cursor image
|
* @param image cursor image
|
||||||
* @param name cursor name
|
* @param name cursor name
|
||||||
*/
|
*/
|
||||||
@@ -782,6 +787,7 @@ public class ClientUI
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Changes cursor for client window. Requires ${@link ClientUI#init()} to be called first.
|
* Changes cursor for client window. Requires ${@link ClientUI#init()} to be called first.
|
||||||
|
*
|
||||||
* @param cursor awt cursor
|
* @param cursor awt cursor
|
||||||
*/
|
*/
|
||||||
public void setCursor(final Cursor cursor)
|
public void setCursor(final Cursor cursor)
|
||||||
@@ -791,6 +797,7 @@ public class ClientUI
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Resets client window cursor to default one.
|
* Resets client window cursor to default one.
|
||||||
|
*
|
||||||
* @see ClientUI#setCursor(BufferedImage, String)
|
* @see ClientUI#setCursor(BufferedImage, String)
|
||||||
*/
|
*/
|
||||||
public void resetCursor()
|
public void resetCursor()
|
||||||
@@ -826,6 +833,7 @@ public class ClientUI
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Paint UI related overlays to target graphics
|
* Paint UI related overlays to target graphics
|
||||||
|
*
|
||||||
* @param graphics target graphics
|
* @param graphics target graphics
|
||||||
*/
|
*/
|
||||||
public void paintOverlays(final Graphics2D graphics)
|
public void paintOverlays(final Graphics2D graphics)
|
||||||
@@ -1035,16 +1043,16 @@ public class ClientUI
|
|||||||
|
|
||||||
if (config.usernameInTitle() && (client instanceof Client))
|
if (config.usernameInTitle() && (client instanceof Client))
|
||||||
{
|
{
|
||||||
final Player player = ((Client)client).getLocalPlayer();
|
final Player player = ((Client) client).getLocalPlayer();
|
||||||
|
|
||||||
if (player != null && player.getName() != null)
|
if (player != null && player.getName() != null)
|
||||||
{
|
{
|
||||||
frame.setTitle(RuneLiteProperties.getTitle() + " - " + player.getName());
|
frame.setTitle(title + " - " + player.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
frame.setTitle(RuneLiteProperties.getTitle());
|
frame.setTitle(title);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (frame.isAlwaysOnTopSupported())
|
if (frame.isAlwaysOnTopSupported())
|
||||||
|
|||||||
@@ -243,6 +243,17 @@ public class ContainableFrame extends JFrame
|
|||||||
expandedClientOppositeDirection = false;
|
expandedClientOppositeDirection = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setExtendedState(int state)
|
||||||
|
{
|
||||||
|
if (OSType.getOSType() != OSType.MacOS)
|
||||||
|
{
|
||||||
|
super.setMaximizedBounds(getWindowAreaBounds());
|
||||||
|
}
|
||||||
|
|
||||||
|
super.setExtendedState(state);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Due to Java bug JDK-4737788, maximizing an undecorated frame causes it to cover the taskbar.
|
* Due to Java bug JDK-4737788, maximizing an undecorated frame causes it to cover the taskbar.
|
||||||
* As a workaround, Substance calls this method when the window is maximized to manually set the
|
* As a workaround, Substance calls this method when the window is maximized to manually set the
|
||||||
|
|||||||
@@ -13,8 +13,10 @@ public interface RSEvictingDualNodeHashTable extends NodeCache
|
|||||||
void reset();
|
void reset();
|
||||||
|
|
||||||
@Import("capacity")
|
@Import("capacity")
|
||||||
|
@Override
|
||||||
void setCapacity(int capacity);
|
void setCapacity(int capacity);
|
||||||
|
|
||||||
@Import("remainingCapacity")
|
@Import("remainingCapacity")
|
||||||
|
@Override
|
||||||
void setRemainingCapacity(int remainingCapacity);
|
void setRemainingCapacity(int remainingCapacity);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user