mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-15 07:42:23 +00:00
Read scope opacity for share links from the mask, as feather is
The share state took the opacity the slider last showed, which a show-only update can leave apart from the mask; it now reads the mask itself, as the feather does. The test reset also restores full opacity. Co-authored-by: Manjunath Paparaju <[email protected]>
This commit is contained in:
1 parent
5383b470ee
commit
471151910d
3 files changed
+5
-1
No files matched your search
@@ -591,6 +591,7 @@ export function _resetScopeMaskForTest() {
|
||||
_viewer = null;
|
||||
_enabled = true;
|
||||
_featherRatio = SCOPE_FEATHER_RATIO_DEFAULT;
|
||||
_maskOpacity = 1;
|
||||
_terminusAlpha = SCOPE_OUTSIDE_ALPHA;
|
||||
_terminusOverride = null;
|
||||
_terminusRepaints = 0;
|
||||
|
||||
@@ -226,6 +226,7 @@ export class StyleManager extends ShellFacade {
|
||||
getDetectionTuning: services.getDetectionTuning,
|
||||
getKeyholeFadeTuning: services.getKeyholeFadeTuning,
|
||||
getScopeMaskFeather: services.getScopeMaskFeather,
|
||||
getScopeMaskOpacity: services.getScopeMaskOpacity,
|
||||
getScopeTerminusOverride: services.getScopeTerminusOverride,
|
||||
governorRequestRender: services.governorRequestRender,
|
||||
holdContinuousRender: services.holdContinuousRender,
|
||||
|
||||
@@ -225,6 +225,7 @@ export class VisualSettings {
|
||||
// What the Scope and Celestial controls show; null until first set.
|
||||
this._scopeEnabledShown = null;
|
||||
this._scopeFeatherShown = null;
|
||||
this._scopeOpacityShown = null;
|
||||
this._celestialShown = null;
|
||||
this.activeStyle = 'normal';
|
||||
this._preCyberStyle = null;
|
||||
@@ -895,6 +896,7 @@ export class VisualSettings {
|
||||
getDetectionTuning,
|
||||
isScopeMaskEnabled,
|
||||
getScopeMaskFeather,
|
||||
getScopeMaskOpacity,
|
||||
getScopeTerminusOverride,
|
||||
} = this.services;
|
||||
const detection = this._shareableDetectionState();
|
||||
@@ -915,7 +917,7 @@ export class VisualSettings {
|
||||
celestialRingEnabled: this.celestialRingEnabled,
|
||||
scopeEnabled: isScopeMaskEnabled(),
|
||||
scopeFeatherPct: Math.round(getScopeMaskFeather() * 100),
|
||||
scopeOpacityPct: this._scopeOpacityShown ?? 100,
|
||||
scopeOpacityPct: Math.round((getScopeMaskOpacity?.() ?? 1) * 100),
|
||||
// null when adaptive — the share layer omits `sce` entirely in that case.
|
||||
scopeTerminusPct:
|
||||
getScopeTerminusOverride() == null
|
||||
|
||||
Reference in new issue
Block a user