-
Notifications
You must be signed in to change notification settings - Fork 270
Split more rendering aspects from ZoneRenderer #5742
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
base: develop
Are you sure you want to change the base?
Conversation
- 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.
Moved state opacity check to StateRenderer. Moved StateRenderer out of ZR and into TokenRenderer. Changed rendering for translucent tokens to be opaque on hover or selected.
…ecorationsOutOfZR
Opacity is now multiple of state opacity and token opacity
private float lineWeight = AppPreferences.haloLineWidth.get(); | ||
|
||
{ | ||
AppPreferences.haloOverlayOpacity.onChange(i -> opacity = i / 255f); |
There was a problem hiding this comment.
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)?
There was a problem hiding this comment.
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
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
New class TokenDecorationRenderer
New class OverlayRenderer
FacingArrowRenderer
GeometryUtil
HaloRenderer
TokenRenderer
ZoneViewModel
ZoneRenderer
Possible Drawbacks
I'm not very good at my job
Documentation Notes
Separated most token decoration rendering out of ZoneRenderer
This change is