- made the images in texture browsers fixed size and smaller

- texture set without any texture names will not match anything
This commit is contained in:
codeimp 2008-10-01 17:35:34 +00:00
parent fbe1dac0c6
commit 6f23292b8c
8 changed files with 50 additions and 63 deletions

View file

@ -130,6 +130,9 @@ namespace CodeImp.DoomBuilder.Config
regexstr.Append(")");
}
// No filters added? Then make a never-matching regex
if(this.filters.Count == 0) regexstr.Append("\\Z\\A");
// Make the regex
regex = new Regex(regexstr.ToString(), RegexOptions.Compiled |
RegexOptions.CultureInvariant);

View file

@ -31,11 +31,10 @@ namespace CodeImp.DoomBuilder.Controls
{
this.components = new System.ComponentModel.Container();
this.splitter = new System.Windows.Forms.SplitContainer();
this.list = new CodeImp.DoomBuilder.Controls.OptimizedListView();
this.images = new System.Windows.Forms.ImageList(this.components);
this.objectname = new System.Windows.Forms.TextBox();
this.label = new System.Windows.Forms.Label();
this.refreshtimer = new System.Windows.Forms.Timer(this.components);
this.list = new CodeImp.DoomBuilder.Controls.OptimizedListView();
this.splitter.Panel1.SuspendLayout();
this.splitter.Panel2.SuspendLayout();
this.splitter.SuspendLayout();
@ -63,29 +62,6 @@ namespace CodeImp.DoomBuilder.Controls
this.splitter.TabIndex = 0;
this.splitter.TabStop = false;
//
// list
//
this.list.Dock = System.Windows.Forms.DockStyle.Fill;
this.list.LargeImageList = this.images;
this.list.Location = new System.Drawing.Point(0, 0);
this.list.MultiSelect = false;
this.list.Name = "list";
this.list.OwnerDraw = true;
this.list.ShowItemToolTips = true;
this.list.Size = new System.Drawing.Size(518, 312);
this.list.Sorting = System.Windows.Forms.SortOrder.Ascending;
this.list.TabIndex = 1;
this.list.UseCompatibleStateImageBehavior = false;
this.list.DrawItem += new System.Windows.Forms.DrawListViewItemEventHandler(this.list_DrawItem);
this.list.DoubleClick += new System.EventHandler(this.list_DoubleClick);
this.list.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.list_ItemSelectionChanged);
//
// images
//
this.images.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
this.images.ImageSize = new System.Drawing.Size(40, 64);
this.images.TransparentColor = System.Drawing.Color.Transparent;
//
// objectname
//
this.objectname.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
@ -110,6 +86,25 @@ namespace CodeImp.DoomBuilder.Controls
this.refreshtimer.Interval = 500;
this.refreshtimer.Tick += new System.EventHandler(this.refreshtimer_Tick);
//
// list
//
this.list.Dock = System.Windows.Forms.DockStyle.Fill;
this.list.HideSelection = false;
this.list.Location = new System.Drawing.Point(0, 0);
this.list.MultiSelect = false;
this.list.Name = "list";
this.list.OwnerDraw = true;
this.list.ShowItemToolTips = true;
this.list.Size = new System.Drawing.Size(518, 312);
this.list.Sorting = System.Windows.Forms.SortOrder.Ascending;
this.list.TabIndex = 1;
this.list.TileSize = new System.Drawing.Size(90, 90);
this.list.UseCompatibleStateImageBehavior = false;
this.list.View = System.Windows.Forms.View.Tile;
this.list.DrawItem += new System.Windows.Forms.DrawListViewItemEventHandler(this.list_DrawItem);
this.list.DoubleClick += new System.EventHandler(this.list_DoubleClick);
this.list.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.list_ItemSelectionChanged);
//
// ImageBrowserControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 14F);
@ -130,7 +125,6 @@ namespace CodeImp.DoomBuilder.Controls
private System.Windows.Forms.SplitContainer splitter;
private OptimizedListView list;
private System.Windows.Forms.ImageList images;
private System.Windows.Forms.Timer refreshtimer;
private System.Windows.Forms.TextBox objectname;
private System.Windows.Forms.Label label;

View file

