mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-08-06 09:00:25 +08:00
feat: add 'hide sorters too' sub-option for do-not-render feature
When enabled (with the parent feature on), sorters are also hidden, leaving only belts and their cargo visible. Hidden sorters also become click-through so clicks reach the belts beneath them. - RenderingPatch: gate InserterRenderer.Render and the RaycastLogic inserter exemption on a new HideSorters flag - FactoryPatch/UXAssist/FactoryConfigProvider: new DoNotRenderEntitiesHideSorters config wired to the flag - UIConfigWindow/I18NKeys: indented sub-checkbox + EN/zh label - README/CHANGELOG: document the sub-option; bump to 1.5.9
This commit is contained in:
@@ -259,7 +259,19 @@ public static class UIConfigWindow
|
||||
|
||||
x = 0;
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab2, FactoryConfigProvider.DoNotRenderEntitiesEnabled, I18NKeys.DoNotRenderFactoryEntities);
|
||||
{
|
||||
wnd.AddCheckBox(x, y, tab2, FactoryConfigProvider.DoNotRenderEntitiesEnabled, I18NKeys.DoNotRenderFactoryEntities);
|
||||
y += 27f;
|
||||
var hideSortersCheckBox = wnd.AddCheckBox(x + 20f, y, tab2, FactoryConfigProvider.DoNotRenderEntitiesHideSortersEnabled, I18NKeys.HideSortersToo, 13);
|
||||
FactoryConfigProvider.DoNotRenderEntitiesEnabled.SettingChanged += DoNotRenderEntitiesEnabledChanged;
|
||||
wnd.OnFree += () => { FactoryConfigProvider.DoNotRenderEntitiesEnabled.SettingChanged -= DoNotRenderEntitiesEnabledChanged; };
|
||||
DoNotRenderEntitiesEnabledChanged(null, null);
|
||||
|
||||
void DoNotRenderEntitiesEnabledChanged(object o, EventArgs e)
|
||||
{
|
||||
hideSortersCheckBox.SetEnable(FactoryConfigProvider.DoNotRenderEntitiesEnabled.Value);
|
||||
}
|
||||
}
|
||||
y += 36f;
|
||||
checkBoxForMeasureTextWidth = wnd.AddCheckBox(x, y, tab2, FactoryConfigProvider.ShortcutKeysForBlueprintCopyEnabled, I18NKeys.ShortcutKeysForBlueprintCopyMode);
|
||||
wnd.AddTipsButton2(x + checkBoxForMeasureTextWidth.Width + 5f, y + 6f, tab2, I18NKeys.ShortcutKeysForBlueprintCopyMode, I18NKeys.ShortcutKeysForBlueprintCopyModeTips, "shortcut-keys-for-blueprint-copy-mode-tips");
|
||||
|
||||
Reference in New Issue
Block a user