mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-02-16 17:11:28 +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
|
87
|
||||||
{
|
{
|
||||||
title = "Monsters Target";
|
title = "Monsters Target";
|
||||||
|
sprite = "internal:Target";
|
||||||
height = 32;
|
height = 32;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -787,7 +787,11 @@ zdoom
|
||||||
title = "Map Spot (gravity)";
|
title = "Map Spot (gravity)";
|
||||||
sprite = "internal:MapSpotGravity";
|
sprite = "internal:MapSpotGravity";
|
||||||
}
|
}
|
||||||
9076 = "Hate target";
|
9076
|
||||||
|
{
|
||||||
|
title = "Hate target";
|
||||||
|
sprite = "internal:Target";
|
||||||
|
}
|
||||||
9988
|
9988
|
||||||
{
|
{
|
||||||
title = "Custom Sprite";
|
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
|
//version
|
||||||
public const float Version = 1.12f;
|
public const float Version = 1.12f;
|
||||||
public const char Revision = 'f';
|
public const char Revision = 'g';
|
||||||
|
|
||||||
//debug console
|
//debug console
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
|
|
@ -62,6 +62,11 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
|
|
||||||
// Initialize
|
// Initialize
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
//mxd. Set title
|
||||||
|
string imgType = (browseFlats ? "flats" : "textures");
|
||||||
|
this.Text = "Browse " + imgType;
|
||||||
|
|
||||||
browser.ApplySettings();
|
browser.ApplySettings();
|
||||||
|
|
||||||
// Update the used textures
|
// Update the used textures
|
||||||
|
@ -69,8 +74,12 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
|
|
||||||
tvTextureSets.BeginUpdate();//mxd
|
tvTextureSets.BeginUpdate();//mxd
|
||||||
|
|
||||||
//mxd. Set title
|
// Texture to select when list is filled
|
||||||
this.Text = "Browse " + (browseFlats ? "flats" : "textures");
|
selecttextureonfill = selecttexture;
|
||||||
|
|
||||||
|
// Make groups
|
||||||
|
usedgroup = browser.AddGroup("Used " + imgType + ":");
|
||||||
|
availgroup = browser.AddGroup("Available " + imgType + ":");
|
||||||
|
|
||||||
//mxd. Fill texture sets list with normal texture sets
|
//mxd. Fill texture sets list with normal texture sets
|
||||||
foreach(IFilledTextureSet ts in General.Map.Data.TextureSets)
|
foreach(IFilledTextureSet ts in General.Map.Data.TextureSets)
|
||||||
|
@ -90,17 +99,8 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
item.ImageIndex = 2 + ts.Location.type;
|
item.ImageIndex = 2 + ts.Location.type;
|
||||||
item.SelectedImageIndex = item.ImageIndex;
|
item.SelectedImageIndex = item.ImageIndex;
|
||||||
|
|
||||||
if (ts.Location.type != DataLocation.RESOURCE_WAD) {
|
if (ts.Location.type != DataLocation.RESOURCE_WAD)
|
||||||
createNodes(item);
|
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
|
//mxd. Add All textures set
|
||||||
|
@ -116,6 +116,7 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
TreeNode match = findNodeByName(tvTextureSets.Nodes, selectname);
|
TreeNode match = findNodeByName(tvTextureSets.Nodes, selectname);
|
||||||
if (match != null) {
|
if (match != null) {
|
||||||
IFilledTextureSet set = (match.Tag as IFilledTextureSet);
|
IFilledTextureSet set = (match.Tag as IFilledTextureSet);
|
||||||
|
|
||||||
foreach (ImageData img in set.Textures) {
|
foreach (ImageData img in set.Textures) {
|
||||||
if (img.LongName == longname) {
|
if (img.LongName == longname) {
|
||||||
selectedset = match;
|
selectedset = match;
|
||||||
|
@ -142,20 +143,22 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
|
|
||||||
if (selectedset != null) {//mxd
|
if (selectedset != null) {//mxd
|
||||||
tvTextureSets.SelectedNode = selectedset;
|
tvTextureSets.SelectedNode = selectedset;
|
||||||
FillImagesList();
|
//FillImagesList();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Texture to select when list is filled
|
// Texture to select when list is filled
|
||||||
selecttextureonfill = selecttexture;
|
//selecttextureonfill = selecttexture;
|
||||||
|
|
||||||
// Make groups
|
// Make groups
|
||||||
usedgroup = browser.AddGroup("Used Textures");
|
//usedgroup = browser.AddGroup("Used Textures");
|
||||||
availgroup = browser.AddGroup("Available Textures");
|
//availgroup = browser.AddGroup("Available Textures");
|
||||||
|
|
||||||
// Keep last position and size
|
// Keep last position and size
|
||||||
lastposition = this.Location;
|
lastposition = this.Location;
|
||||||
lastsize = this.Size;
|
lastsize = this.Size;
|
||||||
|
|
||||||
|
this.SuspendLayout();
|
||||||
|
|
||||||
// Position window from configuration settings
|
// Position window from configuration settings
|
||||||
this.Size = new Size(General.Settings.ReadSetting("browserwindow.sizewidth", this.Size.Width),
|
this.Size = new Size(General.Settings.ReadSetting("browserwindow.sizewidth", this.Size.Width),
|
||||||
General.Settings.ReadSetting("browserwindow.sizeheight", this.Size.Height));
|
General.Settings.ReadSetting("browserwindow.sizeheight", this.Size.Height));
|
||||||
|
@ -184,6 +187,7 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
|
|
||||||
//then - in current node
|
//then - in current node
|
||||||
IFilledTextureSet set = (node.Tag as IFilledTextureSet);
|
IFilledTextureSet set = (node.Tag as IFilledTextureSet);
|
||||||
|
|
||||||
foreach (ImageData img in set.Textures) {
|
foreach (ImageData img in set.Textures) {
|
||||||
if (img.LongName == longname)
|
if (img.LongName == longname)
|
||||||
return node;
|
return node;
|
||||||
|
@ -453,7 +457,10 @@ namespace CodeImp.DoomBuilder.Windows
|
||||||
|
|
||||||
private void TextureBrowserForm_Shown(object sender, EventArgs e)
|
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))
|
if(!string.IsNullOrEmpty(selecttextureonfill))
|
||||||
{
|
{
|
||||||
browser.SelectItem(selecttextureonfill, usedgroup);
|
browser.SelectItem(selecttextureonfill, usedgroup);
|
||||||
|
|
|
@ -131,7 +131,7 @@
|
||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
|
||||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAc
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZ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