Draft: Maintenence
Multiple in-game zoom fixes:
- Fixed combat canvas overlap when using using the in-game zoom.
- Tooltips now respect zoom-level, and will always be the same distance from the cursor.
- Fixed town-map not getting properly zoomed in when the in-game zoom is used, in certain browsers.
Not for changelog - only dev changes:
-
Modified the twee compiler:
- It is now possible to have multiple js or css files with the same name - if they are in different folders. (Previously threw an error during compilation, and the first file was ignored)
- Tested it over several weeks with no issues by compiling normally.
Reworked tooltips completely:
-
I wanted to make the new tooltips more useful and easier to use. I did a total refactor for making it much more robust, and removed the need to do any manual tooltip initialization. Hopefully will see some more use now.
- Refactored completely.
- Removed the need for manual initialization of tooltips (Never need to add initializeTooltips() any more)
- Improved performance (of the tooltips) when loading page or overlay by 50%-80% due to better handling of dynamic elements, and event delegation.
- Further improved performance for showing/hiding the tooltips due to better caching of elements and reduced redundant updates.
- Improved performance and smoothness for when the tooltip follows the cursor, due to throttling to the framerate.
- Better cleanup and handling of orphaned tooltips (tooltips that remain after the element has been removed in the DOM)
- Tooltips now respect zoom-level (in options menu). The distance from cursor should now be the same (relatively), in all zoom levels.
-
Fix for possible recursion (when providing a custom date - unused until now) when getting the weather type
-
Added new UI macro:
rangeslider
- allows for 2 variables to be set in a single slider, with a minimum and a maximum value. See image below. -
Cleanup for numberslider, removing deprecated numberpool.
-
Fix for deepMerge when merging deeply nested objects.
-
Placed self-fixing location-image error display behind a debug condition. (The error occurs when changing passages too quickly on a slow device, or when hosted online. It fixes itself - and there are no actual image errors, so the error should only show up in debug mode.)
Image: rangeslider example