As target is lowercased, make the condition lowercased too so it can be
properly matched.
Fixes: #1478
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
Fix bank title bar, item count and item container widget ids due to
changes in widget IDs (possibly caused by new container).
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This was oversight and swaps pickpocket options when black-jacking what
is something that other clients don't do.
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
Cache all ground items on item layer changed events and determine if
they should be shown or not in the overlay. Also, update their price in
the overlay to be not dependant on the initial state (having price
already cached or not).
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
- Invalidate clan ranks when player changes his clan
- Invalidate player names when game state changes
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
As the only purpose of clan chat was to add clan chat icons for players
in CC, this functionality can be done too from Player Indicators plugin.
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
- Change player indicators to use built-in player name rendering
- Add support for drawing clan member rank icons thanks to built-in
player name rendering
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
- Add mappings for DMM player names and methods using them
- Create class with DMM player name rendering masks
- Create mapping for cleanName from player
- Create mapping for setting name to player
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
- Add option for toggling between small and large font for in-game
overlays
- Normalize the font size usage around overlays
Closes: #1214
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
To make the behaviour consistent with the spinners, save configuration
value of text field when user presses enter.
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
To prevent ItemManager initializing with null client change reference to
the client to Provider<Client>.
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
Invalidate item manager composition cache when person is hopping or goes
to login screen to prevent issues with changing from p2p to f2p worlds.
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
- Reduce the amount of GroundItem objects created by mutating objects
instead of creating merged copies
- Reduce the amount of stream transformations required by using
LinkedHashMap and sorting the ground items before collection
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
Color hidden ground items gray when in item highlight mode to show
different between non-hidden and hidden items.
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
- Reduce amout of iterations per frame by pre-collecting the ground
items on game tick
- Collect ground items in ground item plugins and pre-compute some
easy-to-get values
- Replace the looping over all tiles with looping over collected ground
items
- Change GroundItemOverlay logic to support single list of items instead
of multi-dimensional array
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
When native window decorations are enabled (e.g when custom window
chrome is disabled), to reduce code complexity, but to maintain current
usability (e.g prevent adding new UI elements in order to position the
icons somewhere) move the title toolbar icons to sidebar.
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
Due to flaw in logic, the save event in mouseReleased was never
triggered when overlay position was reset. It is not possible anymore to
go through the logic again/not worth and so save the overlay data
immediately.
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
To remove the need for restarting plugins or reloading configurations
when plugins are loaded and then their confifguration changes, load
session configuration in advance.
Closes: #1121
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
Add null-checks for Client, what can be null when in Vanilla to
MenuManager (e.g HiscorePlugin is calling it when Client can be null
when it is running).
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
- Remove changing of isSelected property on navigation button in order
to open it
- Change navigation button handling to always "click" the wrapped button
no matter if button is selected or not and let the special callback
handle it
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
- Add formatNumber methods to StackFormatter that reuse the NumberFormat
instance
- Use new methods instead of using created NumberFormats on other places
- Use new formatter in NightmareZonePlugin
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
Fix screenshot offset by exposing getCanvasOffset from ClientUI and
using it when taking screenshots with game frame enabled.
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
Sometimes right after login overlays can be null instead of empty list.
Add null check to prevent ending on NPE.
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
- Move tooltip default position to right-bottom of mouse cursor
- Automatically adjust cursor position based on space around the tooltip
- Remove the ability from Tooltip manager to have other tooltips other
than mouse tooltips (for custom-positioned tooltips use tooltip
component directly)
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
- Remove not needed parent point parameter in RenderableEntity, it's
usage has been replaced with getBounds().getLocation()
- Remove unused class minimap orb
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
Send saving of the unsetConfiguration call to client to different thread
using ExecutorService to not block when it is called.
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
- Change instance map to resize on "fixed" layer so it can be layouted
- Scroll minimap only when mouse is in the minimap bounds
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
Change multiple overlay list definitions to use synchronized map with
layers and list of overlays to simplify the implementation a bit.
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
- Add caching for chatbox bounds
- Use cache variables when calculating OverlayBounds
- Cache everything at once when needed in the caching method without
early returns
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
- Add new method to OverlayBounds for translating them that will return
translated copy of the bounds
- Use this new method in OverlayRenderer to prevent mutations of
OverlayBounds, what are not desired
- Use stored overlay bounds in mouse events and translate them by making
new copy
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
In stretched mode the canvas dimensions are the stretched dimensions, so
add method that will return normal game dimensions in case stretched
mode is enabled and we are not in resizeable mode.
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
For consistent plugin naming this plugin should be named NPC Indicators
to follow the naming of Tile Indicators and Player Indicators.
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
Displaying amount of items in stack is unnecessary because the
information is shown on item itself, so it is just making the tooltip
unnecessary big.
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
- Register services to EventBus before the ConfigManager#load is called
- Send events on loading from file
- Do not invokeLater in invokeLater
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
- Rename Herbiboars to HerbiboarPlugin
- Rename HerbiboarsOverlay to HerbiboarOverlay
- Rename "Herbiboars" to "Herbiboar" plugin name
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
Add null check for client.getMapRegions because during plugin startup
when game is loading, they are null.
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
- Change the PlayerIndicators model to use injection
- Create new set from overlays when getOverlays is called
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
Move drawing player names on minimap to separate overlay, so the minimap
names can be rendered over minimap in resizeable mode.
Fixes#940
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
Lower default width of PanelComponent to same as the XP tracker, so 129.
Also, change fishing and woodcutting overlays to draw shorter text to
fit in new overlay panel size.
Update opponent info as well because it is using own implementation of
panel component.
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
- Add new property fill to background component, if set to false,
background is not drawn, only borders
- Use backgroundComponent for drawing instance map borders
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
- Set correct offsets for overlays based on resizable or fixed mode
- Change PanelComponent inside padding to be slighly smaller
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
- Move method for creation of all buttons from NavigationButton to swing
util
- Correctly update InfoPanel when plugin is started or needs title bar
refresh
- Correctly update ClientUI title bar when custom one is visible
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
- Change info panel to support new hooks
- Change plugins to use NavigationButton for adding buttons to
titleToolbar
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
- Extract title toolbar layout to separate component
- Create new events for adding and removing title toolbar buttons
- Create TitleToolbar through Guice
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
- Use updated construction for NavigationButton
- Replace ClientUI injections with PluginToolbar injections
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
- Create PluginToolbar through Guice
- Create separate component class for toolbar layout
- Create custom navigation button component to not depend on swing
- Create new events that are fired on new toolbar button addition and
removal
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
- Change LinkBrowser to not use ClientUI as parent for message box (not
required at all) and change it from Guice service to static utility
class
- Set screenshot plugin offsets statically without recalculating them
based on swing component
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
- Make ClientUI wrap JFrame inside
- Do not make RuneLite class depend on Swing API at all
- Create ClientUI through Guice
- Simplify initialization and showing of UI
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
- Extract common utlity methods from ClientUI to SwingUtil utlity class.
- Make OSXUtil accept JFrame instead of ClientUI
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
Automatically append 300 to every world that is lower than 300 to
support both f.e. 22 and 322 formats for specifying the world.
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>