@ -39,7 +39,7 @@ namespace CodeImp.DoomBuilder.Controls
internal partial class ImageBrowserControl : UserControl
{
#region ================== Constants
#endregion
#region ================== Delegates / Events
@ -83,7 +83,7 @@ namespace CodeImp.DoomBuilder.Controls
// Initialize
InitializeComponent();
items = new List<ImageBrowserItem>();
// Move textbox with label
objectname.Left = label.Right + label.Margin.Right + objectname.Margin.Left;
}

View file

@ -123,9 +123,6 @@
<metadata name="list.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="images.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="objectname.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>

View file

@ -46,7 +46,7 @@ namespace CodeImp.DoomBuilder.Windows
this.browser.Location = new System.Drawing.Point(187, 9);
this.browser.Name = "browser";
this.browser.PreventSelection = false;
this.browser.Size = new System.Drawing.Size(525, 457);
this.browser.Size = new System.Drawing.Size(589, 457);
this.browser.TabIndex = 0;
this.browser.SelectedItemChanged += new CodeImp.DoomBuilder.Controls.ImageBrowserControl.SelectedItemChangedDelegate(this.browser_SelectedItemChanged);
//
@ -54,7 +54,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancel.Location = new System.Drawing.Point(612, 443);
this.cancel.Location = new System.Drawing.Point(676, 443);
this.cancel.Name = "cancel";
this.cancel.Size = new System.Drawing.Size(100, 25);
this.cancel.TabIndex = 22;
@ -65,7 +65,7 @@ namespace CodeImp.DoomBuilder.Windows
// apply
//
this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.apply.Location = new System.Drawing.Point(506, 443);
this.apply.Location = new System.Drawing.Point(570, 443);
this.apply.Name = "apply";
this.apply.Size = new System.Drawing.Size(100, 25);
this.apply.TabIndex = 21;
@ -99,7 +99,7 @@ namespace CodeImp.DoomBuilder.Windows
this.AcceptButton = this.apply;
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.CancelButton = this.cancel;
this.ClientSize = new System.Drawing.Size(724, 478);
this.ClientSize = new System.Drawing.Size(788, 478);
this.Controls.Add(this.texturesets);
this.Controls.Add(this.cancel);
this.Controls.Add(this.apply);
@ -114,11 +114,11 @@ namespace CodeImp.DoomBuilder.Windows
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Browse Flats";
this.Load += new System.EventHandler(this.FlatBrowserForm_Load);
this.Activated += new System.EventHandler(this.FlatBrowserForm_Activated);
this.Move += new System.EventHandler(this.FlatBrowserForm_Move);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FlatBrowserForm_FormClosing);
this.ResizeEnd += new System.EventHandler(this.FlatBrowserForm_ResizeEnd);
this.Load += new System.EventHandler(this.FlatBrowserForm_Load);
this.ResumeLayout(false);
}

View file

@ -46,7 +46,7 @@ namespace CodeImp.DoomBuilder.Windows
this.browser.Location = new System.Drawing.Point(187, 9);
this.browser.Name = "browser";
this.browser.PreventSelection = false;
this.browser.Size = new System.Drawing.Size(525, 457);
this.browser.Size = new System.Drawing.Size(589, 457);
this.browser.TabIndex = 0;
this.browser.SelectedItemChanged += new CodeImp.DoomBuilder.Controls.ImageBrowserControl.SelectedItemChangedDelegate(this.browser_SelectedItemChanged);
//
@ -54,7 +54,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancel.Location = new System.Drawing.Point(612, 443);
this.cancel.Location = new System.Drawing.Point(676, 443);
this.cancel.Name = "cancel";
this.cancel.Size = new System.Drawing.Size(100, 25);
this.cancel.TabIndex = 22;
@ -65,7 +65,7 @@ namespace CodeImp.DoomBuilder.Windows
// apply
//
this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.apply.Location = new System.Drawing.Point(506, 443);
this.apply.Location = new System.Drawing.Point(570, 443);
this.apply.Name = "apply";
this.apply.Size = new System.Drawing.Size(100, 25);
this.apply.TabIndex = 21;
@ -99,7 +99,7 @@ namespace CodeImp.DoomBuilder.Windows
this.AcceptButton = this.apply;
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.CancelButton = this.cancel;
this.ClientSize = new System.Drawing.Size(724, 478);
this.ClientSize = new System.Drawing.Size(788, 478);
this.Controls.Add(this.texturesets);
this.Controls.Add(this.cancel);
this.Controls.Add(this.apply);
@ -114,11 +114,11 @@ namespace CodeImp.DoomBuilder.Windows
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Browse Textures";
this.Load += new System.EventHandler(this.TextureBrowserForm_Load);
this.Activated += new System.EventHandler(this.TextureBrowserForm_Activated);
this.Move += new System.EventHandler(this.TextureBrowserForm_Move);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.TextureBrowserForm_FormClosing);
this.ResizeEnd += new System.EventHandler(this.TextureBrowserForm_ResizeEnd);
this.Load += new System.EventHandler(this.TextureBrowserForm_Load);
this.ResumeLayout(false);
}

