Пример #1
0
        public frmOptions()
        {
            InitializeComponent();

            Icon = App.ProgramIcon;

            tilesetsPathSetControl.Dock = DockStyle.Fill;
            objectDataPathSetControl.Dock = DockStyle.Fill;
            TableLayoutPanel1.Controls.Add(tilesetsPathSetControl, 0, 0);
            TableLayoutPanel1.Controls.Add(objectDataPathSetControl, 0, 1);

            ChangedKeyControls = (KeyboardProfile)(KeyboardManager.KeyboardProfile.GetCopy(new KeyboardProfileCreator()));

            txtAutosaveChanges.Text = SettingsManager.Settings.AutoSaveMinChanges.ToStringInvariant();
            txtAutosaveInterval.Text = SettingsManager.Settings.AutoSaveMinInterval_s.ToStringInvariant();
            cbxAutosaveCompression.Checked = SettingsManager.Settings.AutoSaveCompress;
            cbxAutosaveEnabled.Checked = SettingsManager.Settings.AutoSaveEnabled;
            cbxAskDirectories.Checked = SettingsManager.Settings.DirectoriesPrompt;
            cbxPointerDirect.Checked = SettingsManager.Settings.DirectPointer;
            DisplayFont = SettingsManager.Settings.MakeFont();
            UpdateDisplayFontLabel();
            txtFOV.Text = SettingsManager.Settings.FOVDefault.ToStringInvariant();

            MinimapCliffColour = new clsRGBA_sng(SettingsManager.Settings.MinimapCliffColour);
            clrMinimapCliffs = new ColourControl(MinimapCliffColour);
            pnlMinimapCliffColour.Controls.Add(clrMinimapCliffs);

            MinimapSelectedObjectColour = new clsRGBA_sng(SettingsManager.Settings.MinimapSelectedObjectsColour);
            clrMinimapSelectedObjects = new ColourControl(MinimapSelectedObjectColour);
            pnlMinimapSelectedObjectColour.Controls.Add(clrMinimapSelectedObjects);

            txtMinimapSize.Text = SettingsManager.Settings.MinimapSize.ToStringInvariant();
            cbxMinimapObjectColours.Checked = SettingsManager.Settings.MinimapTeamColours;
            cbxMinimapTeamColourFeatures.Checked = SettingsManager.Settings.MinimapTeamColoursExceptFeatures;
            cbxMipmaps.Checked = SettingsManager.Settings.Mipmaps;
            cbxMipmapsHardware.Checked = SettingsManager.Settings.MipmapsHardware;
            txtUndoSteps.Text = SettingsManager.Settings.UndoLimit.ToStringInvariant();

            tilesetsPathSetControl.SetPaths(SettingsManager.Settings.TilesetDirectories);
            objectDataPathSetControl.SetPaths(SettingsManager.Settings.ObjectDataDirectories);

            txtMapBPP.Text = SettingsManager.Settings.MapViewBPP.ToStringInvariant();
            txtMapDepth.Text = SettingsManager.Settings.MapViewDepth.ToStringInvariant();
            txtTexturesBPP.Text = SettingsManager.Settings.TextureViewBPP.ToStringInvariant();
            txtTexturesDepth.Text = SettingsManager.Settings.TextureViewDepth.ToStringInvariant();

            cbxPickerOrientation.Checked = SettingsManager.Settings.PickOrientation;

            UpdateKeyboardControls(-1);
        }
