Added Preferences -> Editing -> "Switch view modes when switching to the same Classic Mode" option (disabled by default). When enabled, view mode will be switched between "view floor textures" and "view ceiling textures" when activating the same 2D mode repeatedly.

This commit is contained in:
MaxED 2016-06-06 21:06:01 +00:00 committed by spherallic
parent 8943dbc82e
commit 281d12ece4
6 changed files with 89 additions and 76 deletions

View file

@ -93,6 +93,7 @@ namespace CodeImp.DoomBuilder.Config
private SplitLineBehavior splitlinebehavior; //mxd
private MergeGeometryMode mergegeomode; //mxd
private bool usehighlight; //mxd
private bool switchviewmodes; //mxd
//mxd. Script editor settings
private string scriptfontname;
@ -229,6 +230,8 @@ namespace CodeImp.DoomBuilder.Config
}
}
public bool SwitchViewModes { get { return switchviewmodes; } set { switchviewmodes = value; } } //mxd
//mxd. Script editor settings
public string ScriptFontName { get { return scriptfontname; } internal set { scriptfontname = value; } }
public int ScriptFontSize { get { return scriptfontsize; } internal set { scriptfontsize = value; } }
@ -374,6 +377,7 @@ namespace CodeImp.DoomBuilder.Config
splitlinebehavior = (SplitLineBehavior)General.Clamp(cfg.ReadSetting("splitlinebehavior", 0), 0, Enum.GetValues(typeof(SplitLineBehavior)).Length - 1); //mxd
mergegeomode = (MergeGeometryMode)General.Clamp(cfg.ReadSetting("mergegeometrymode", (int)MergeGeometryMode.REPLACE), 0, Enum.GetValues(typeof(MergeGeometryMode)).Length - 1); //mxd
usehighlight = cfg.ReadSetting("usehighlight", true); //mxd
switchviewmodes = cfg.ReadSetting("switchviewmodes", false); //mxd
//mxd. Script editor
scriptfontname = cfg.ReadSetting("scriptfontname", "Courier New");
@ -499,6 +503,7 @@ namespace CodeImp.DoomBuilder.Config
cfg.WriteSetting("splitlinebehavior", (int)splitlinebehavior); //mxd
cfg.WriteSetting("mergegeometrymode", (int)mergegeomode); //mxd
cfg.WriteSetting("usehighlight", usehighlight); //mxd
cfg.WriteSetting("switchviewmodes", switchviewmodes); //mxd
//mxd. Script editor
cfg.WriteSetting("scriptfontname", scriptfontname);

View file

@ -171,6 +171,11 @@ namespace CodeImp.DoomBuilder.Editing
// Switch back to last classic mode
General.Editing.ChangeMode(General.Editing.PreviousClassicMode.Name);
}
//mxd. Switch between view floor and view ceiling textures?
else if(General.Editing.Mode is ClassicMode && General.Settings.SwitchViewModes)
{
ClassicMode.SetViewMode(General.Map.Renderer2D.ViewMode == ViewMode.FloorTextures ? ViewMode.CeilingTextures : ViewMode.FloorTextures);
}
}
}

View file

