Skip to content

Conversation

bubblobill
Copy link
Collaborator

@bubblobill bubblobill commented Aug 2, 2025

Identify the Bug or Feature request

You can link a pull request to an issue with one of
fixes #5622 #5746
progresses #5594 #5586 #4726 #4944 #3691 #2750 #2346 #2328 #2000

until I got sick of looking for affected issues

Description of the Change

LabelRenderer

  • Moved caches to class, added setters and static isLabelVisible method.
  • Moved token label generation in token rendering sequence preparatory to moving it out to DecorationRenderer.

New class TokenDecorationRenderer

  • Paints things before and after token rendering.
  • Hub for halos, bars, states, etc. More bits to follow.

New class OverlayRenderer

  • For painting states and bars.

FacingArrowRenderer

  • Facing arrow now follows grid cell shape. Made some variables non-local.

GeometryUtil

  • Added functions for finding intersection points.

HaloRenderer

  • Now honours preference for opacity.

TokenRenderer

  • Updated to call decoration renderer before and after painting image. plus other tweaks.

ZoneViewModel

  • Added method- isUsingVision().

ZoneRenderer

  • Inverted hasMoveSelectionSetMoved().
  • Made imageLabelFactory a constant.
  • LabelRenderingCache offloaded to LabelRenderer.
  • Renamed renderLabels() method as it is confusing.
  • Removed redundant image loading and token flipping from renderTokens().
  • Other housework.

Possible Drawbacks

I'm not very good at my job

Documentation Notes

Separated most token decoration rendering out of ZoneRenderer


This change is Reviewable

 - Moved caches to class, added setters and static isLabelVisible method.
 - Moved token label generation in token rendering sequence preparatory to moving it out to DecorationRenderer.
New class TokenDecorationRenderer
 - Paints things before and after token rendering.
 - Hub for halos, bars, states, etc. More bits to follow.
New class OverlayRenderer
 - For painting states and bars.
FacingArrowRenderer
 - Facing arrow now follows grid cell shape. Made some variables non-local.
GeometryUtil
 - Added functions for finding intersection points.
HaloRenderer
 - Now honours preference for opacity.
TokenRenderer
 - Updated to call decoration renderer before and after painting image. plus other tweaks.
ZoneViewModel
 - Added method- isUsingVision().
ZoneRenderer
 - Inverted hasMoveSelectionSetMoved().
 - Made imageLabelFactory a constant.
 - LabelRenderingCache offloaded to LabelRenderer.
 - Renamed renderLabels() method as it is confusing.
 - Removed redundant image loading and token flipping from renderTokens().
 - Other housework.
@github-actions github-actions bot added the feature Adding functionality that adds value label Aug 2, 2025
@bubblobill bubblobill added performance A performance or quality of life improvement code-maintenance Adding/editing javadocs, unit tests, formatting. labels Aug 2, 2025
@bubblobill bubblobill self-assigned this Aug 2, 2025
private float lineWeight = AppPreferences.haloLineWidth.get();

{
AppPreferences.haloOverlayOpacity.onChange(i -> opacity = i / 255f);
Copy link
Contributor

Choose a reason for hiding this comment

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

I do not think AppPreferences.haloOverlayOpacity is intended to be used in this way as the opacity for all rendered halos, but was intended just for a token's vision when using the halo color (as per the logic in VisionOverlayRenderer.java). Given the current default preference value of 50, this code would nerf everyone's halos!

Maybe the existing AppPreferences.haloOverlayOpacity display text should be changed for clarity (even though it sits under the Map Visuals tab).

In light of my halo feature PR, maybe there should instead be a new campaign setting or preference for global halo opacity (and/or configured for halos a la lights and auras)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Then they should not have called it "halo overlay opacity", and I agree the default is stoopid.

If only there was some way to manage halos in a fine-grained manner that permitted individual variation from the global setting. :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-maintenance Adding/editing javadocs, unit tests, formatting. feature Adding functionality that adds value performance A performance or quality of life improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Facing arrow obscured
2 participants