Add background image support with modding fallback and UI toggle
This PR adds support for an optional background image on the map canvas.
Features:
- Background image loads via the existing texture/modding system
- User can toggle background image visibility from the Preferences > Graphics tab
- Image is drawn beneath the map using a new render layer above the canvas
Technical Notes:
- Image is named
background-image.png - Respects modding fallback: first loads from modding directory if available
- Does not rely on depth testing
Additional Info:
- Adds
showBackgroundImagesetting to config - Adds
backgroundImageCheckBoxto the UI
Considerations/Limitations:
-Stretches the image between pre-defined room co-ordinates in order to match the background map I cropped. -These are arbitrary for my uses with the map I made, but could be given an 'official' range if you think it's useful generally. -The image I supplied isn't necessary - could be a transparent background-image.png in Pixmaps. Then it only loads if in modding folder and toggled.
Tested on macOS with both default and custom background images.
Let me know if any adjustments are needed!
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 67.05%. Comparing base (
c59476e) to head (a4c60ba). Report is 60 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #380 +/- ##
==========================================
- Coverage 68.77% 67.05% -1.73%
==========================================
Files 84 85 +1
Lines 4029 4107 +78
Branches 249 249
==========================================
- Hits 2771 2754 -17
- Misses 1258 1353 +95
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.