diff --git a/Build/Configurations/Includes/Doom2_things.cfg b/Build/Configurations/Includes/Doom2_things.cfg index bfb26d31..c318e1cd 100644 --- a/Build/Configurations/Includes/Doom2_things.cfg +++ b/Build/Configurations/Includes/Doom2_things.cfg @@ -106,6 +106,7 @@ monsters 87 { title = "Monsters Target"; + sprite = "internal:Target"; height = 32; } } diff --git a/Build/Configurations/Includes/ZDoom_things.cfg b/Build/Configurations/Includes/ZDoom_things.cfg index c696f472..c851f1f8 100644 --- a/Build/Configurations/Includes/ZDoom_things.cfg +++ b/Build/Configurations/Includes/ZDoom_things.cfg @@ -787,7 +787,11 @@ zdoom title = "Map Spot (gravity)"; sprite = "internal:MapSpotGravity"; } - 9076 = "Hate target"; + 9076 + { + title = "Hate target"; + sprite = "internal:Target"; + } 9988 { title = "Custom Sprite"; diff --git a/Build/Sprites/Target.png b/Build/Sprites/Target.png new file mode 100644 index 00000000..1637d171 Binary files /dev/null and b/Build/Sprites/Target.png differ diff --git a/Source/Core/GZBuilder/GZGeneral.cs b/Source/Core/GZBuilder/GZGeneral.cs index ecb79dc7..89628783 100644 --- a/Source/Core/GZBuilder/GZGeneral.cs +++ b/Source/Core/GZBuilder/GZGeneral.cs @@ -33,7 +33,7 @@ namespace CodeImp.DoomBuilder.GZBuilder //version public const float Version = 1.12f; - public const char Revision = 'f'; + public const char Revision = 'g'; //debug console #if DEBUG diff --git a/Source/Core/Windows/TextureBrowserForm.cs b/Source/Core/Windows/TextureBrowserForm.cs index e9429949..cffc1141 100644 --- a/Source/Core/Windows/TextureBrowserForm.cs +++ b/Source/Core/Windows/TextureBrowserForm.cs @@ -62,6 +62,11 @@ namespace CodeImp.DoomBuilder.Windows // Initialize InitializeComponent(); + + //mxd. Set title + string imgType = (browseFlats ? "flats" : "textures"); + this.Text = "Browse " + imgType; + browser.ApplySettings(); // Update the used textures @@ -69,8 +74,12 @@ namespace CodeImp.DoomBuilder.Windows tvTextureSets.BeginUpdate();//mxd - //mxd. Set title - this.Text = "Browse " + (browseFlats ? "flats" : "textures"); + // Texture to select when list is filled + selecttextureonfill = selecttexture; + + // Make groups + usedgroup = browser.AddGroup("Used " + imgType + ":"); + availgroup = browser.AddGroup("Available " + imgType + ":"); //mxd. Fill texture sets list with normal texture sets foreach(IFilledTextureSet ts in General.Map.Data.TextureSets) @@ -90,17 +99,8 @@ namespace CodeImp.DoomBuilder.Windows item.ImageIndex = 2 + ts.Location.type; item.SelectedImageIndex = item.ImageIndex; - if (ts.Location.type != DataLocation.RESOURCE_WAD) { + if (ts.Location.type != DataLocation.RESOURCE_WAD) createNodes(item); - - /*if (item.Nodes.Count > 1) { //sort them - TreeNode[] children = new TreeNode[item.Nodes.Count]; - item.Nodes.CopyTo(children, 0); - Array.Sort(children, sortTreeNodes); - item.Nodes.Clear(); - item.Nodes.AddRange(children); - }*/ - } } //mxd. Add All textures set @@ -116,6 +116,7 @@ namespace CodeImp.DoomBuilder.Windows TreeNode match = findNodeByName(tvTextureSets.Nodes, selectname); if (match != null) { IFilledTextureSet set = (match.Tag as IFilledTextureSet); + foreach (ImageData img in set.Textures) { if (img.LongName == longname) { selectedset = match; @@ -142,20 +143,22 @@ namespace CodeImp.DoomBuilder.Windows if (selectedset != null) {//mxd tvTextureSets.SelectedNode = selectedset; - FillImagesList(); + //FillImagesList(); } // Texture to select when list is filled - selecttextureonfill = selecttexture; + //selecttextureonfill = selecttexture; // Make groups - usedgroup = browser.AddGroup("Used Textures"); - availgroup = browser.AddGroup("Available Textures"); - + //usedgroup = browser.AddGroup("Used Textures"); + //availgroup = browser.AddGroup("Available Textures"); + // Keep last position and size lastposition = this.Location; lastsize = this.Size; - + + this.SuspendLayout(); + // Position window from configuration settings this.Size = new Size(General.Settings.ReadSetting("browserwindow.sizewidth", this.Size.Width), General.Settings.ReadSetting("browserwindow.sizeheight", this.Size.Height)); @@ -184,6 +187,7 @@ namespace CodeImp.DoomBuilder.Windows //then - in current node IFilledTextureSet set = (node.Tag as IFilledTextureSet); + foreach (ImageData img in set.Textures) { if (img.LongName == longname) return node; @@ -453,7 +457,10 @@ namespace CodeImp.DoomBuilder.Windows private void TextureBrowserForm_Shown(object sender, EventArgs e) { - // Select texture + if (selectedset != null) //mxd. Calling FillImagesList() from constructor leads to TERRIBLE load times. Why? I have no sodding idea... + FillImagesList(); + + // Select texture if(!string.IsNullOrEmpty(selecttextureonfill)) { browser.SelectItem(selecttextureonfill, usedgroup); diff --git a/Source/Core/Windows/TextureBrowserForm.resx b/Source/Core/Windows/TextureBrowserForm.resx index 4af846d8..803f7c60 100644 --- a/Source/Core/Windows/TextureBrowserForm.resx +++ b/Source/Core/Windows/TextureBrowserForm.resx @@ -131,7 +131,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAc - DwAAAk1TRnQBSQFMAgEBBwEAAVQBAAFUAQABEAEAARYBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + DwAAAk1TRnQBSQFMAgEBBwEAAWQBAAFkAQABEAEAARYBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAASwDAAEBAQABCAYAAQsYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA