/// <summary>
        /// Initializes a new instance of the <see cref="GridMappingRecentPrefabsSettingsMenuItem"/> class.
        /// </summary>
        public static void Draw()
        {
            var local = LocalizationManager.Instance;

            SettingHelpers.DrawSettingsCheckBox(GlobalConstants.RecentInspectorPrefabListEnabledKey, local.Get("SETT_EnableRecentPrefabsInInspector"), true, Helpers.RedrawInspector);
            SettingHelpers.DrawSettingsCheckBox(GlobalConstants.ShowRecentPrefabRemoveButtonsKey, local.Get("SETT_ShowRemoveButtons"), true, Helpers.RedrawInspector);
            SettingHelpers.DrawSettingsCheckBox(GlobalConstants.ShowRecentPrefabsAsButtonsKey, local.Get("SETT_ShowAsButtons"), false, Helpers.RedrawInspector);
            SettingHelpers.DrawSettingsCheckBox(GlobalConstants.ShowAddPrefabButtonsKey, local.Get("SETT_ShowAddPrefabButton"), true, Helpers.RedrawInspector);
            SettingHelpers.DrawSettingsCheckBox(GlobalConstants.ShowRecentPrefabsSelectButtonsKey, local.Get("SETT_ShowSelectButton"), true, Helpers.RedrawInspector);

            SettingHelpers.DrawSettingsIntField(GlobalConstants.MaxNumberOfRecentPrefabsKey, local.Get("SETT_MaxNumberOfItems"), 100, 1, int.MaxValue, Helpers.RedrawInspector);
            SettingHelpers.DrawSettingsIntField(GlobalConstants.MaxHeightOfRecentPrefabsKey, local.Get("SETT_MaxControlHeight"), 64, 1, int.MaxValue, Helpers.RedrawInspector);
            SettingHelpers.DrawSettingsIntField(GlobalConstants.RecentPrefabButtonSizeKey, local.Get("SETT_ButtonSize"), 32, 1, int.MaxValue, Helpers.RedrawInspector);

            SettingHelpers.DrawSettingsCheckBox(GlobalConstants.ShowRecentPrefabAsListKey, local.Get("SETT_ShowAsList"), true, Helpers.RedrawInspector);
            SettingHelpers.DrawSettingsIntField(GlobalConstants.RecentPrefabButtonColumnsKey, local.Get("SETT_ButtonsPerRow"), 5, 1, int.MaxValue, Helpers.RedrawInspector);
            SettingHelpers.DrawSettingsCheckBox(GlobalConstants.ShowRecentPrefabAssetPreviewsKey, local.Get("SETT_ShowAssetPreview"), true, Helpers.RedrawInspector);
        }
        /// <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);
            }
        }
Beispiel #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Map2DGeneralSettingsMenuItem"/> class.
        /// </summary>
        public static void Draw()
        {
            var local = LocalizationManager.Instance;

            SettingHelpers.DrawSettingsCheckBox(GlobalConstants.Map2DShowCheckerboardBackground, local.Get("SETT_Map2DShowCheckerboardBackground"), false);
        }