/// <summary> /// Initializes a new instance of the <see cref="GridMappingSceneViewSettingsMenuItem"/> class. /// </summary> public static void Draw() { var local = LocalizationManager.Instance; var items = new[] { local.Get("SETT_DontShowMouseCoordinates"), local.Get("SETT_ShowMouseCoordinatesUnderPointer"), local.Get("SETT_ShowMouseCoordinatesAbovePointer"), local.Get("SETT_ShowMouseCoordinatesTopLeft"), local.Get("SETT_ShowMouseCoordinatesTopRight"), local.Get("SETT_ShowMouseCoordinatesBottomLeft"), local.Get("SETT_ShowMouseCoordinatesBottomRight") }; SettingHelpers.DrawSettingsPopup(GlobalConstants.MouseCoordinatesKey, local.Get("SETT_MouseCoordinatesStyle"), items, 0, Helpers.RedrawInspector); // SettingHelpers.DrawSettingsBoolField(GlobalConstants.MouseCoordinatesActiveSceneViewOnlyKey, local.Get("SETT_MouseCoordinatesStyle"), items, 0, Helpers.RedrawInspector); }
/// <summary> /// Initializes a new instance of the <see cref="GridMappingAutomaticMaterialCreationSettingsMenuItem"/> class. /// </summary> public static void Draw() { if (folderControl == null) { folderControl = new SelectOutputFolderControl(); folderControl.SetOutputPath(PlayerPrefs.GetString(GlobalConstants.AutoMaterialCreationFolderKey, string.Empty)); folderControl.OutputPathChanged += (sender, e) => PlayerPrefs.SetString(GlobalConstants.AutoMaterialCreationFolderKey, folderControl.OutputPath); } folderControl.Draw(); var local = LocalizationManager.Instance; SettingHelpers.DrawSettingsColorPicker(GlobalConstants.DefaultAutoMaterialCreationColorKey, local.Get("SETT_DefaultTileMaterialCreationColor"), Color.white); SettingHelpers.DrawSettingsIntField(GlobalConstants.AutoMaterialCreationDefaultWidthKey, local.Get("SETT_TileMaterialCreationDefaultTileWidth"), 32); SettingHelpers.DrawSettingsIntField(GlobalConstants.AutoMaterialCreationDefaultHeightKey, local.Get("SETT_TileMaterialCreationDefaultTileHeight"), 32); var items = new[] { local.Get("Hierarchy"), local.Get("Flat") }; SettingHelpers.DrawSettingsPopup(GlobalConstants.AutoMaterialCreationShaderListStyleKey, local.Get("SETT_HierarchicalMaterialCreationShaderList"), items, 0); GUILayout.Label(local.Get("Shaders")); SettingHelpers.DrawSettingsTextBox(GlobalConstants.AutoMaterialCreationShadersKey, "Diffuse\r\nTransparent/Diffuse\r\nTransparent/Cutout/Diffuse\r\nTransparent/Cutout/Soft Edge Unlit"); }
/// <summary> /// Initializes a new instance of the <see cref="GridMappingLayersSettingsMenuItem"/> class. /// </summary> public static void Draw() { var local = LocalizationManager.Instance; SettingHelpers.DrawSettingsCheckBox(GlobalConstants.ShowLayersInInspectorKey, local.Get("SETT_ShowLayersInInspector"), true, Helpers.RedrawInspector); var items = new[] { local.Get("SETT_OldLayerCountStyle"), local.Get("SETT_Version2LayerCountStyle"), local.Get("SETT_Version2SimpleStyle") }; SettingHelpers.DrawSettingsPopup(GlobalConstants.LayerCountStyleKey, local.Get("SETT_LayerCountStyle"), items, 1, Helpers.RedrawInspector); SettingHelpers.DrawSettingsCheckBox(GlobalConstants.LayerCountFieldDisabledKey, local.Get("SETT_DisablelayerCountField"), false, Helpers.RedrawInspector); SettingHelpers.DrawSettingsCheckBox(GlobalConstants.ScrollLayersKey, local.Get("SETT_ScrollLayers"), true, Helpers.RedrawInspector); SettingHelpers.DrawSettingsIntField(GlobalConstants.LayerListHeightKey, local.Get("SETT_LayerListHeight"), 96, 16, 4096, Helpers.RedrawInspector); items = new[] { local.Get("SETT_OldLayerStyle"), local.Get("SETT_Version2LayerStyle") }; SettingHelpers.DrawSettingsPopup(GlobalConstants.LayerListStyleKey, local.Get("SETT_LayerListStyle"), items, 1, Helpers.RedrawInspector); SettingHelpers.DrawSettingsCheckBox(GlobalConstants.ShowLayerLocksKey, local.Get("SETT_ShowLayerLock"), true, Helpers.RedrawInspector); SettingHelpers.DrawSettingsCheckBox(GlobalConstants.ShowLayerVisibilityKey, local.Get("SETT_ShowLayerVisibility"), true, Helpers.RedrawInspector); SettingHelpers.DrawSettingsCheckBox(GlobalConstants.ShowActiveLayerKey, local.Get("SETT_ShowActiveLayer"), true, Helpers.RedrawInspector); SettingHelpers.DrawSettingsCheckBox(GlobalConstants.ShowDeleteLayerButtonKey, local.Get("SETT_ShowDeleteLayerButtons"), true, Helpers.RedrawInspector); SettingHelpers.DrawSettingsCheckBox(GlobalConstants.ShowMoveLayerButtonsKey, local.Get("SETT_ShowMoveLayerButtons"), true, Helpers.RedrawInspector); SettingHelpers.DrawSettingsIntField(GlobalConstants.LayerIconSizeKey, local.Get("SETT_LayerIconSize"), 16, 8, 256, Helpers.RedrawInspector); SettingHelpers.DrawSettingsCheckBox(GlobalConstants.PromptToDeleteLayerKey, local.Get("SETT_PromptToDeleteLayer"), true); }
/// <summary> /// Initializes a new instance of the <see cref="GridMappingGeneralSettingsMenuItem"/> class. /// </summary> public static void Draw() { var local = LocalizationManager.Instance; var items = new[] { local.Get("SETT_ShowMapInfoOldStyle"), local.Get("SETT_ShowMapInfoVer2Style") }; var drawingHelperItems = new[] { local.Get("SETT_AsCheckBox"), local.Get("SETT_AsButtons") }; SettingHelpers.DrawSettingsPopup(GlobalConstants.MapInfoStyleKey, local.Get("SETT_MapInfoStyle"), items, 1, Helpers.RedrawInspector); SettingHelpers.DrawSettingsCheckBox(GlobalConstants.ShowMapInfoFoldoutKey, local.Get("SETT_ShowMapInfoAsFoldout"), true, Helpers.RedrawInspector); SettingHelpers.DrawSettingsCheckBox(GlobalConstants.ShowInspectorToolsKey, local.Get("SETT_ShowInspectorTools"), true, Helpers.RedrawInspector); SettingHelpers.DrawSettingsPopup(GlobalConstants.DrawingHelperStyleKey, local.Get("SETT_DrawingHelperStyle"), drawingHelperItems, 0, Helpers.RedrawInspector); SettingHelpers.DrawSettingsCheckBox(GlobalConstants.AutoScalePrefabKey, local.Get("SETT_AutoScalePrefabs"), true, Helpers.RedrawInspector); SettingHelpers.DrawSettingsCheckBox(GlobalConstants.AutoCenterPrefabKey, local.Get("SETT_AutoCenterPrefabs"), true, Helpers.RedrawInspector); SettingHelpers.DrawSettingsCheckBox(GlobalConstants.ShowGridLinesKey, local.Get("SETT_ShowGrid"), true, Helpers.RedrawInspector); SettingHelpers.DrawSettingsCheckBox(GlobalConstants.ShowGuidelinesKey, local.Get("SETT_ShowGuidelines"), false, Helpers.RedrawInspector); SettingHelpers.DrawSettingsCheckBox(GlobalConstants.ShowMarkerKey, local.Get("SETT_ShowMarker"), true, Helpers.RedrawInspector); SettingHelpers.DrawSettingsFloatField(GlobalConstants.MarkerScaleKey, local.Get("SETT_MarkerScale"), 1.025f, 0.01f, 10); SettingHelpers.DrawSettingsFloatField(GlobalConstants.DefaultCellWidthKey, local.Get("SETT_DefaultCellWidth"), 1, 0.01f, 100); SettingHelpers.DrawSettingsFloatField(GlobalConstants.DefaultCellHeightKey, local.Get("SETT_DefaultCellHeight"), 1, 0.01f, 100); SettingHelpers.DrawSettingsIntField(GlobalConstants.DefaultColumnCountKey, local.Get("SETT_DefaultMapColumns"), 20, 1, 1000, Helpers.RedrawInspector); SettingHelpers.DrawSettingsIntField(GlobalConstants.DefaultRowCountKey, local.Get("SETT_DefaultMapRows"), 10, 1, 1000, Helpers.RedrawInspector); SettingHelpers.DrawSettingsFloatField(GlobalConstants.DefaultLayerDepthKey, local.Get("SETT_DefaultLayerDepth"), 1, 0, 1000, Helpers.RedrawInspector); SettingHelpers.DrawSettingsCheckBox(GlobalConstants.ShowPrefabsInHierarchyKey, local.Get("SETT_ShowPrefabsInHierarchy"), true, Helpers.RedrawInspector); SettingHelpers.DrawSettingsTextField(GlobalConstants.DefaultMapNameKey, local.Get("SETT_DefaultMapName"), local.Get("Map"), Helpers.RedrawInspector); SettingHelpers.DrawSettingsCheckBox(GlobalConstants.HoldShiftToDrawKey, local.Get("SETT_HoldShiftToDraw"), false); SettingHelpers.DrawSettingsCheckBox(GlobalConstants.HoldShiftToEraseKey, local.Get("SETT_HoldShiftToErase"), false); SettingHelpers.DrawSettingsCheckBox(GlobalConstants.HoldAltToDrawKey, local.Get("SETT_HoldAltToDraw"), false); SettingHelpers.DrawSettingsCheckBox(GlobalConstants.HoldAltToEraseKey, local.Get("SETT_HoldAltToErase"), false); SettingHelpers.DrawSettingsCheckBox(GlobalConstants.HoldControlToDrawKey, local.Get("SETT_HoldControlToDraw"), false); SettingHelpers.DrawSettingsCheckBox(GlobalConstants.HoldControlToEraseKey, local.Get("SETT_HoldControlToErase"), false); SettingHelpers.DrawSettingsCheckBox(GlobalConstants.MouseWheelChangesLayersKey, local.Get("SETT_MouseWheelChangesLayers"), false, Helpers.RedrawInspector); SettingHelpers.DrawSettingsCheckBox(GlobalConstants.HoldShiftToChangeLayersKey, local.Get("SETT_HoldShiftToChangeLayers"), true, Helpers.RedrawInspector); SettingHelpers.DrawSettingsCheckBox(GlobalConstants.HoldAltToChangeLayersKey, local.Get("SETT_HoldAltToChangeLayers"), false, Helpers.RedrawInspector); SettingHelpers.DrawSettingsCheckBox(GlobalConstants.HoldControlToChangeLayersKey, local.Get("SETT_HoldControlToChangeLayers"), false, Helpers.RedrawInspector); SettingHelpers.DrawSettingsCheckBox(GlobalConstants.RestoreLastDrawingToolKey, local.Get("SETT_RestoreLastDrawingTool"), false, Helpers.RedrawInspector); // rotation display setting var settings = SettingsManager.Instance; var rotationItems = new[] { local.Get("Hide"), local.Get("SETT_AsButtons"), local.Get("SETT_AsRotationWindow") }; SettingHelpers.DrawSettingsPopup(GlobalConstants.RotationStyleKey, local.Get("SETT_RotationStyle"), rotationItems, 1, () => { var value = settings.GetSetting(GlobalConstants.RotationStyleKey, 1); if (value != 2) { UnityEditor.EditorWindow.GetWindow <RotationsWindow>().Close(); } Helpers.RedrawInspector(); }); // rotation window orientation setting var rotationStyle = settings.GetSetting(GlobalConstants.RotationStyleKey, 1); if (rotationStyle == 2) { SettingHelpers.DrawSettingsCheckBox(GlobalConstants.RotationWindowOrientationKey, local.Get("SETT_RotationWindowOrientation"), true, null); } }