add toggle to keep nearby poses active constantly

This commit is contained in:
Stanley Dimant
2025-01-13 22:10:27 +01:00
parent b53c1d11e4
commit d5233d7bd0
3 changed files with 12 additions and 3 deletions

View File

@@ -15,4 +15,5 @@ public class CharaDataConfig : IMareConfiguration
public int NearbyDistanceFilter { get; set; } = 100; public int NearbyDistanceFilter { get; set; } = 100;
public bool NearbyShowOwnData { get; set; } = false; public bool NearbyShowOwnData { get; set; } = false;
public bool ShowHelpTexts { get; set; } = true; public bool ShowHelpTexts { get; set; } = true;
public bool NearbyShowAlways { get; set; } = false;
} }

View File

@@ -227,7 +227,7 @@ public sealed class CharaDataNearbyManager : DisposableMediatorSubscriberBase
} }
} }
if (_charaDataConfigService.Current.NearbyDrawWisps && !_dalamudUtilService.IsInGpose) if (_charaDataConfigService.Current.NearbyDrawWisps && !_dalamudUtilService.IsInGpose && !_dalamudUtilService.IsInCombatOrPerforming)
await _dalamudUtilService.RunOnFrameworkThread(() => ManageWispsNearby(previousPoses)).ConfigureAwait(false); await _dalamudUtilService.RunOnFrameworkThread(() => ManageWispsNearby(previousPoses)).ConfigureAwait(false);
} }
@@ -235,7 +235,7 @@ public sealed class CharaDataNearbyManager : DisposableMediatorSubscriberBase
{ {
if (_lastExecutionTime.AddSeconds(0.5) > DateTime.UtcNow) return; if (_lastExecutionTime.AddSeconds(0.5) > DateTime.UtcNow) return;
_lastExecutionTime = DateTime.UtcNow; _lastExecutionTime = DateTime.UtcNow;
if (!ComputeNearbyData) if (!ComputeNearbyData && !_charaDataConfigService.Current.NearbyShowAlways)
{ {
if (_nearbyData.Any()) if (_nearbyData.Any())
_nearbyData.Clear(); _nearbyData.Clear();
@@ -244,7 +244,7 @@ public sealed class CharaDataNearbyManager : DisposableMediatorSubscriberBase
return; return;
} }
if (!_charaDataConfigService.Current.NearbyDrawWisps || _dalamudUtilService.IsInGpose) if (!_charaDataConfigService.Current.NearbyDrawWisps || _dalamudUtilService.IsInGpose || _dalamudUtilService.IsInCombatOrPerforming)
ClearAllVfx(); ClearAllVfx();
var camera = CameraManager.Instance()->CurrentCamera; var camera = CameraManager.Instance()->CurrentCamera;

View File

@@ -65,6 +65,14 @@ internal partial class CharaDataHubUi
_configService.Save(); _configService.Save();
} }
_uiSharedService.DrawHelpText("This setting allows you to change the maximum distance in which poses will be shown. Set it to the maximum if you want to see all poses on the current map."); _uiSharedService.DrawHelpText("This setting allows you to change the maximum distance in which poses will be shown. Set it to the maximum if you want to see all poses on the current map.");
bool alwaysShow = _configService.Current.NearbyShowAlways;
if (ImGui.Checkbox("Keep active outside Poses Nearby tab", ref alwaysShow))
{
_configService.Current.NearbyShowAlways = alwaysShow;
_configService.Save();
}
_uiSharedService.DrawHelpText("This will allow Mare to continue the calculation of position of wisps etc. active outside of the 'Poses Nearby' tab." + UiSharedService.TooltipSeparator
+ "Note: The wisps etc. will disappear during combat and performing.");
}); });
if (!_uiSharedService.IsInGpose) if (!_uiSharedService.IsInGpose)