@ -93,17 +93,17 @@ namespace CodeImp.DoomBuilder.Windows
this.apply = new System.Windows.Forms.Button();
this.tabs = new System.Windows.Forms.TabControl();
this.tabinterface = new System.Windows.Forms.TabPage();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.resetscreenshotsdir = new System.Windows.Forms.Button();
this.browsescreenshotsdir = new System.Windows.Forms.Button();
this.screenshotsfolderpath = new System.Windows.Forms.TextBox();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.groupBox11 = new System.Windows.Forms.GroupBox();
this.textlabelfontname = new System.Windows.Forms.ComboBox();
this.textlabelfontbold = new System.Windows.Forms.CheckBox();
this.label33 = new System.Windows.Forms.Label();
this.label34 = new System.Windows.Forms.Label();
this.textlabelfontsize = new System.Windows.Forms.ComboBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.resetscreenshotsdir = new System.Windows.Forms.Button();
this.browsescreenshotsdir = new System.Windows.Forms.Button();
this.screenshotsfolderpath = new System.Windows.Forms.TextBox();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.toolbar_gzdoom = new System.Windows.Forms.CheckBox();
this.toolbar_file = new System.Windows.Forms.CheckBox();
this.toolbar_testing = new System.Windows.Forms.CheckBox();
@ -260,9 +260,9 @@ namespace CodeImp.DoomBuilder.Windows
((System.ComponentModel.ISupportInitialize)(this.doublesidedalpha)).BeginInit();
this.tabs.SuspendLayout();
this.tabinterface.SuspendLayout();
this.groupBox11.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox5.SuspendLayout();
this.groupBox11.SuspendLayout();
this.groupBox4.SuspendLayout();
this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.vertexScale3D)).BeginInit();
@ -962,7 +962,7 @@ namespace CodeImp.DoomBuilder.Windows
this.tabs.Controls.Add(this.tabscripteditor);
this.tabs.Controls.Add(this.tabpasting);
this.tabs.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tabs.Location = new System.Drawing.Point(11, 13);
this.tabs.Location = new System.Drawing.Point(12, 12);
this.tabs.Name = "tabs";
this.tabs.Padding = new System.Drawing.Point(24, 3);
this.tabs.SelectedIndex = 0;
@ -987,66 +987,6 @@ namespace CodeImp.DoomBuilder.Windows
this.tabinterface.Text = "Interface";
this.tabinterface.UseVisualStyleBackColor = true;
//
// groupBox3
//
this.groupBox3.Controls.Add(this.resetscreenshotsdir);
this.groupBox3.Controls.Add(this.browsescreenshotsdir);
this.groupBox3.Controls.Add(this.screenshotsfolderpath);
this.groupBox3.Location = new System.Drawing.Point(345, 479);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(331, 48);
this.groupBox3.TabIndex = 5;
this.groupBox3.TabStop = false;
this.groupBox3.Text = " Screenshots Folder ";
//
// resetscreenshotsdir
//
this.resetscreenshotsdir.Image = global::CodeImp.DoomBuilder.Properties.Resources.Reset;
this.resetscreenshotsdir.Location = new System.Drawing.Point(301, 17);
this.resetscreenshotsdir.Name = "resetscreenshotsdir";
this.resetscreenshotsdir.Size = new System.Drawing.Size(24, 24);
this.resetscreenshotsdir.TabIndex = 2;
this.toolTip1.SetToolTip(this.resetscreenshotsdir, "Use Default Screenshots Folder");
this.resetscreenshotsdir.UseVisualStyleBackColor = true;
this.resetscreenshotsdir.Click += new System.EventHandler(this.resetscreenshotsdir_Click);
//
// browsescreenshotsdir
//
this.browsescreenshotsdir.Image = global::CodeImp.DoomBuilder.Properties.Resources.FolderExplore;
this.browsescreenshotsdir.Location = new System.Drawing.Point(275, 17);
this.browsescreenshotsdir.Name = "browsescreenshotsdir";
this.browsescreenshotsdir.Size = new System.Drawing.Size(24, 24);
this.browsescreenshotsdir.TabIndex = 1;
this.toolTip1.SetToolTip(this.browsescreenshotsdir, "Browse Screenshots Folder");
this.browsescreenshotsdir.UseVisualStyleBackColor = true;
this.browsescreenshotsdir.Click += new System.EventHandler(this.browsescreenshotsdir_Click);
//
// screenshotsfolderpath
//
this.screenshotsfolderpath.Location = new System.Drawing.Point(6, 19);
this.screenshotsfolderpath.Name = "screenshotsfolderpath";
this.screenshotsfolderpath.Size = new System.Drawing.Size(264, 20);
this.screenshotsfolderpath.TabIndex = 0;
//
// groupBox5
//
this.groupBox5.Controls.Add(this.toolbar_gzdoom);
this.groupBox5.Controls.Add(this.toolbar_file);
this.groupBox5.Controls.Add(this.toolbar_testing);
this.groupBox5.Controls.Add(this.toolbar_geometry);
this.groupBox5.Controls.Add(this.toolbar_viewmodes);
this.groupBox5.Controls.Add(this.toolbar_filter);
this.groupBox5.Controls.Add(this.toolbar_prefabs);
this.groupBox5.Controls.Add(this.toolbar_copy);
this.groupBox5.Controls.Add(this.toolbar_undo);
this.groupBox5.Controls.Add(this.toolbar_script);
this.groupBox5.Location = new System.Drawing.Point(345, 271);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(331, 137);
this.groupBox5.TabIndex = 4;
this.groupBox5.TabStop = false;
this.groupBox5.Text = " Toolbar Buttons ";
//
// groupBox11
//
this.groupBox11.Controls.Add(this.textlabelfontname);
@ -1125,6 +1065,66 @@ namespace CodeImp.DoomBuilder.Windows
this.textlabelfontsize.Size = new System.Drawing.Size(45, 21);
this.textlabelfontsize.TabIndex = 30;
//
// groupBox3
//
this.groupBox3.Controls.Add(this.resetscreenshotsdir);
this.groupBox3.Controls.Add(this.browsescreenshotsdir);
this.groupBox3.Controls.Add(this.screenshotsfolderpath);
this.groupBox3.Location = new System.Drawing.Point(345, 479);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(331, 48);
this.groupBox3.TabIndex = 5;
this.groupBox3.TabStop = false;
this.groupBox3.Text = " Screenshots Folder ";
//
// resetscreenshotsdir
//
this.resetscreenshotsdir.Image = global::CodeImp.DoomBuilder.Properties.Resources.Reset;
this.resetscreenshotsdir.Location = new System.Drawing.Point(301, 17);
this.resetscreenshotsdir.Name = "resetscreenshotsdir";
this.resetscreenshotsdir.Size = new System.Drawing.Size(24, 24);
this.resetscreenshotsdir.TabIndex = 2;
this.toolTip1.SetToolTip(this.resetscreenshotsdir, "Use Default Screenshots Folder");
this.resetscreenshotsdir.UseVisualStyleBackColor = true;
this.resetscreenshotsdir.Click += new System.EventHandler(this.resetscreenshotsdir_Click);
//
// browsescreenshotsdir
//
this.browsescreenshotsdir.Image = global::CodeImp.DoomBuilder.Properties.Resources.FolderExplore;
this.browsescreenshotsdir.Location = new System.Drawing.Point(275, 17);
this.browsescreenshotsdir.Name = "browsescreenshotsdir";
this.browsescreenshotsdir.Size = new System.Drawing.Size(24, 24);
this.browsescreenshotsdir.TabIndex = 1;
this.toolTip1.SetToolTip(this.browsescreenshotsdir, "Browse Screenshots Folder");
this.browsescreenshotsdir.UseVisualStyleBackColor = true;
this.browsescreenshotsdir.Click += new System.EventHandler(this.browsescreenshotsdir_Click);
//
// screenshotsfolderpath
//
this.screenshotsfolderpath.Location = new System.Drawing.Point(6, 19);
this.screenshotsfolderpath.Name = "screenshotsfolderpath";
this.screenshotsfolderpath.Size = new System.Drawing.Size(264, 20);
this.screenshotsfolderpath.TabIndex = 0;
//
// groupBox5
//
this.groupBox5.Controls.Add(this.toolbar_gzdoom);
this.groupBox5.Controls.Add(this.toolbar_file);
this.groupBox5.Controls.Add(this.toolbar_testing);
this.groupBox5.Controls.Add(this.toolbar_geometry);
this.groupBox5.Controls.Add(this.toolbar_viewmodes);
this.groupBox5.Controls.Add(this.toolbar_filter);
this.groupBox5.Controls.Add(this.toolbar_prefabs);
this.groupBox5.Controls.Add(this.toolbar_copy);
this.groupBox5.Controls.Add(this.toolbar_undo);
this.groupBox5.Controls.Add(this.toolbar_script);
this.groupBox5.Location = new System.Drawing.Point(345, 271);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(331, 137);
this.groupBox5.TabIndex = 4;
this.groupBox5.TabStop = false;
this.groupBox5.Text = " Toolbar Buttons ";
//
// toolbar_gzdoom
//
this.toolbar_gzdoom.AutoSize = true;
@ -2765,12 +2765,12 @@ namespace CodeImp.DoomBuilder.Windows
((System.ComponentModel.ISupportInitialize)(this.doublesidedalpha)).EndInit();
this.tabs.ResumeLayout(false);
this.tabinterface.ResumeLayout(false);
this.groupBox11.ResumeLayout(false);
this.groupBox11.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.groupBox5.ResumeLayout(false);
this.groupBox5.PerformLayout();
this.groupBox11.ResumeLayout(false);
this.groupBox11.PerformLayout();
this.groupBox4.ResumeLayout(false);
this.groupBox4.PerformLayout();
this.groupBox2.ResumeLayout(false);

