Fixed: slightly incorrect texture name offsets in classic view in the texture browser

This commit is contained in:
ZZYZX 2017-02-09 15:45:50 +02:00
parent fbbfaad579
commit d47dd9a533
5 changed files with 11 additions and 13 deletions

View file

@ -67,8 +67,8 @@ namespace CodeImp.DoomBuilder.Controls
this.tooltip = tooltip; //mxd this.tooltip = tooltip; //mxd
//mxd. Calculate names width //mxd. Calculate names width
this.namewidth = (int)Math.Ceiling(General.Interface.MeasureString(icon.Name, SystemFonts.MessageBoxFont, 10000, StringFormat.GenericTypographic).Width); this.namewidth = (int)Math.Ceiling(General.Interface.MeasureString(icon.Name, SystemFonts.MessageBoxFont, 10000, StringFormat.GenericTypographic).Width)+6;
this.shortnamewidth = (int)Math.Ceiling(General.Interface.MeasureString(icon.ShortName, SystemFonts.MessageBoxFont, 10000, StringFormat.GenericTypographic).Width); this.shortnamewidth = (int)Math.Ceiling(General.Interface.MeasureString(icon.ShortName, SystemFonts.MessageBoxFont, 10000, StringFormat.GenericTypographic).Width)+6;
} }
#endregion #endregion

View file

@ -969,7 +969,7 @@ namespace CodeImp.DoomBuilder.Rendering
if(General.Map.VisualCamera.Sector != null) if(General.Map.VisualCamera.Sector != null)
{ {
// If the camera is inside a sector, compare z coordinates // If the camera is inside a sector, compare z coordinates
translucentgeo.Sort(delegate(VisualGeometry vg1, VisualGeometry vg2) geopass.Sort(delegate(VisualGeometry vg1, VisualGeometry vg2)
{ {
if(vg1 == vg2) return 0; if(vg1 == vg2) return 0;
float camdist1, camdist2; float camdist1, camdist2;
@ -999,7 +999,7 @@ namespace CodeImp.DoomBuilder.Rendering
} }
else else
{ {
translucentgeo.Sort(delegate(VisualGeometry vg1, VisualGeometry vg2) geopass.Sort(delegate(VisualGeometry vg1, VisualGeometry vg2)
{ {
if(vg1 == vg2) return 0; if(vg1 == vg2) return 0;
return (int)((General.Map.VisualCamera.Position - vg2.BoundingBox[0]).GetLengthSq() return (int)((General.Map.VisualCamera.Position - vg2.BoundingBox[0]).GetLengthSq()

View file

@ -112,9 +112,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
base.Texture = General.Map.Data.UnknownTexture3D; base.Texture = General.Map.Data.UnknownTexture3D;
setuponloadedtexture = Sidedef.LongLowTexture; setuponloadedtexture = Sidedef.LongLowTexture;
} }
else else if (!base.Texture.IsImageLoaded)
{ {
if(!base.Texture.IsImageLoaded)
setuponloadedtexture = Sidedef.LongLowTexture; setuponloadedtexture = Sidedef.LongLowTexture;
} }
} }

View file

@ -113,9 +113,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
base.Texture = General.Map.Data.UnknownTexture3D; base.Texture = General.Map.Data.UnknownTexture3D;
setuponloadedtexture = Sidedef.LongHighTexture; setuponloadedtexture = Sidedef.LongHighTexture;
} }
else else if (!base.Texture.IsImageLoaded)
{ {
if(!base.Texture.IsImageLoaded)
setuponloadedtexture = Sidedef.LongHighTexture; setuponloadedtexture = Sidedef.LongHighTexture;
} }
} }