View file

@ -117,19 +117,4 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="browser.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="cancel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="apply.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="texturesets.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>

View file

@ -81,9 +81,9 @@ namespace CodeImp.DoomBuilder.Windows
this.filters.TabIndex = 2;
this.filters.UseCompatibleStateImageBehavior = false;
this.filters.View = System.Windows.Forms.View.Details;
this.filters.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.filters_AfterLabelEdit);
this.filters.SelectedIndexChanged += new System.EventHandler(this.filters_SelectedIndexChanged);
this.filters.DoubleClick += new System.EventHandler(this.filters_DoubleClick);
this.filters.SelectedIndexChanged += new System.EventHandler(this.filters_SelectedIndexChanged);
this.filters.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.filters_AfterLabelEdit);
//
// filtercolumn
//
@ -120,7 +120,7 @@ namespace CodeImp.DoomBuilder.Windows
// apply
//
this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.apply.Location = new System.Drawing.Point(397, 418);
this.apply.Location = new System.Drawing.Point(414, 418);
this.apply.Name = "apply";
this.apply.Size = new System.Drawing.Size(105, 25);
this.apply.TabIndex = 6;
@ -132,7 +132,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancel.Location = new System.Drawing.Point(508, 418);
this.cancel.Location = new System.Drawing.Point(525, 418);
this.cancel.Name = "cancel";
this.cancel.Size = new System.Drawing.Size(105, 25);
this.cancel.TabIndex = 7;
@ -163,6 +163,8 @@ namespace CodeImp.DoomBuilder.Windows
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.groupBox1.Controls.Add(this.removefilter);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.addfilter);
@ -183,13 +185,16 @@ namespace CodeImp.DoomBuilder.Windows
//
// groupBox2
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.nomatchesbutton);
this.groupBox2.Controls.Add(this.matchesbutton);
this.groupBox2.Controls.Add(this.noresultlabel);
this.groupBox2.Controls.Add(this.matcheslist);
this.groupBox2.Location = new System.Drawing.Point(298, 60);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(315, 333);
this.groupBox2.Size = new System.Drawing.Size(332, 333);
this.groupBox2.TabIndex = 11;
this.groupBox2.TabStop = false;
this.groupBox2.Text = " Results ";
@ -231,13 +236,16 @@ namespace CodeImp.DoomBuilder.Windows
//
// matcheslist
//
this.matcheslist.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.matcheslist.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.matcheslist.HideInputBox = true;
this.matcheslist.LabelText = "Select or type object name:";
this.matcheslist.Location = new System.Drawing.Point(18, 55);
this.matcheslist.Name = "matcheslist";
this.matcheslist.PreventSelection = true;
this.matcheslist.Size = new System.Drawing.Size(281, 258);
this.matcheslist.Size = new System.Drawing.Size(298, 258);
this.matcheslist.TabIndex = 10;
this.matcheslist.SelectedItemDoubleClicked += new CodeImp.DoomBuilder.Controls.ImageBrowserControl.SelectedItemDoubleClickDelegate(this.matcheslist_SelectedItemDoubleClicked);
//
@ -246,7 +254,7 @@ namespace CodeImp.DoomBuilder.Windows
this.AcceptButton = this.apply;
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.CancelButton = this.cancel;
this.ClientSize = new System.Drawing.Size(625, 455);
this.ClientSize = new System.Drawing.Size(642, 455);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.cancel);
this.Controls.Add(this.apply);