View file

@ -241,9 +241,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.groupBox3.Controls.Add(this.editnewsector);
this.groupBox3.Controls.Add(this.additiveselect);
this.groupBox3.Controls.Add(this.dontusenodes);
this.groupBox3.Controls.Add(this.switchviewmodes);
this.groupBox3.Location = new System.Drawing.Point(284, 104);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(379, 327);
this.groupBox3.Size = new System.Drawing.Size(379, 427);
this.groupBox3.TabIndex = 18;
this.groupBox3.TabStop = false;
this.groupBox3.Text = " Options ";
@ -601,10 +602,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
//
// switchviewmodes
//
this.switchviewmodes.Location = new System.Drawing.Point(0, 0);
this.switchviewmodes.AutoSize = true;
this.switchviewmodes.Location = new System.Drawing.Point(13, 287);
this.switchviewmodes.Name = "switchviewmodes";
this.switchviewmodes.Size = new System.Drawing.Size(104, 24);
this.switchviewmodes.TabIndex = 0;
this.switchviewmodes.Size = new System.Drawing.Size(317, 17);
this.switchviewmodes.TabIndex = 11;
this.switchviewmodes.Text = "Switch view modes when switching to the same Classic Mode";
this.switchviewmodes.UseVisualStyleBackColor = true;
//
// mouseselectionthreshold
//

