Commit Graph
31 Commits
Author SHA1 Message Date
Tomas Slusny 0d8870e7da Remove unnecessary null checks for game client
Remove unnecessary null checks for game client from plugins, as now
client is always not null in all of them, since in the case of it being
null the plugins are not even started.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2017-12-29 18:17:17 +01:00
Tomas Slusny 6c2e827d4a Move creation of UI to ClientUI class
- Move setting of UI-related variables to ClientUI class (create new
"create" static method to set them before creating the UI window)
- Clean up ClientUI class

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2017-12-29 18:17:16 +01:00
Tomas Slusny 6bf63a447f Cleanup RuneLite class fields
- Remove runelite variable
- Use setters for options and injector (to use them outside of tests)
- Remove getter for gui and make it package-private
- Use package-private gui field when providing ClientUI from
RuneliteModule

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2017-12-29 18:17:16 +01:00
Tomas Slusny b4eba39f6b Move creation of tray icon to ClientUI
Move creation of tray icon from RuneLite to ClientUI.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2017-12-29 18:17:15 +01:00
Tomas Slusny 06836b3e1d Move setTitle to ClientUI
Move setTitle method from RuneLite to ClientUI.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2017-12-29 18:17:15 +01:00
Tomas Slusny bd521acbb0 Move creation of client to RuneLite
Instead of using setters and getters to move around reference to Client
and creating the client in the client panel, move creation of the Client
to RuneLite and add new field to PluginDescriptor if the plugin should
be loaded when client is outdated.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2017-12-29 18:17:09 +01:00
Tomas Slusny 69b88fe3e3 Extract runQuery to QueryRunner service
Extract runQuery method from runelite to separate Guice service.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2017-12-29 16:41:09 +01:00
Tomas Slusny 984ebb63dd Extract session-related logic to SessionManager
- Extract runelite session related logic from RuneLite to SessionManager
class and expose this as Guice service
- Move WSClient to account package

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2017-12-29 16:41:09 +01:00
Tomas Slusny 82ee4a0036 Change Notifier to be injectable service
Move notify methods to Notifier and change it to be injectable Guice
service.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2017-12-29 16:41:09 +01:00
Tomas Slusny 19416ba5ca Normalize plugin panel display
- Add same padding to each panel
- Wrap each panel in JScrollPane
- Clean up plugin panel API and set normalized width, height and layout
to each panel instead of having to manually specify it for each panel
- Make PluginPanel class abstract

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2017-12-23 19:30:27 -05:00
Tomas Slusny 4568f4302f Move IconTextField to Hiscore plugin
As it is the only place where it is used, it should be placed there.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2017-12-23 19:30:26 -05:00
Tomas Slusny 670ffe135f Simplify navigation button code
Simplify code of the navigation button to also handle images and to
extend the swing JButton instead of wrapping it in getButton method.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2017-12-23 19:30:25 -05:00
Tomas Slusny bb8f17d75e Change XP tracker button to use image
Change xp tracker button to use actual image instead of text because
text was not showing on both Windows and Linux.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2017-12-23 19:30:21 -05:00
Tomas Slusny 002cf6223f Change UIManager defaults to use OSRS font
Change UIManager defaults for fonts to use OSRS font instead.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2017-12-23 19:30:11 -05:00
Tomas Slusny 4660bb3739 Fix OkHttp connection leaks on connection error
When request fails, entire response needs to be wrapped in try with
resources in order to close the connection properly and not only
response body.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2017-12-22 02:05:28 +01:00
Tomas Slusny 7c989dc105 runelite-client: Add app name to RuneliteProperties 2017-12-19 20:37:40 -05:00
Tomas Slusny 3769cab5b4 Remove unused app property from RSStub
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2017-12-19 20:15:54 -05:00
Tomas Slusny 801a907f15 Isolate graphics for each overlay (#267)
Clone graphics before rendering overlay, then use the cloned graphics
for the overlay and dispose it afterwards to prevent any unwanted side
effects from overlay.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2017-12-17 14:18:15 +01:00
Tomas Slusny 69deaa5b4a Fix overlay renderer cache
Fix overlay renderer plugin caching to actually use plugin received from
onPluginChanged hook, because the events are fired before the plugins
are actually added/removed to the plugin list.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2017-12-17 00:31:35 +01:00
Tomas Slusny 08e3282ed7 Add support for examining bank and eq items price
Add support for showing bank, bank inventory and equipment item prices
when examined.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2017-12-17 00:16:51 +01:00
Tomas Slusny e4d15f0790 Fix displaying of examine price without GE value
Fix displaying of : in item price when GE value is missing and only HA
value is present.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2017-12-16 23:54:33 +01:00
Tomas Slusny 4d8dde760f Cleanup overlay logic after native-ui changes
- Remove unnecessary derivations of runescapeSmallFont
- Render overlays in "safe" environment (restore original font and
tranform after overlay rendering is done)
- Use TextComponent at more places
- Remove unnecessary setting of default font in VolcanicMineOverlay
- Change RenderableEntity from abstract class to interface
- Remove unused tooltip configuration from RuneliteConfig
- Use viewportWidget instead of chatbox widget for positioning the
overlay groups (thanks to Devin for tip)

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2017-12-15 00:13:44 +01:00
Tomas Slusny 4076f75e34 runelite-client: Make overlay UI reuseable and look native 2017-12-13 18:26:56 -05:00
Tomas Slusny f78667f9c7 runelite-client: add plugin changed event 2017-12-13 18:26:25 -05:00
Tomas Slusny 49a11cab46 Show full price for stackable items when examined 2017-12-08 18:34:30 -05:00
Tomas Slusny 02ebe82e2d Show item price when examining item
- Update examine plugin to include setting for showing item price when
examining item and choosing colors for the examine message (using new
chat message API)

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2017-12-07 21:08:38 -05:00
Tomas Slusny 4860eb871f Add chat message recolouring API
- Update api of SendMessage to also include message type
- Create API for updating chat message based on saved colors for normal
and highlighted message and for adding game messages that can be
recolored too
- Update chat commands plugin to use the new API
- Add option to globally disable recoloring to RuneliteConfig

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2017-12-07 21:08:36 -05:00
Tomas Slusny 88932d2a72 Improve item caching
- Add item composition cache and item search cache to ItemManager

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2017-12-07 21:08:34 -05:00
Tomas Slusny 454fd4cfc1 Add clan ranks to clan chat
- Extend API to include support for getting clan members and
informations about them
- Add API for manipulation with modIcons
- Display clan ranks in clan chat (add to ClanChat plugin)
- Add new hook for clan members changed

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2017-12-04 19:33:13 -05:00
Tomas Slusny 1c86c30e1a Make native notifications lightweight
Remove dependency on external notification library and rewrite
notifications to use lightweight native system notification
implementations:

* Linux - notify-send
* OS X - apple script - display notification
* Windows - TrayIcon

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2017-12-02 15:01:05 -05:00
Tomas Slusny 663cb8e69f Add hide items under value to GroundItems plugin
Add option to hide items under either Grand Exchange or High Alchemy
value to GroundItems plugin. Also ensure that items with 0 or no GE
price are shown anyway, as they are probably untradeables or inactive.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2017-12-02 01:10:20 +01:00