mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-26 05:41:45 +00:00
Fixed severe lags during Texture Browser opening when resource wad for current texture had lots of textures.
Texture groups weren't created properly in soma cases. Added Monster/Hate Target sprite.
This commit is contained in:
parent
ddeeadf574
commit
f2b42d1329
6 changed files with 34 additions and 22 deletions
|
@ -106,6 +106,7 @@ monsters
|
|||
87
|
||||
{
|
||||
title = "Monsters Target";
|
||||
sprite = "internal:Target";
|
||||
height = 32;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
|
|
BIN
Build/Sprites/Target.png
Normal file
BIN
Build/Sprites/Target.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 236 B |
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -131,7 +131,7 @@
|
|||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAc
|
||||
DwAAAk1TRnQBSQFMAgEBBwEAAVQBAAFUAQABEAEAARYBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
DwAAAk1TRnQBSQFMAgEBBwEAAWQBAAFkAQABEAEAARYBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAASwDAAEBAQABCAYAAQsYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
|
|
Loading…
Reference in a new issue