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>
This overhauls most of the overlay renderer to do so. There are 4 (or 5) "snap corners" that let overlays change their position, or you can set a custom location which is at a set x/y.
Calculate which layer overlays are on up front and build separate lists for each layer. The fixed-point under-widget overlays are moved to above-widget so that they work when moved above the interfaces.
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>