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>
Because special attack orb has been added to OSRS in latest update, this
plugin is no longer needed. The functionality that shows next change
will need to be readded in future.
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
Add default world plugin where user will be able to set his default
world. In case invalid world is set, the client default/selected one
will be used instead.
Fixes#475Closes#749
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
- Export World from RS client
- Export changeWorld method
- Create new method for creating RuneScape world
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
- Replace abbreviations with full names
- Make casing in plugins consistent (title case)
These changes are needed in order to achieve better navigation in config
panel and also to improve search results in the panel (and to reduce the
mess with current naming).
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
For most of people this plugin is not relevant so it should be disabled
by default as it adds unnecessary clutter in populated areas.
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
In case loading of Discord library failed, continue running application
and just disable Discord support.
Fixes#826
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
Add link browser utility service that will try to open specified link in
browser, and in case operation fails displays message box and copy URL
to clipboard.
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
When you splash or miss too many times HP dissapears and thus client
thinks that you have -1 HP and then idle notifier ignores that. Reason
why -1 check was there is because it was added in modification when we
were preventing the NPCs to throw notifications. But after some testing
it looks like that just checking for combat level is enough.
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
Correctly focus game canvas when requesting ClientUI focus. Also, move
the call to OSXUtil.requestFocus() to clientUI.
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
Replace equality check with contains check due to recent renaming of
some fishing spots from OSRS side.
Fixes: #755
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
As this is not used in chat commands only anymore, and since it is
configuration parameter that noone needs to disable, it is unnecessary
and is just causing confusion.
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
- Move enabling of tray notifications to RuneLiteConfig
- Move request when focused notification option to RuneLiteConfig and
use it in notifier
- Move request window focus to RuneLiteConfig and use it in notifier
- Change Notifier to use Guice for creation
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>