warnings now appear in same area in status bar as status messages

This commit is contained in:
codeimp 2008-09-24 14:53:42 +00:00
parent 15693e1ca8
commit 116e9ca877
5 changed files with 183 additions and 128 deletions

View file

@ -1,7 +1,5 @@
- Add more find/replace types
- Make copy/paste features
- Seperate modes into their own Mode menu
- Make plugin support for custom toolbar buttons / menu items (Tools menu?)

View file

@ -1067,8 +1067,14 @@ namespace CodeImp.DoomBuilder
// Let the plugins know
General.Plugins.MapReconfigure();
// Update interface
General.MainWindow.UpdateInterface();
// Reload resources
ReloadResources();
// Done
General.MainWindow.DisplayReady();
}
// Done

View file

@ -100,7 +100,6 @@ namespace CodeImp.DoomBuilder.Windows
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
this.statusbar = new System.Windows.Forms.StatusStrip();
this.statuslabel = new System.Windows.Forms.ToolStripStatusLabel();
this.warninglabel = new System.Windows.Forms.ToolStripStatusLabel();
this.configlabel = new System.Windows.Forms.ToolStripStatusLabel();
this.gridlabel = new System.Windows.Forms.ToolStripStatusLabel();
this.buttongrid = new System.Windows.Forms.ToolStripDropDownButton();
@ -160,17 +159,17 @@ namespace CodeImp.DoomBuilder.Windows
// toolStripMenuItem1
//
toolStripMenuItem1.Name = "toolStripMenuItem1";
toolStripMenuItem1.Size = new System.Drawing.Size(198, 6);
toolStripMenuItem1.Size = new System.Drawing.Size(187, 6);
//
// toolStripMenuItem2
//
toolStripMenuItem2.Name = "toolStripMenuItem2";
toolStripMenuItem2.Size = new System.Drawing.Size(198, 6);
toolStripMenuItem2.Size = new System.Drawing.Size(187, 6);
//
// toolStripMenuItem3
//
toolStripMenuItem3.Name = "toolStripMenuItem3";
toolStripMenuItem3.Size = new System.Drawing.Size(198, 6);
toolStripMenuItem3.Size = new System.Drawing.Size(187, 6);
//
// toolStripSeparator1
//
@ -181,7 +180,7 @@ namespace CodeImp.DoomBuilder.Windows
// toolStripSeparator4
//
toolStripSeparator4.Name = "toolStripSeparator4";
toolStripSeparator4.Size = new System.Drawing.Size(194, 6);
toolStripSeparator4.Size = new System.Drawing.Size(183, 6);
//
// toolStripSeparator9
//
@ -204,7 +203,7 @@ namespace CodeImp.DoomBuilder.Windows
// toolStripSeparator11
//
toolStripSeparator11.Name = "toolStripSeparator11";
toolStripSeparator11.Size = new System.Drawing.Size(162, 6);
toolStripSeparator11.Size = new System.Drawing.Size(151, 6);
//
// toolstripSeperator1
//
@ -215,17 +214,17 @@ namespace CodeImp.DoomBuilder.Windows
// toolstripSeperator6
//
toolstripSeperator6.Name = "toolstripSeperator6";
toolstripSeperator6.Size = new System.Drawing.Size(162, 6);
toolstripSeperator6.Size = new System.Drawing.Size(151, 6);
//
// toolStripMenuItem4
//
toolStripMenuItem4.Name = "toolStripMenuItem4";
toolStripMenuItem4.Size = new System.Drawing.Size(161, 6);
toolStripMenuItem4.Size = new System.Drawing.Size(150, 6);
//
// toolStripSeparator2
//
toolStripSeparator2.Name = "toolStripSeparator2";
toolStripSeparator2.Size = new System.Drawing.Size(164, 6);
toolStripSeparator2.Size = new System.Drawing.Size(153, 6);
//
// toolStripSeparator7
//
@ -242,7 +241,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemeditmodesseperator
//
this.itemeditmodesseperator.Name = "itemeditmodesseperator";
this.itemeditmodesseperator.Size = new System.Drawing.Size(162, 6);
this.itemeditmodesseperator.Size = new System.Drawing.Size(151, 6);
//
// buttoneditmodesseperator
//
@ -266,7 +265,7 @@ namespace CodeImp.DoomBuilder.Windows
this.menuhelp});
this.menumain.Location = new System.Drawing.Point(0, 0);
this.menumain.Name = "menumain";
this.menumain.Size = new System.Drawing.Size(961, 24);
this.menumain.Size = new System.Drawing.Size(1012, 24);
this.menumain.TabIndex = 0;
//
// menufile
@ -294,7 +293,7 @@ namespace CodeImp.DoomBuilder.Windows
this.itemnewmap.Image = global::CodeImp.DoomBuilder.Properties.Resources.File;
this.itemnewmap.Name = "itemnewmap";
this.itemnewmap.ShortcutKeyDisplayString = "";
this.itemnewmap.Size = new System.Drawing.Size(201, 22);
this.itemnewmap.Size = new System.Drawing.Size(190, 22);
this.itemnewmap.Tag = "builder_newmap";
this.itemnewmap.Text = "New Map";
this.itemnewmap.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -303,7 +302,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemopenmap.Image = global::CodeImp.DoomBuilder.Properties.Resources.OpenMap;
this.itemopenmap.Name = "itemopenmap";
this.itemopenmap.Size = new System.Drawing.Size(201, 22);
this.itemopenmap.Size = new System.Drawing.Size(190, 22);
this.itemopenmap.Tag = "builder_openmap";
this.itemopenmap.Text = "Open Map...";
this.itemopenmap.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -311,7 +310,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemclosemap
//
this.itemclosemap.Name = "itemclosemap";
this.itemclosemap.Size = new System.Drawing.Size(201, 22);
this.itemclosemap.Size = new System.Drawing.Size(190, 22);
this.itemclosemap.Tag = "builder_closemap";
this.itemclosemap.Text = "Close Map";
this.itemclosemap.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -320,7 +319,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemsavemap.Image = global::CodeImp.DoomBuilder.Properties.Resources.SaveMap;
this.itemsavemap.Name = "itemsavemap";
this.itemsavemap.Size = new System.Drawing.Size(201, 22);
this.itemsavemap.Size = new System.Drawing.Size(190, 22);
this.itemsavemap.Tag = "builder_savemap";
this.itemsavemap.Text = "Save Map";
this.itemsavemap.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -328,7 +327,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemsavemapas
//
this.itemsavemapas.Name = "itemsavemapas";
this.itemsavemapas.Size = new System.Drawing.Size(201, 22);
this.itemsavemapas.Size = new System.Drawing.Size(190, 22);
this.itemsavemapas.Tag = "builder_savemapas";
this.itemsavemapas.Text = "Save Map As...";
this.itemsavemapas.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -336,7 +335,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemsavemapinto
//
this.itemsavemapinto.Name = "itemsavemapinto";
this.itemsavemapinto.Size = new System.Drawing.Size(201, 22);
this.itemsavemapinto.Size = new System.Drawing.Size(190, 22);
this.itemsavemapinto.Tag = "builder_savemapinto";
this.itemsavemapinto.Text = "Save Map Into...";
this.itemsavemapinto.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -344,13 +343,13 @@ namespace CodeImp.DoomBuilder.Windows
// toolStripMenuItem5
//
this.toolStripMenuItem5.Name = "toolStripMenuItem5";
this.toolStripMenuItem5.Size = new System.Drawing.Size(198, 6);
this.toolStripMenuItem5.Size = new System.Drawing.Size(187, 6);
//
// itemtestmap
//
this.itemtestmap.Image = global::CodeImp.DoomBuilder.Properties.Resources.Test;
this.itemtestmap.Name = "itemtestmap";
this.itemtestmap.Size = new System.Drawing.Size(201, 22);
this.itemtestmap.Size = new System.Drawing.Size(190, 22);
this.itemtestmap.Tag = "builder_testmap";
this.itemtestmap.Text = "Test Map";
this.itemtestmap.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -359,13 +358,13 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemnorecent.Enabled = false;
this.itemnorecent.Name = "itemnorecent";
this.itemnorecent.Size = new System.Drawing.Size(201, 22);
this.itemnorecent.Size = new System.Drawing.Size(190, 22);
this.itemnorecent.Text = "No recently opened files";
//
// itemexit
//
this.itemexit.Name = "itemexit";
this.itemexit.Size = new System.Drawing.Size(201, 22);
this.itemexit.Size = new System.Drawing.Size(190, 22);
this.itemexit.Text = "Exit";
this.itemexit.Click += new System.EventHandler(this.itemexit_Click);
//
@ -396,7 +395,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemundo.Image = global::CodeImp.DoomBuilder.Properties.Resources.Undo;
this.itemundo.Name = "itemundo";
this.itemundo.Size = new System.Drawing.Size(165, 22);
this.itemundo.Size = new System.Drawing.Size(154, 22);
this.itemundo.Tag = "builder_undo";
this.itemundo.Text = "Undo";
this.itemundo.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -405,7 +404,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemredo.Image = global::CodeImp.DoomBuilder.Properties.Resources.Redo;
this.itemredo.Name = "itemredo";
this.itemredo.Size = new System.Drawing.Size(165, 22);
this.itemredo.Size = new System.Drawing.Size(154, 22);
this.itemredo.Tag = "builder_redo";
this.itemredo.Text = "Redo";
this.itemredo.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -413,13 +412,13 @@ namespace CodeImp.DoomBuilder.Windows
// toolStripMenuItem7
//
this.toolStripMenuItem7.Name = "toolStripMenuItem7";
this.toolStripMenuItem7.Size = new System.Drawing.Size(162, 6);
this.toolStripMenuItem7.Size = new System.Drawing.Size(151, 6);
//
// itemcut
//
this.itemcut.Image = global::CodeImp.DoomBuilder.Properties.Resources.Cut;
this.itemcut.Name = "itemcut";
this.itemcut.Size = new System.Drawing.Size(165, 22);
this.itemcut.Size = new System.Drawing.Size(154, 22);
this.itemcut.Tag = "builder_cutselection";
this.itemcut.Text = "Cut";
this.itemcut.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -428,7 +427,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemcopy.Image = global::CodeImp.DoomBuilder.Properties.Resources.Copy;
this.itemcopy.Name = "itemcopy";
this.itemcopy.Size = new System.Drawing.Size(165, 22);
this.itemcopy.Size = new System.Drawing.Size(154, 22);
this.itemcopy.Tag = "builder_copyselection";
this.itemcopy.Text = "Copy";
this.itemcopy.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -437,7 +436,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itempaste.Image = global::CodeImp.DoomBuilder.Properties.Resources.Paste;
this.itempaste.Name = "itempaste";
this.itempaste.Size = new System.Drawing.Size(165, 22);
this.itempaste.Size = new System.Drawing.Size(154, 22);
this.itempaste.Tag = "builder_pasteselection";
this.itempaste.Text = "Paste";
this.itempaste.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -448,7 +447,7 @@ namespace CodeImp.DoomBuilder.Windows
this.itemsnaptogrid.CheckState = System.Windows.Forms.CheckState.Checked;
this.itemsnaptogrid.Image = global::CodeImp.DoomBuilder.Properties.Resources.Grid4;
this.itemsnaptogrid.Name = "itemsnaptogrid";
this.itemsnaptogrid.Size = new System.Drawing.Size(165, 22);
this.itemsnaptogrid.Size = new System.Drawing.Size(154, 22);
this.itemsnaptogrid.Tag = "builder_togglesnap";
this.itemsnaptogrid.Text = "Snap to Grid";
this.itemsnaptogrid.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -459,7 +458,7 @@ namespace CodeImp.DoomBuilder.Windows
this.itemautomerge.CheckState = System.Windows.Forms.CheckState.Checked;
this.itemautomerge.Image = global::CodeImp.DoomBuilder.Properties.Resources.mergegeometry2;
this.itemautomerge.Name = "itemautomerge";
this.itemautomerge.Size = new System.Drawing.Size(165, 22);
this.itemautomerge.Size = new System.Drawing.Size(154, 22);
this.itemautomerge.Tag = "builder_toggleautomerge";
this.itemautomerge.Text = "Merge Geometry";
this.itemautomerge.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -467,12 +466,12 @@ namespace CodeImp.DoomBuilder.Windows
// toolStripMenuItem6
//
this.toolStripMenuItem6.Name = "toolStripMenuItem6";
this.toolStripMenuItem6.Size = new System.Drawing.Size(162, 6);
this.toolStripMenuItem6.Size = new System.Drawing.Size(151, 6);
//
// itemgridinc
//
this.itemgridinc.Name = "itemgridinc";
this.itemgridinc.Size = new System.Drawing.Size(165, 22);
this.itemgridinc.Size = new System.Drawing.Size(154, 22);
this.itemgridinc.Tag = "builder_gridinc";
this.itemgridinc.Text = "Increase Grid";
this.itemgridinc.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -480,7 +479,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemgriddec
//
this.itemgriddec.Name = "itemgriddec";
this.itemgriddec.Size = new System.Drawing.Size(165, 22);
this.itemgriddec.Size = new System.Drawing.Size(154, 22);
this.itemgriddec.Tag = "builder_griddec";
this.itemgriddec.Text = "Decrease Grid";
this.itemgriddec.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -489,7 +488,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemgridsetup.Image = global::CodeImp.DoomBuilder.Properties.Resources.Grid2;
this.itemgridsetup.Name = "itemgridsetup";
this.itemgridsetup.Size = new System.Drawing.Size(165, 22);
this.itemgridsetup.Size = new System.Drawing.Size(154, 22);
this.itemgridsetup.Tag = "builder_gridsetup";
this.itemgridsetup.Text = "Grid Setup...";
this.itemgridsetup.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -498,7 +497,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemmapoptions.Image = global::CodeImp.DoomBuilder.Properties.Resources.Properties;
this.itemmapoptions.Name = "itemmapoptions";
this.itemmapoptions.Size = new System.Drawing.Size(165, 22);
this.itemmapoptions.Size = new System.Drawing.Size(154, 22);
this.itemmapoptions.Tag = "builder_mapoptions";
this.itemmapoptions.Text = "Map Options....";
this.itemmapoptions.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -517,7 +516,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemreloadresources
//
this.itemreloadresources.Name = "itemreloadresources";
this.itemreloadresources.Size = new System.Drawing.Size(197, 22);
this.itemreloadresources.Size = new System.Drawing.Size(186, 22);
this.itemreloadresources.Tag = "builder_reloadresources";
this.itemreloadresources.Text = "Reload Resources";
this.itemreloadresources.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -525,7 +524,7 @@ namespace CodeImp.DoomBuilder.Windows
// configurationToolStripMenuItem
//
this.configurationToolStripMenuItem.Name = "configurationToolStripMenuItem";
this.configurationToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
this.configurationToolStripMenuItem.Size = new System.Drawing.Size(186, 22);
this.configurationToolStripMenuItem.Tag = "builder_configuration";
this.configurationToolStripMenuItem.Text = "Game Configurations...";
this.configurationToolStripMenuItem.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -533,7 +532,7 @@ namespace CodeImp.DoomBuilder.Windows
// preferencesToolStripMenuItem
//
this.preferencesToolStripMenuItem.Name = "preferencesToolStripMenuItem";
this.preferencesToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
this.preferencesToolStripMenuItem.Size = new System.Drawing.Size(186, 22);
this.preferencesToolStripMenuItem.Tag = "builder_preferences";
this.preferencesToolStripMenuItem.Text = "Preferences...";
this.preferencesToolStripMenuItem.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -549,7 +548,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemhelpabout
//
this.itemhelpabout.Name = "itemhelpabout";
this.itemhelpabout.Size = new System.Drawing.Size(191, 22);
this.itemhelpabout.Size = new System.Drawing.Size(180, 22);
this.itemhelpabout.Text = "About Doom Builder...";
this.itemhelpabout.Click += new System.EventHandler(this.itemhelpabout_Click);
//
@ -581,7 +580,7 @@ namespace CodeImp.DoomBuilder.Windows
this.toolStripSeparator6});
this.toolbar.Location = new System.Drawing.Point(0, 24);
this.toolbar.Name = "toolbar";
this.toolbar.Size = new System.Drawing.Size(961, 25);
this.toolbar.Size = new System.Drawing.Size(1012, 25);
this.toolbar.TabIndex = 1;
//
// buttonnewmap
@ -708,8 +707,8 @@ namespace CodeImp.DoomBuilder.Windows
this.thingfilters.Name = "thingfilters";
this.thingfilters.Size = new System.Drawing.Size(130, 25);
this.thingfilters.ToolTipText = "Things Filter";
this.thingfilters.DropDownClosed += new System.EventHandler(this.LoseFocus);
this.thingfilters.SelectedIndexChanged += new System.EventHandler(this.thingfilters_SelectedIndexChanged);
this.thingfilters.DropDownClosed += new System.EventHandler(this.LoseFocus);
//
// toolStripSeparator8
//
@ -772,7 +771,6 @@ namespace CodeImp.DoomBuilder.Windows
this.statusbar.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.statusbar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.statuslabel,
this.warninglabel,
this.configlabel,
toolStripSeparator12,
this.gridlabel,
@ -784,10 +782,10 @@ namespace CodeImp.DoomBuilder.Windows
this.xposlabel,
this.poscommalabel,
this.yposlabel});
this.statusbar.Location = new System.Drawing.Point(0, 611);
this.statusbar.Location = new System.Drawing.Point(0, 670);
this.statusbar.Name = "statusbar";
this.statusbar.ShowItemToolTips = true;
this.statusbar.Size = new System.Drawing.Size(961, 23);
this.statusbar.Size = new System.Drawing.Size(1012, 23);
this.statusbar.TabIndex = 2;
//
// statuslabel
@ -796,29 +794,17 @@ namespace CodeImp.DoomBuilder.Windows
this.statuslabel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.statuslabel.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
this.statuslabel.Name = "statuslabel";
this.statuslabel.Size = new System.Drawing.Size(208, 18);
this.statuslabel.Size = new System.Drawing.Size(396, 18);
this.statuslabel.Spring = true;
this.statuslabel.Text = "Initializing user interface...";
this.statuslabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// warninglabel
//
this.warninglabel.BackColor = System.Drawing.SystemColors.Control;
this.warninglabel.Image = global::CodeImp.DoomBuilder.Properties.Resources.Warning;
this.warninglabel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.warninglabel.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
this.warninglabel.Name = "warninglabel";
this.warninglabel.Size = new System.Drawing.Size(167, 18);
this.warninglabel.Text = "Make a selection first!";
this.warninglabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.warninglabel.Visible = false;
//
// configlabel
//
this.configlabel.AutoSize = false;
this.configlabel.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.configlabel.Name = "configlabel";
this.configlabel.Size = new System.Drawing.Size(250, 18);
this.configlabel.Size = new System.Drawing.Size(280, 18);
this.configlabel.Text = "ZDoom (Doom in Hexen Format)";
this.configlabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.configlabel.ToolTipText = "Current Game Configuration";
@ -859,7 +845,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemgrid1024
//
this.itemgrid1024.Name = "itemgrid1024";
this.itemgrid1024.Size = new System.Drawing.Size(164, 22);
this.itemgrid1024.Size = new System.Drawing.Size(153, 22);
this.itemgrid1024.Tag = "1024";
this.itemgrid1024.Text = "1024 mp";
this.itemgrid1024.Click += new System.EventHandler(this.itemgridsize_Click);
@ -867,7 +853,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemgrid512
//
this.itemgrid512.Name = "itemgrid512";
this.itemgrid512.Size = new System.Drawing.Size(164, 22);
this.itemgrid512.Size = new System.Drawing.Size(153, 22);
this.itemgrid512.Tag = "512";
this.itemgrid512.Text = "512 mp";
this.itemgrid512.Click += new System.EventHandler(this.itemgridsize_Click);
@ -875,7 +861,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemgrid256
//
this.itemgrid256.Name = "itemgrid256";
this.itemgrid256.Size = new System.Drawing.Size(164, 22);
this.itemgrid256.Size = new System.Drawing.Size(153, 22);
this.itemgrid256.Tag = "256";
this.itemgrid256.Text = "256 mp";
this.itemgrid256.Click += new System.EventHandler(this.itemgridsize_Click);
@ -883,7 +869,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemgrid128
//
this.itemgrid128.Name = "itemgrid128";
this.itemgrid128.Size = new System.Drawing.Size(164, 22);
this.itemgrid128.Size = new System.Drawing.Size(153, 22);
this.itemgrid128.Tag = "128";
this.itemgrid128.Text = "128 mp";
this.itemgrid128.Click += new System.EventHandler(this.itemgridsize_Click);
@ -891,7 +877,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemgrid64
//
this.itemgrid64.Name = "itemgrid64";
this.itemgrid64.Size = new System.Drawing.Size(164, 22);
this.itemgrid64.Size = new System.Drawing.Size(153, 22);
this.itemgrid64.Tag = "64";
this.itemgrid64.Text = "64 mp";
this.itemgrid64.Click += new System.EventHandler(this.itemgridsize_Click);
@ -899,7 +885,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemgrid32
//
this.itemgrid32.Name = "itemgrid32";
this.itemgrid32.Size = new System.Drawing.Size(164, 22);
this.itemgrid32.Size = new System.Drawing.Size(153, 22);
this.itemgrid32.Tag = "32";
this.itemgrid32.Text = "32 mp";
this.itemgrid32.Click += new System.EventHandler(this.itemgridsize_Click);
@ -907,7 +893,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemgrid16
//
this.itemgrid16.Name = "itemgrid16";
this.itemgrid16.Size = new System.Drawing.Size(164, 22);
this.itemgrid16.Size = new System.Drawing.Size(153, 22);
this.itemgrid16.Tag = "16";
this.itemgrid16.Text = "16 mp";
this.itemgrid16.Click += new System.EventHandler(this.itemgridsize_Click);
@ -915,7 +901,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemgrid8
//
this.itemgrid8.Name = "itemgrid8";
this.itemgrid8.Size = new System.Drawing.Size(164, 22);
this.itemgrid8.Size = new System.Drawing.Size(153, 22);
this.itemgrid8.Tag = "8";
this.itemgrid8.Text = "8 mp";
this.itemgrid8.Click += new System.EventHandler(this.itemgridsize_Click);
@ -923,7 +909,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemgrid4
//
this.itemgrid4.Name = "itemgrid4";
this.itemgrid4.Size = new System.Drawing.Size(164, 22);
this.itemgrid4.Size = new System.Drawing.Size(153, 22);
this.itemgrid4.Tag = "4";
this.itemgrid4.Text = "4 mp";
this.itemgrid4.Click += new System.EventHandler(this.itemgridsize_Click);
@ -931,7 +917,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemgridcustom
//
this.itemgridcustom.Name = "itemgridcustom";
this.itemgridcustom.Size = new System.Drawing.Size(164, 22);
this.itemgridcustom.Size = new System.Drawing.Size(153, 22);
this.itemgridcustom.Text = "Customize...";
this.itemgridcustom.Click += new System.EventHandler(this.itemgridcustom_Click);
//
@ -968,7 +954,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemzoom200
//
this.itemzoom200.Name = "itemzoom200";
this.itemzoom200.Size = new System.Drawing.Size(167, 22);
this.itemzoom200.Size = new System.Drawing.Size(156, 22);
this.itemzoom200.Tag = "200";
this.itemzoom200.Text = "200%";
this.itemzoom200.Click += new System.EventHandler(this.itemzoomto_Click);
@ -976,7 +962,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemzoom100
//
this.itemzoom100.Name = "itemzoom100";
this.itemzoom100.Size = new System.Drawing.Size(167, 22);
this.itemzoom100.Size = new System.Drawing.Size(156, 22);
this.itemzoom100.Tag = "100";
this.itemzoom100.Text = "100%";
this.itemzoom100.Click += new System.EventHandler(this.itemzoomto_Click);
@ -984,7 +970,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemzoom50
//
this.itemzoom50.Name = "itemzoom50";
this.itemzoom50.Size = new System.Drawing.Size(167, 22);
this.itemzoom50.Size = new System.Drawing.Size(156, 22);
this.itemzoom50.Tag = "50";
this.itemzoom50.Text = "50%";
this.itemzoom50.Click += new System.EventHandler(this.itemzoomto_Click);
@ -992,7 +978,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemzoom25
//
this.itemzoom25.Name = "itemzoom25";
this.itemzoom25.Size = new System.Drawing.Size(167, 22);
this.itemzoom25.Size = new System.Drawing.Size(156, 22);
this.itemzoom25.Tag = "25";
this.itemzoom25.Text = "25%";
this.itemzoom25.Click += new System.EventHandler(this.itemzoomto_Click);
@ -1000,7 +986,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemzoom10
//
this.itemzoom10.Name = "itemzoom10";
this.itemzoom10.Size = new System.Drawing.Size(167, 22);
this.itemzoom10.Size = new System.Drawing.Size(156, 22);
this.itemzoom10.Tag = "10";
this.itemzoom10.Text = "10%";
this.itemzoom10.Click += new System.EventHandler(this.itemzoomto_Click);
@ -1008,7 +994,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemzoom5
//
this.itemzoom5.Name = "itemzoom5";
this.itemzoom5.Size = new System.Drawing.Size(167, 22);
this.itemzoom5.Size = new System.Drawing.Size(156, 22);
this.itemzoom5.Tag = "5";
this.itemzoom5.Text = "5%";
this.itemzoom5.Click += new System.EventHandler(this.itemzoomto_Click);
@ -1016,7 +1002,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemzoomfittoscreen
//
this.itemzoomfittoscreen.Name = "itemzoomfittoscreen";
this.itemzoomfittoscreen.Size = new System.Drawing.Size(167, 22);
this.itemzoomfittoscreen.Size = new System.Drawing.Size(156, 22);
this.itemzoomfittoscreen.Text = "Fit to screen";
this.itemzoomfittoscreen.Click += new System.EventHandler(this.itemzoomfittoscreen_Click);
//
@ -1044,9 +1030,9 @@ namespace CodeImp.DoomBuilder.Windows
this.panelinfo.Controls.Add(this.sectorinfo);
this.panelinfo.Controls.Add(this.linedefinfo);
this.panelinfo.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panelinfo.Location = new System.Drawing.Point(0, 505);
this.panelinfo.Location = new System.Drawing.Point(0, 564);
this.panelinfo.Name = "panelinfo";
this.panelinfo.Size = new System.Drawing.Size(961, 106);
this.panelinfo.Size = new System.Drawing.Size(1012, 106);
this.panelinfo.TabIndex = 4;
//
// modename
@ -1121,17 +1107,17 @@ namespace CodeImp.DoomBuilder.Windows
this.display.Dock = System.Windows.Forms.DockStyle.Fill;
this.display.Location = new System.Drawing.Point(0, 49);
this.display.Name = "display";
this.display.Size = new System.Drawing.Size(961, 456);
this.display.Size = new System.Drawing.Size(1012, 515);
this.display.TabIndex = 5;
this.display.MouseLeave += new System.EventHandler(this.display_MouseLeave);
this.display.MouseDown += new System.Windows.Forms.MouseEventHandler(this.display_MouseDown);
this.display.MouseMove += new System.Windows.Forms.MouseEventHandler(this.display_MouseMove);
this.display.MouseClick += new System.Windows.Forms.MouseEventHandler(this.display_MouseClick);
this.display.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.display_MouseDoubleClick);
this.display.Resize += new System.EventHandler(this.display_Resize);
this.display.MouseEnter += new System.EventHandler(this.display_MouseEnter);
this.display.Paint += new System.Windows.Forms.PaintEventHandler(this.display_Paint);
this.display.MouseMove += new System.Windows.Forms.MouseEventHandler(this.display_MouseMove);
this.display.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.display_MouseDoubleClick);
this.display.MouseClick += new System.Windows.Forms.MouseEventHandler(this.display_MouseClick);
this.display.MouseDown += new System.Windows.Forms.MouseEventHandler(this.display_MouseDown);
this.display.Resize += new System.EventHandler(this.display_Resize);
this.display.MouseUp += new System.Windows.Forms.MouseEventHandler(this.display_MouseUp);
this.display.MouseEnter += new System.EventHandler(this.display_MouseEnter);
//
// processor
//
@ -1149,7 +1135,7 @@ namespace CodeImp.DoomBuilder.Windows
// MainForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(961, 634);
this.ClientSize = new System.Drawing.Size(1012, 693);
this.Controls.Add(this.display);
this.Controls.Add(this.panelinfo);
this.Controls.Add(this.statusbar);
@ -1163,15 +1149,15 @@ namespace CodeImp.DoomBuilder.Windows
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "Doom Builder";
this.Deactivate += new System.EventHandler(this.MainForm_Deactivate);
this.Resize += new System.EventHandler(this.MainForm_Resize);
this.Load += new System.EventHandler(this.MainForm_Load);
this.Shown += new System.EventHandler(this.MainForm_Shown);
this.Activated += new System.EventHandler(this.MainForm_Activated);
this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.MainForm_KeyUp);
this.Move += new System.EventHandler(this.MainForm_Move);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.MainForm_KeyUp);
this.Resize += new System.EventHandler(this.MainForm_Resize);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.MainForm_KeyDown);
this.ResizeEnd += new System.EventHandler(this.MainForm_ResizeEnd);
this.Load += new System.EventHandler(this.MainForm_Load);
this.menumain.ResumeLayout(false);
this.menumain.PerformLayout();
this.toolbar.ResumeLayout(false);
@ -1266,7 +1252,6 @@ namespace CodeImp.DoomBuilder.Windows
private System.Windows.Forms.ToolStripMenuItem itemgriddec;
private System.Windows.Forms.ToolStripMenuItem itemgridsetup;
private System.Windows.Forms.Label modename;
private System.Windows.Forms.ToolStripStatusLabel warninglabel;
private System.Windows.Forms.Timer warningtimer;
private System.Windows.Forms.Timer warningflasher;
private System.Windows.Forms.ToolStripSplitButton buttontest;