View file

@ -59,6 +59,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
autoaligntexturesoncreate.Checked = BuilderPlug.Me.AutoAlignTextureOffsetsOnCreate; //mxd
dontMoveGeometryOutsideBounds.Checked = BuilderPlug.Me.DontMoveGeometryOutsideMapBoundary; //mxd
syncSelection.Checked = BuilderPlug.Me.SyncSelection; //mxd
switchviewmodes.Checked = General.Settings.SwitchViewModes; //mxd
autodrawonedit.Checked = BuilderPlug.Me.AutoDrawOnEdit;
defaultbrightness.Text = General.Settings.DefaultBrightness.ToString(); //mxd
defaultceilheight.Text = General.Settings.DefaultCeilingHeight.ToString();//mxd
@ -90,6 +91,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Settings.WritePluginSetting("autoaligntextureoffsetsoncreate", autoaligntexturesoncreate.Checked);//mxd
General.Settings.WritePluginSetting("dontmovegeometryoutsidemapboundary", dontMoveGeometryOutsideBounds.Checked);//mxd
General.Settings.WritePluginSetting("syncselection", syncSelection.Checked);//mxd
General.Settings.SwitchViewModes = switchviewmodes.Checked; //mxd
General.Settings.SplitLineBehavior = (SplitLineBehavior)splitbehavior.SelectedIndex;//mxd
//default sector values

View file

@ -120,7 +120,4 @@
<metadata name="tabs.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>