Пример #2
0
        public static void CreateControls()
        {
            //interface controls

            Deselect = KeyboardControlOptionCreate("ObjectSelectTool", new[] {Keys.Escape});
            PreviousTool = KeyboardControlOptionCreate("PreviousTool", new[] {Keys.Oemtilde});

            //selected unit controls

            UnitMove = KeyboardControlOptionCreate("MoveObjects", new[] {Keys.M});
            UnitDelete = KeyboardControlOptionCreate("DeleteObjects", new[] {Keys.Delete});
            UnitMultiselect = KeyboardControlOptionCreate("Multiselect", new[] {Keys.ShiftKey});

            //generalised controls

            Slow = KeyboardControlOptionCreate("ViewSlow", new[] {Keys.R});
            Fast = KeyboardControlOptionCreate("ViewFast", new[] {Keys.F});

            //picker controls

            Picker = KeyboardControlOptionCreate("Picker", new[] {Keys.ControlKey});

            //view controls

            ViewTextures = KeyboardControlOptionCreate("ShowTextures", new[] {Keys.F5});
            ViewLighting = KeyboardControlOptionCreate("ShowLighting", new[] {Keys.F8});
            ViewWireframe = KeyboardControlOptionCreate("ShowWireframe", new[] {Keys.F6});
            ViewUnits = KeyboardControlOptionCreate("ShowObjects", new[] {Keys.F7});
            ViewScriptMarkers = KeyboardControlOptionCreate("ShowLabels", new[] {Keys.F4});
            ViewMoveType = KeyboardControlOptionCreate("ViewMoveMode", new[] {Keys.F1});
            ViewRotateType = KeyboardControlOptionCreate("ViewRotateMode", new[] {Keys.F2});
            ViewMoveLeft = KeyboardControlOptionCreate("ViewMoveLeft", new[] {Keys.A});
            ViewMoveRight = KeyboardControlOptionCreate("ViewMoveRight", new[] {Keys.D});
            ViewMoveForward = KeyboardControlOptionCreate("ViewMoveForwards", new[] {Keys.W});
            ViewMoveBackward = KeyboardControlOptionCreate("ViewMoveBackwards", new[] {Keys.S});
            ViewMoveUp = KeyboardControlOptionCreate("ViewMoveUp", new[] {Keys.E});
            ViewMoveDown = KeyboardControlOptionCreate("ViewMoveDown", new[] {Keys.C});
            ViewZoomIn = KeyboardControlOptionCreate("ViewZoomIn", new[] {Keys.Home});
            ViewZoomOut = KeyboardControlOptionCreate("ViewZoomOut", new[] {Keys.End});
            ViewLeft = KeyboardControlOptionCreate("ViewRotateLeft", new[] {Keys.Left});
            ViewRight = KeyboardControlOptionCreate("ViewRotateRight", new[] {Keys.Right});
            ViewForward = KeyboardControlOptionCreate("ViewRotateForwards", new[] {Keys.Up});
            ViewBackward = KeyboardControlOptionCreate("ViewRotateBackwards", new[] {Keys.Down});
            ViewUp = KeyboardControlOptionCreate("ViewRotateUp", new[] {Keys.PageUp});
            ViewDown = KeyboardControlOptionCreate("ViewRotateDown", new[] {Keys.PageDown});
            ViewRollLeft = KeyboardControlOptionCreate("ViewRollLeft", new[] {Keys.OemOpenBrackets});
            ViewRollRight = KeyboardControlOptionCreate("ViewRollRight", new[] {Keys.OemCloseBrackets});
            ViewReset = KeyboardControlOptionCreate("ViewReset", new[] {Keys.Back});

            //texture controls

            CounterClockwise = KeyboardControlOptionCreate("CounterClockwise", new[] {Keys.Oemcomma});
            Clockwise = KeyboardControlOptionCreate("Clockwise", new[] {Keys.OemPeriod});
            TextureFlip = KeyboardControlOptionCreate("TextureFlip", new[] {Keys.OemQuestion});
            TriFlip = KeyboardControlOptionCreate("TriangleFlip", new[] {Keys.OemPipe}); //\|
            Gateway_Delete = KeyboardControlOptionCreate("GatewayDelete", new[] {Keys.ShiftKey});

            //undo controls

            Undo = KeyboardControlOptionCreate("Undo", new[] {Keys.ControlKey, Keys.Z});
            Redo = KeyboardControlOptionCreate("Redo", new[] {Keys.ControlKey, Keys.Y});
            ScriptPosition = KeyboardControlOptionCreate("PositionLabel", new[] {Keys.P});

            KeyboardProfile = new KeyboardProfile(OptionsKeyboardControls);
        }