View file

@ -50,6 +50,13 @@ namespace CodeImp.DoomBuilder.Windows
private const int MAX_RECENT_FILES_PIXELS = 250;
private const int WARNING_FLASH_COUNT = 5;
private enum StatusType : int
{
Ready,
Busy,
Warning
}
#endregion
#region ================== Delegates
@ -89,6 +96,7 @@ namespace CodeImp.DoomBuilder.Windows
private bool updatingfilters;
// Statusbar
private StatusType statustype;
private int warningflashcount;
private bool warningsignon;
@ -395,6 +403,8 @@ namespace CodeImp.DoomBuilder.Windows
buttongrid.Enabled = false;
configlabel.Text = "";
}
UpdateStatusIcon();
}
// This returns the current status text
@ -407,29 +417,36 @@ namespace CodeImp.DoomBuilder.Windows
public void DisplayWarning(string warning)
{
MessageBeep(MessageBeepType.Warning);
warninglabel.Spring = true;
warninglabel.Text = warning;
warninglabel.Image = Resources.Warning;
warninglabel.Visible = true;
if(statuslabel.Text != warning) statuslabel.Text = warning;
statustype = StatusType.Warning;
statuslabel.Image = Resources.Warning;
warningflashcount = 0;
warningsignon = true;
warningtimer.Stop();
warningtimer.Interval = 3000;
warningtimer.Start();
warningflasher.Start();
// Refresh if needed
statusbar.Invalidate();
this.Update();
}
// This hides any warning
public void HideWarning()
{
if(statustype == StatusType.Warning)
{
warningtimer.Stop();
warninglabel.Visible = false;
warninglabel.Spring = false;
warningflasher.Stop();
DisplayReady();
}
}
// This flashes the warning sign
private void warningflasher_Tick(object sender, EventArgs e)
{
if(statustype == StatusType.Warning)
{
// Warning sign on?
if(warningsignon)
@ -437,7 +454,7 @@ namespace CodeImp.DoomBuilder.Windows
// Turn it off or should we stop?
if(warningflashcount < WARNING_FLASH_COUNT)
{
warninglabel.Image = Resources.WarningOff;
statuslabel.Image = Resources.WarningOff;
warningsignon = false;
}
else
@ -448,11 +465,12 @@ namespace CodeImp.DoomBuilder.Windows
else
{
// Turn it on and count the flash
warninglabel.Image = Resources.Warning;
statuslabel.Image = Resources.Warning;
warningsignon = true;
warningflashcount++;
}
}
}
// Warning timed out
private void warningtimer_Tick(object sender, EventArgs e)
@ -463,10 +481,12 @@ namespace CodeImp.DoomBuilder.Windows
// This changes status text
public void DisplayStatus(string status)
{
// Hide any warning
HideWarning();
// Stop warning timers
warningtimer.Stop();
warningflasher.Stop();
// Update status description
statustype = StatusType.Busy;
if(statuslabel.Text != status)
statuslabel.Text = status;
@ -481,8 +501,21 @@ namespace CodeImp.DoomBuilder.Windows
// This changes status text to Ready
public void DisplayReady()
{
// Stop warning timers
warningtimer.Stop();
warningflasher.Stop();
// Display ready status description
DisplayStatus(STATUS_READY_TEXT);
statustype = StatusType.Ready;
if(statuslabel.Text != STATUS_READY_TEXT)
statuslabel.Text = STATUS_READY_TEXT;
// Update icon as well
UpdateStatusIcon();
// Refresh if needed
statusbar.Invalidate();
this.Update();
}
// This updates the status icon
@ -498,7 +531,7 @@ namespace CodeImp.DoomBuilder.Windows
else
{
// Ready status?
if(statuslabel.Text == STATUS_READY_TEXT)
if(statustype == StatusType.Ready)
{
// Map open?
if((General.Map != null) && (General.Map.Data != null))
@ -521,7 +554,7 @@ namespace CodeImp.DoomBuilder.Windows
statuslabel.Image = CodeImp.DoomBuilder.Properties.Resources.Status0;
}
}
else
else if(statustype == StatusType.Busy)
{
// Display busy icon
statuslabel.Image = CodeImp.DoomBuilder.Properties.Resources.Status2;

View file

@ -162,18 +162,48 @@
<metadata name="toolStripSeparator12.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="menumain.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="menumain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="toolbar.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="toolbar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>121, 17</value>
</metadata>
<metadata name="statusbar.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="statusbar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>207, 17</value>
</metadata>
<metadata name="panelinfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="modename.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="vertexinfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="thinginfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="sectorinfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="linedefinfo.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="redrawtimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>304, 17</value>
</metadata>
<metadata name="display.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="processor.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>416, 17</value>
</metadata>
@ -183,6 +213,9 @@
<metadata name="warningflasher.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>632, 17</value>
</metadata>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>