Add Disable Tile Culling Option

This commit is contained in:
copecone committed 2026-10-19 18:14:02 +09:00
1 parent 7c6210d2c4
commit d1ba5d5c18
7 files changed
+86 -2

No files matched your search

+19
View File
@@ -141,6 +141,7 @@ internal static class RenderConfigWindow
private static O5Toggle? _nonTileToggle;
private static O5Toggle? _highResBloomCorrectionToggle;
private static O5Toggle? _fixCustomFrameRateToggle;
private static O5Toggle? _disableTileCullingToggle;
// Planet color overrides: the toggle enables the override, the picker holds the color. A disabled toggle stores
// null in AdvancedConfig (no override is applied by PersistencePatch) and blocks the picker.
@@ -807,6 +808,22 @@ internal static class RenderConfigWindow
},
generateLabel: false
);
// Disable Tile Culling (AdvancedConfig.DisableTileCulling): prevents tiles from being disabled outside the frustum
_disableTileCullingToggle = CreateToggleField(
ctx, CreateFieldSlot(advRight),
labelKey: "",
defaultValue: true,
value: config.AdvancedConfig.DisableTileCulling,
toggleTextKey: "ui.render_config.disable_tile_culling",
id: "toggle_disable_tile_culling",
onChanged: val =>
{
config.AdvancedConfig.DisableTileCulling = val;
MarkConfigModified();
},
generateLabel: false
);
// 7-1. Planet Color Settings (Optional).
// For each planet: the toggle turns the override on/off (off stores null and blocks/collapses the picker);
@@ -1018,6 +1035,7 @@ internal static class RenderConfigWindow
_nonTileToggle?.Set(config.AdvancedConfig.NonTile, false);
_highResBloomCorrectionToggle?.Set(config.AdvancedConfig.HighResBloomCorrection, false);
_fixCustomFrameRateToggle?.Set(config.AdvancedConfig.FixCustomFrameRate, false);
_disableTileCullingToggle?.Set(config.AdvancedConfig.DisableTileCulling, false);
// Planet colors: toggle on when an override is stored; the picker shows the stored color or the default and is
// blocked without an override
@@ -1201,6 +1219,7 @@ internal static class RenderConfigWindow
if (_nonTileToggle != null) target.AdvancedConfig.NonTile = _nonTileToggle.Value;
if (_highResBloomCorrectionToggle != null) target.AdvancedConfig.HighResBloomCorrection = _highResBloomCorrectionToggle.Value;
if (_fixCustomFrameRateToggle != null) target.AdvancedConfig.FixCustomFrameRate = _fixCustomFrameRateToggle.Value;
if (_disableTileCullingToggle != null) target.AdvancedConfig.DisableTileCulling = _disableTileCullingToggle.Value;
// Planet Colors
target.AdvancedConfig.firePlanetColor = (_firePlanetToggle?.Value == true && _firePlanetPicker != null)