Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more preferences for controlling the lumens overlay and environmental lighting #3851

Merged
merged 2 commits into from
Mar 4, 2023

Conversation

kwvanderlinde
Copy link
Collaborator

@kwvanderlinde kwvanderlinde commented Mar 3, 2023

Identify the Bug or Feature request

Improves #3817

Description of the Change

Three new preferences are added to improve the experience with the new lumens overlay and environmental lighting:

  1. One checkbox to control whether the lumens overlay is enabled when MapTool starts.
  2. A second checkbox to control whether the environmental lighting is enabled when MapTool starts.
  3. A spinner to control the thickness of the border between the regions of the lumens overlay.

There is also a minor tweak to handle a case overlooked in the first PR for #3817: a serialized LightSource can rarely be missing a lightList, resulting in a NPE when loading a campaign. This case is now handled in LightSource#readResolve().

Possible Drawbacks

The ever-increasing set of preferences is now even larger.

Documentation Notes

The thickness of the lumens overlay border can be controlled via the Application tab of the Preferences dialog. Setting it to zero will remove the border entirely.

image

When MapTool starts, the lumens overlay and/or environmental lighting can be shown. These are also controlled via the Application tab of the Preferences dialog.

image

Release Notes

  • The thickness of the lumens overlay border can now be controlled via preference
  • Preferences can be used to choose whether the lumens overlay or environmental lighting is shown by default when MapTool starts.

This change is Reviewable

In some very rare circumstances (probably just campaigns built during development), it is possible for a serialized
`LightSource.lightList` to be `null`. We now handle that case as equivalent to the light source having no lights.
The lumens overlay already had a configurable opacity, but now also has a configured thickness for the borders. There is
also a new toggle to control whether the lumens overlay is shown by default, and a corresponding one to control whether
the environmental lighting is shwon by default.
Copy link
Contributor

@Phergus Phergus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 8 of 8 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @kwvanderlinde)

@Phergus Phergus merged commit 56ae600 into RPTools:develop Mar 4, 2023
@kwvanderlinde kwvanderlinde deleted the feature/3817-preferences branch March 6, 2023 00:08
@cwisniew cwisniew added the feature Adding functionality that adds value label Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding functionality that adds value
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

4 participants