public static void Setup(ref UIPanel page) { page.padding = Helper.Padding(8, 12); var pane = ToolHelper.AddConfig( ref page, "Tree movement", "Sets the amount of tree branch movement.\nVanilla: maximum; Recommended: minimum", opts: new SliderOption <float>( minValue: 0.0f, maxValue: 1.0f, stepSize: 0.1f, defaultValue: App.Config.Graphics.treeMoveFactor, (c, value) => { ToolHelper.LockedApply(App.Config.GraphicsLock, ref App.Config.Graphics.treeMoveFactor, value); } ) { hasField = false, }, labelPadding: 4, bullet: "InfoIconMaintenance" ); Helper.AddCheckBox( ref page, "Force stop distant trees (*)", "* restart required", initialValue: App.Config.Graphics.stopDistantTrees, (c, isChecked) => { lock (App.Config.GraphicsLock) { App.Config.Graphics.stopDistantTrees = isChecked; } }, font: FontStore.Get(11) ); Helper.AddCheckBox( ref page, "Random tree rotation", "Close range only (technical limitation for LOD)", initialValue: App.Config.Graphics.randomTrees, (c, isChecked) => { lock (App.Config.GraphicsLock) { App.Config.Graphics.randomTrees = isChecked; } }, font: FontStore.Get(11) ); }
public static void Setup(ref UIPanel page) { page.padding = Helper.Padding(6, 2); page.SetAutoLayout(LayoutDirection.Vertical, Helper.Padding(0, 0, 8, 0)); page.autoFitChildrenVertically = true; { var pane = page.AddUIComponent <UIPanel>(); pane.width = pane.parent.width - page.padding.horizontal; pane.padding = Helper.Padding(4, 12, 4, 0); pane.SetAutoLayout(LayoutDirection.Vertical, Helper.Padding(0, 0, 2, 0)); pane.autoFitChildrenVertically = true; Helper.AddLabel( ref pane, "Light & Shadow", font: FontStore.Get(12), color: Helper.RGB(220, 230, 250), bullet: "LineDetailButton" ); ToolHelper.AddConfig( ref pane, "Light intensity", "default: ≈4.2", opts: new SliderOption <float>( minValue: 0.05f, maxValue: 8.0f, stepSize: 0.05f, defaultValue: App.Config.Graphics.lightIntensity.Value, (c, value) => { ToolHelper.LockedApply(App.Config.GraphicsLock, ref App.Config.Graphics.lightIntensity, value); } ) { isEnabled = App.Config.Graphics.lightIntensity.Enabled, onSwitched = App.Config.Graphics.lightIntensity.LockedSwitch(App.Config.GraphicsLock), }, indentPadding: 12 ); ToolHelper.AddConfig( ref pane, "Shadow strength", "default: 0.8", opts: new SliderOption <float>( minValue: 0.1f, maxValue: 1.0f, stepSize: 0.05f, defaultValue: App.Config.Graphics.shadowStrength.Value, App.Config.Graphics.shadowStrength.LockedSlide(App.Config.GraphicsLock) ) { isEnabled = App.Config.Graphics.shadowStrength.Enabled, onSwitched = App.Config.Graphics.shadowStrength.LockedSwitch(App.Config.GraphicsLock), }, indentPadding: 12 ); ToolHelper.AddConfig( ref pane, "Self-shadow mitigation", "a.k.a. \"Shadow acne\" fix (default: minimal, recommended: 0.1-0.3)", opts: new SliderOption <float>( minValue: 0.01f, maxValue: 1.00f, stepSize: 0.01f, defaultValue: App.Config.Graphics.shadowBias.Value, App.Config.Graphics.shadowBias.LockedSlide(App.Config.GraphicsLock) ) { isEnabled = App.Config.Graphics.shadowBias.Enabled, onSwitched = App.Config.Graphics.shadowBias.LockedSwitch(App.Config.GraphicsLock), }, indentPadding: 12 ); } { var pane = page.AddUIComponent <UIPanel>(); pane.width = pane.parent.width - page.padding.horizontal; pane.padding = Helper.Padding(4, 12, 4, 0); pane.SetAutoLayout(LayoutDirection.Vertical, Helper.Padding(0, 0, 2, 0)); pane.autoFitChildrenVertically = true; Helper.AddLabel( ref pane, "Postprocessing", font: FontStore.Get(12), color: Helper.RGB(220, 230, 250), bullet: "LineDetailButton" ); Helper.AddCheckBox( ref pane, "SMAA", tooltip: null, initialValue: App.Config.Graphics.smaaEnabled, (c, isChecked) => { lock (App.Config.GraphicsLock) { App.Config.Graphics.smaaEnabled = isChecked; } }, font: FontStore.Get(11), indentPadding: 10 ); //var passes = ToolHelper.AddConfig( // ref pane, // "Passes", // $"default: {Mod.Config.GraphicsDefault.smaaPasses}", // opts: new SliderOption<float> { // hasField = true, // minValue = 0f, // maxValue = 8f, // stepSize = 1f, // eventValueChanged = (c, value) => { // ToolHelper.LockedApply(App.Config.GraphicsLock, ref App.Config.Graphics.smaaPasses, (int)Math.Floor(value)); // }, // }, // color: Helper.RGB(160, 160, 160), // bullet: false //); //lock (App.Config.GraphicsLock) { // passes.slider.value = App.Config.Graphics.smaaPasses; //} Helper.AddCheckBox( ref pane, "Film grain", tooltip: null, initialValue: App.Config.Graphics.filmGrainEnabled, (c, isChecked) => { lock (App.Config.GraphicsLock) { App.Config.Graphics.filmGrainEnabled = isChecked; } }, font: FontStore.Get(11), indentPadding: 10 ); ToolHelper.AddConfig( ref pane, "Scale", $"default: {Mod.Config.GraphicsDefault.filmGrainScale}", opts: new SliderOption <float>( minValue: 0.05f, maxValue: 1f, stepSize: 0.05f, defaultValue: App.Config.Graphics.filmGrainScale, (c, value) => { ToolHelper.LockedApply(App.Config.GraphicsLock, ref App.Config.Graphics.filmGrainScale, value); } ) { hasField = true, }, color: Helper.RGB(160, 160, 160) ); ToolHelper.AddConfig( ref pane, "Amount (scalar)", $"default: {Mod.Config.GraphicsDefault.filmGrainAmountScalar}", opts: new SliderOption <float>( minValue: 0.05f, maxValue: 1f, stepSize: 0.05f, defaultValue: App.Config.Graphics.filmGrainAmountScalar, (c, value) => { ToolHelper.LockedApply(App.Config.GraphicsLock, ref App.Config.Graphics.filmGrainAmountScalar, value); } ) { hasField = true, }, color: Helper.RGB(160, 160, 160) ); ToolHelper.AddConfig( ref pane, "Amount (factor)", $"default: {Mod.Config.GraphicsDefault.filmGrainAmountFactor}", opts: new SliderOption <float>( minValue: 0.01f, maxValue: 1f, stepSize: 0.01f, defaultValue: App.Config.Graphics.filmGrainAmountFactor, (c, value) => { ToolHelper.LockedApply(App.Config.GraphicsLock, ref App.Config.Graphics.filmGrainAmountFactor, value); } ) { hasField = true, }, color: Helper.RGB(160, 160, 160) ); ToolHelper.AddConfig( ref pane, "Middle range", $"default: {Mod.Config.GraphicsDefault.filmGrainMiddleRange}", opts: new SliderOption <float>( minValue: 0f, maxValue: 1f, stepSize: 0.02f, defaultValue: App.Config.Graphics.filmGrainMiddleRange, (c, value) => { ToolHelper.LockedApply(App.Config.GraphicsLock, ref App.Config.Graphics.filmGrainMiddleRange, value); } ) { hasField = true, }, color: Helper.RGB(160, 160, 160) ); } }
public static void Setup(ref UIPanel page) { page.padding = Helper.Padding(6, 2); page.SetAutoLayout(LayoutDirection.Vertical, Helper.Padding(0, 0, 8, 0)); page.autoFitChildrenVertically = true; { var pane = page.AddUIComponent <UIPanel>(); pane.width = page.width - page.padding.horizontal; pane.padding = Helper.Padding(4, 6); pane.SetAutoLayout(LayoutDirection.Vertical, Helper.Padding(0, 0, 2, 0)); pane.autoFitChildrenVertically = true; Helper.AddCheckBox( ref pane, "Bokeh Camera", tooltip: null, initialValue: App.Config.Graphics.dofEnabled, (c, isChecked) => { lock (App.Config.GraphicsLock) { App.Config.Graphics.dofEnabled = isChecked; } }, font: FontStore.Get(11) ); { var cb = Helper.AddCheckBox( ref pane, "DOF Analyzer", tooltip: null, initialValue: false, // always false for debugging purpose (c, isChecked) => { lock (App.Config.GraphicsLock) { App.Config.Graphics.dofDebug = isChecked; } }, font: FontStore.Get(11) ); cb.label.textColor = Helper.RGB(250, 40, 40); cb.color = Helper.RGBA(255, 255, 255, 80); } } { var pane = page.AddUIComponent <UIPanel>(); pane.width = page.width - page.padding.horizontal; pane.padding = Helper.Padding(4, 12, 4, 0); pane.SetAutoLayout(LayoutDirection.Vertical, Helper.Padding(0, 0, 2, 0)); pane.autoFitChildrenVertically = true; Helper.AddLabel( ref pane, "Focus & Perspective", font: FontStore.Get(12), color: Helper.RGB(220, 230, 250), bullet: "LineDetailButton" ); ToolHelper.AddConfig( ref pane, "Field of view", tooltip: null, opts: new SliderOption <float>( minValue: 20f, maxValue: 178f, stepSize: 1f, defaultValue: App.Config.Graphics.fieldOfView.Value, (c, value) => { ToolHelper.LockedApply(App.Config.GraphicsLock, ref App.Config.Graphics.fieldOfView, value); } ) { hasField = true, isEnabled = App.Config.Graphics.fieldOfView.Enabled, onSwitched = App.Config.Graphics.fieldOfView.LockedSwitch(App.Config.GraphicsLock), }, color: Helper.RGB(160, 160, 160), indentPadding: 10 ); ToolHelper.AddConfig( ref pane, "Aperture", $"default: {Mod.Config.GraphicsDefault.dofAperture}", opts: new SliderOption <float>( minValue: 0.08f, maxValue: 10f, stepSize: 0.01f, defaultValue: App.Config.Graphics.dofAperture, (c, value) => { ToolHelper.LockedApply(App.Config.GraphicsLock, ref App.Config.Graphics.dofAperture, value); } ) { hasField = true, }, color: Helper.RGB(160, 160, 160) ); ToolHelper.AddConfig( ref pane, "Focal distance", $"default: {Mod.Config.GraphicsDefault.dofFocalDistance}", opts: new SliderOption <float>( minValue: 0.01f, maxValue: 20f, stepSize: 0.01f, defaultValue: App.Config.Graphics.dofFocalDistance, (c, value) => { ToolHelper.LockedApply(App.Config.GraphicsLock, ref App.Config.Graphics.dofFocalDistance, value); } ) { hasField = true, }, color: Helper.RGB(160, 160, 160) ); ToolHelper.AddConfig( ref pane, "Focal range", $"default: {Mod.Config.GraphicsDefault.dofFocalRange}", opts: new SliderOption <float>( minValue: 0.5f, maxValue: 10f, stepSize: 0.02f, defaultValue: App.Config.Graphics.dofFocalRange, (c, value) => { ToolHelper.LockedApply(App.Config.GraphicsLock, ref App.Config.Graphics.dofFocalRange, value); } ) { hasField = true, }, color: Helper.RGB(160, 160, 160) ); ToolHelper.AddConfig( ref pane, "Max blur size", $"default: {Mod.Config.GraphicsDefault.dofMaxBlurSize}", opts: new SliderOption <float>( minValue: 0f, maxValue: 6f, stepSize: 0.02f, defaultValue: App.Config.Graphics.dofMaxBlurSize, (c, value) => { ToolHelper.LockedApply(App.Config.GraphicsLock, ref App.Config.Graphics.dofMaxBlurSize, value); } ) { hasField = true, }, color: Helper.RGB(160, 160, 160) ); } // DX11 --------------------------------------- { var pane = page.AddUIComponent <UIPanel>(); pane.width = page.width - page.padding.horizontal; pane.padding = Helper.Padding(4, 12, 4, 0); pane.SetAutoLayout(LayoutDirection.Vertical, Helper.Padding(0, 0, 2, 0)); pane.autoFitChildrenVertically = true; Helper.AddLabel( ref pane, "Bokeh", font: FontStore.Get(12), color: Helper.RGB(220, 230, 250), bullet: "PieChartWhiteFg" ); ToolHelper.AddConfig( ref pane, "Scale", $"default: {Mod.Config.GraphicsDefault.dofBokehScale}", opts: new SliderOption <float>( minValue: 0.1f, maxValue: 50f, stepSize: 0.02f, defaultValue: App.Config.Graphics.dofBokehScale, (c, value) => { ToolHelper.LockedApply(App.Config.GraphicsLock, ref App.Config.Graphics.dofBokehScale, value); } ) { hasField = true, }, color: Helper.RGB(160, 160, 160) ); ToolHelper.AddConfig( ref pane, "Intensity", $"default: {Mod.Config.GraphicsDefault.dofBokehIntensity}", opts: new SliderOption <float>( minValue: 0.1f, maxValue: 50f, stepSize: 0.05f, defaultValue: App.Config.Graphics.dofBokehIntensity, (c, value) => { ToolHelper.LockedApply(App.Config.GraphicsLock, ref App.Config.Graphics.dofBokehIntensity, value); } ) { hasField = true, }, color: Helper.RGB(160, 160, 160) ); ToolHelper.AddConfig( ref pane, "Min luminance thres.", $"default: {Mod.Config.GraphicsDefault.dofBokehMinLuminanceThreshold}", opts: new SliderOption <float>( minValue: 0.25f, maxValue: 6f, stepSize: 0.05f, defaultValue: App.Config.Graphics.dofBokehMinLuminanceThreshold, (c, value) => { ToolHelper.LockedApply(App.Config.GraphicsLock, ref App.Config.Graphics.dofBokehMinLuminanceThreshold, value); } ) { hasField = true, }, color: Helper.RGB(160, 160, 160) ); ToolHelper.AddConfig( ref pane, "Spawn frequency thres.", $"default: {Mod.Config.GraphicsDefault.dofBokehSpawnHeuristic}", opts: new SliderOption <float>( minValue: 0.5f, maxValue: 6f, stepSize: 0.1f, defaultValue: App.Config.Graphics.dofBokehSpawnHeuristic, (c, value) => { ToolHelper.LockedApply(App.Config.GraphicsLock, ref App.Config.Graphics.dofBokehSpawnHeuristic, value); } ) { hasField = true, }, color: Helper.RGB(160, 160, 160) ); } { var pane = page.AddUIComponent <UIPanel>(); pane.width = page.width - page.padding.horizontal; pane.padding = Helper.Padding(4, 12, 4, 0); pane.SetAutoLayout(LayoutDirection.Vertical, Helper.Padding(0, 0, 2, 0)); pane.autoFitChildrenVertically = true; Helper.AddLabel( ref pane, "Foreground", font: FontStore.Get(12), color: Helper.RGB(220, 230, 250), bullet: "ToolbarIconPropsPressed" ); Helper.AddCheckBox( ref pane, "Near blur", tooltip: null, initialValue: App.Config.Graphics.dofNearBlur, (c, isChecked) => { lock (App.Config.GraphicsLock) { App.Config.Graphics.dofNearBlur = isChecked; } }, font: FontStore.Get(11), indentPadding: 10 ); ToolHelper.AddConfig( ref pane, "Overlap amount", tooltip: null, opts: new SliderOption <float>( minValue: 0f, maxValue: 30f, stepSize: 0.02f, defaultValue: App.Config.Graphics.dofFGOverlap, (c, value) => { ToolHelper.LockedApply(App.Config.GraphicsLock, ref App.Config.Graphics.dofFGOverlap, value); } ) { hasField = true, }, color: Helper.RGB(160, 160, 160) ); Helper.AddCheckBox( ref pane, "Tilt shift", tooltip: null, initialValue: App.Config.Graphics.tiltShiftEnabled, (c, isChecked) => { lock (App.Config.GraphicsLock) { App.Config.Graphics.tiltShiftEnabled = isChecked; } }, font: FontStore.Get(11), indentPadding: 10 ); Helper.AddDropDown( ref pane, "Type", new[] { "Vertical", "Radial", }, initialValue: App.Config.Graphics.tiltShiftMode == TiltShiftEffect.TiltShiftMode.TiltShiftMode ? "Vertical" : "Radial", (c, i) => { var mode = TiltShiftEffect.TiltShiftMode.TiltShiftMode; switch ((c as UIDropDown).selectedValue) { case "Vertical": mode = TiltShiftEffect.TiltShiftMode.TiltShiftMode; break; case "Radial": mode = TiltShiftEffect.TiltShiftMode.IrisMode; break; } lock (App.Config.GraphicsLock) { App.Config.Graphics.tiltShiftMode = mode; } } ); ToolHelper.AddConfig( ref pane, "Max blur size", null, opts: new SliderOption <float>( minValue: 0.02f, maxValue: 12f, stepSize: 0.01f, defaultValue: App.Config.Graphics.tiltShiftMaxBlurSize, (c, value) => { ToolHelper.LockedApply(App.Config.GraphicsLock, ref App.Config.Graphics.tiltShiftMaxBlurSize, value); } ) { hasField = true, }, color: Helper.RGB(160, 160, 160) ); ToolHelper.AddConfig( ref pane, "Area size", null, opts: new SliderOption <float>( minValue: 0.12f, maxValue: 30f, stepSize: 0.01f, defaultValue: App.Config.Graphics.tiltShiftAreaSize, (c, value) => { ToolHelper.LockedApply(App.Config.GraphicsLock, ref App.Config.Graphics.tiltShiftAreaSize, value); } ) { hasField = true, }, color: Helper.RGB(160, 160, 160) ); } }
public static void Setup(ref UIPanel page) { page.padding = Helper.Padding(6, 2); page.SetAutoLayout(LayoutDirection.Vertical, Helper.Padding(0, 0, 8, 0)); page.autoFitChildrenVertically = true; // info panel var citizenInfo = page.AddUIComponent <CitizenInfo>(); citizenInfo.padding = Helper.Padding(0, 10, 4, 10); var panel = page.AddUIComponent <UIPanel>(); panel.width = panel.parent.width - page.padding.horizontal - 10; panel.SetAutoLayout(LayoutDirection.Vertical); var pane = ToolHelper.AddConfig( ref panel, "Health literacy", "Let citizens stay at their home in hope of recovery, instead of calling 911.\n Requires decent healthcare system in city.", opts: new SliderOption <float>( minValue: 0.2f, maxValue: 0.95f, stepSize: 0.05f, defaultValue: App.Config.AI.regenChance.Value, (c, value) => { ToolHelper.LockedApply(App.Config.AILock, ref App.Config.AI.regenChance, value); } ) { hasField = false, isEnabled = App.Config.AI.regenChance.Enabled, onSwitched = App.Config.AI.regenChance.LockedSwitch(App.Config.AILock), }, labelPadding: 4, indentPadding: 12 ); var tipPanel = panel.AddUIComponent <UIPanel>(); tipPanel.SetAutoLayout(LayoutDirection.Horizontal); tipPanel.relativePosition = Vector2.zero; tipPanel.padding = Helper.Padding(0, 0, 0, 8); tipPanel.width = tipPanel.parent.width - (tipPanel.padding.horizontal + panel.padding.horizontal); Helper.AddIconLabel( ref tipPanel, "ambulance", "Call 911", wrapperWidth: tipPanel.width / 2, font: FontStore.Get(10), color: Helper.RGB(160, 160, 160) ); Helper.AddIconLabel( ref tipPanel, "housing", "Stay in bed", wrapperWidth: tipPanel.width / 2, font: FontStore.Get(10), color: Helper.RGB(160, 160, 160), isInverted: true ); }
public static void Setup(Window win, ref UIPanel page) { page.padding = Helper.Padding(6, 2); page.SetAutoLayout(LayoutDirection.Vertical, Helper.Padding(0, 0, 8, 0)); page.autoFitChildrenVertically = true; assetSelector_ = new AssetSelectorConfig(UIView.Find <UITabContainer>("TSContainer")); lock (App.Config.UILock) { assetSelector_.Enabled = App.Config.UI.assetSelectorEnabled; } thmBar_ = UIView.Find <UISlicedSprite>("ThumbnailBar"); tsBar_ = UIView.Find("TSBar"); infoPanel_ = UIView.Find("InfoPanel"); { var pane = page.AddUIComponent <UIPanel>(); pane.width = page.width - page.padding.horizontal; pane.padding = Helper.Padding(4, 12, 4, 0); pane.SetAutoLayout(LayoutDirection.Vertical, Helper.Padding(0, 0, 2, 0)); pane.autoFitChildrenVertically = true; Helper.AddLabel( ref pane, "Crafting UI", font: FontStore.Get(12), color: Helper.RGB(220, 230, 250), bullet: "IconPolicyBigBusiness" ); // debug only //UIView.Show(true); Helper.AddCheckBox( ref pane, "Master toolbar", tooltip: null, // always reset to visible at game init initialValue: true && infoPanel_.isVisible, (c, isEnabled) => { lock (App.Config.UILock) { App.Config.UI.masterToolbarVisibility = isEnabled; //var gamePanels = UIView.library.m_DynamicPanels // .Select((p) => p.instance.GetRootCustomControl()) // .Distinct() // .Where(p => // Game.Application.GamePanels.Any(name => name == p.name) // ) //; if (isEnabled) { thmBar_.Show(); tsBar_.Show(); infoPanel_.Show(); //UIView.Show(true); } else { thmBar_.Hide(); tsBar_.Hide(); infoPanel_.Hide(); //UIView.Show(false); } } }, font: FontStore.Get(11), indentPadding: 10 ); ToolHelper.AddConfig( ref pane, "Master toolbar opacity", $"default: {Mod.Config.UIDefault.masterOpacity}", opts: new SliderOption <float>( minValue: 0.05f, maxValue: 1f, stepSize: 0.05f, defaultValue: App.Config.UI.masterOpacity, (c, value) => { ToolHelper.LockedApply(App.Config.UILock, ref App.Config.UI.masterOpacity, value); SetMasterOpacity(value); } ) { hasField = false, }, color: Helper.RGB(160, 160, 160) ); ToolHelper.AddConfig( ref pane, $"{Mod.ModInfo.ID} opacity", $"default: {Mod.Config.UIDefault.supportToolOpacity}", opts: new SliderOption <float>( minValue: 0.05f, maxValue: 1f, stepSize: 0.05f, defaultValue: App.Config.UI.supportToolOpacity, (c, value) => { ToolHelper.LockedApply(App.Config.UILock, ref App.Config.UI.supportToolOpacity, value); win.opacity = value; } ) { hasField = false, }, color: Helper.RGB(160, 160, 160) ); Helper.AddCheckBox( ref pane, "Prop marker", tooltip: null, initialValue: App.Config.UI.propMarkersVisibility, (c, isChecked) => { lock (App.Config.UILock) { Cities::PropManager.instance.MarkersVisible = App.Config.UI.propMarkersVisibility = isChecked; } }, font: FontStore.Get(11), indentPadding: 10 ); } { var pane = page.AddUIComponent <UIPanel>(); pane.width = page.width - page.padding.horizontal; pane.padding = Helper.Padding(4, 12, 4, 0); pane.SetAutoLayout(LayoutDirection.Vertical, Helper.Padding(0, 0, 2, 0)); pane.autoFitChildrenVertically = true; Helper.AddLabel( ref pane, "Asset Selector EX", font: FontStore.Get(12), color: Helper.RGB(220, 230, 250), bullet: "IconPolicyBigBusiness" ); Helper.AddCheckBox( ref pane, "Enable", tooltip: null, initialValue: assetSelector_.Enabled, (c, isChecked) => { assetSelector_.Enabled = isChecked; }, font: FontStore.Get(11), indentPadding: 10 ); //Helper.AddCheckBox( // ref pane, // "Sync `Find It!`", // tooltip: "Auto-adjust size & position for the mod `Find It!` (837734529) by SamsamTS", // initialValue: assetSelector_.SyncFindIt, // (c, isChecked) => { assetSelector_.SyncFindIt = isChecked; }, // font: FontStore.Get(11), // indentPadding: 10 //); Helper.AddDropDown( ref pane, "Scroll direction", new[] { "Horizontal", "Vertical", }, initialValue: App.Config.UI.assetSelectorScrollDirection == UIOrientation.Horizontal ? "Horizontal" : "Vertical", (c, i) => { switch ((c as UIDropDown).selectedValue) { case "Horizontal": assetSelector_.ScrollDirection = UIOrientation.Horizontal; break; case "Vertical": assetSelector_.ScrollDirection = UIOrientation.Vertical; break; } } ); ToolHelper.AddConfig( ref pane, "X offset", "Relative X offset from screen left", opts: new SliderOption <float>( minValue: 0.00f, maxValue: 1.00f, stepSize: 0.005f, defaultValue: assetSelector_.X, (c, value) => { assetSelector_.X = value; } ) { hasField = false, }, color: Helper.RGB(160, 160, 160) ); ToolHelper.AddConfig( ref pane, "Y offset", "Relative Y offset from screen top", opts: new SliderOption <float>( minValue: 0.00f, maxValue: 1.00f, stepSize: 0.005f, defaultValue: assetSelector_.Y, (c, value) => { assetSelector_.Y = value; } ) { hasField = false, }, color: Helper.RGB(160, 160, 160) ); ToolHelper.AddConfig( ref pane, "Width", "Relative % for screen width", opts: new SliderOption <float>( minValue: 0.20f, maxValue: 1.00f, stepSize: 0.005f, defaultValue: assetSelector_.Width, (c, value) => { assetSelector_.Width = value; } ) { hasField = false, }, color: Helper.RGB(160, 160, 160) ); ToolHelper.AddConfig( ref pane, "Height", "Relative % for screen height", opts: new SliderOption <float>( minValue: 0.10f, maxValue: 0.88f, stepSize: 0.005f, defaultValue: assetSelector_.Height, (c, value) => { assetSelector_.Height = value; } ) { hasField = false, }, color: Helper.RGB(160, 160, 160) ); } { var pane = page.AddUIComponent <UIPanel>(); pane.width = page.width - page.padding.horizontal; pane.padding = Helper.Padding(4, 12, 4, 0); pane.SetAutoLayout(LayoutDirection.Vertical, Helper.Padding(0, 0, 2, 0)); pane.autoFitChildrenVertically = true; Helper.AddLabel( ref pane, "City view", font: FontStore.Get(12), color: Helper.RGB(220, 230, 250), bullet: "ToolbarIconZoomOutGlobe" ); Helper.AddCheckBox( ref pane, "District name", tooltip: null, initialValue: App.Config.UI.districtNamesVisibility, (c, isChecked) => { lock (App.Config.UILock) { DistrictManager.instance.NamesVisible = App.Config.UI.districtNamesVisibility = isChecked; } }, font: FontStore.Get(11), indentPadding: 10 ); Helper.AddCheckBox( ref pane, "Road name", tooltip: null, initialValue: App.Config.UI.roadNameVisibility, (c, isChecked) => { lock (App.Config.UILock) { NetManager.instance.RoadNamesVisible = App.Config.UI.roadNameVisibility = isChecked; } }, font: FontStore.Get(11), indentPadding: 10 ); Helper.AddCheckBox( ref pane, "City border", tooltip: null, initialValue: App.Config.UI.areaBordersVisiblity, (c, isChecked) => { lock (App.Config.UILock) { GameAreaManager.instance.BordersVisible = App.Config.UI.areaBordersVisiblity = isChecked; } }, font: FontStore.Get(11), indentPadding: 10 ); } { var pane = page.AddUIComponent <UIPanel>(); pane.width = page.width - page.padding.horizontal; pane.padding = Helper.Padding(4, 12, 4, 0); pane.SetAutoLayout(LayoutDirection.Vertical, Helper.Padding(0, 0, 2, 0)); pane.autoFitChildrenVertically = true; Helper.AddLabel( ref pane, "Game system interface", font: FontStore.Get(12), color: Helper.RGB(220, 230, 250), bullet: "InfoIconMaintenance" ); Helper.AddCheckBox( ref pane, "Notifications", tooltip: null, initialValue: App.Config.UI.notificationsVisibility, (c, isChecked) => { lock (App.Config.UILock) { NotificationManager.instance.NotificationsVisible = App.Config.UI.notificationsVisibility = isChecked; // speed up easing animation if (!NotificationManager.instance.NotificationsVisible) { var m_notificationAlpha = typeof(NotificationManager).GetField("m_notificationAlpha", BindingFlags.NonPublic | BindingFlags.Instance); m_notificationAlpha.SetValue(NotificationManager.instance, NotificationManager.instance.NotificationsVisible ? 1f : 0f); } } }, font: FontStore.Get(11), indentPadding: 10 ); Helper.AddCheckBox( ref pane, "Tutorial", tooltip: null, initialValue: !App.Config.UI.tutorialDisabled, (c, isChecked) => { lock (App.Config.UILock) { GuideManager.instance.TutorialDisabled = App.Config.UI.tutorialDisabled = !isChecked; } }, font: FontStore.Get(11), indentPadding: 10 ); Helper.AddCheckBox( ref pane, "Disaster", tooltip: null, initialValue: App.Config.UI.disasterVisibility, (c, isChecked) => { lock (App.Config.UILock) { DisasterManager.instance.MarkersVisible = App.Config.UI.disasterVisibility = isChecked; } }, font: FontStore.Get(11), indentPadding: 10 ); } }