1
0
mirror of synced 2024-12-01 02:27:22 +01:00

A few more layout editor improvements

This commit is contained in:
KillzXGaming 2020-02-15 20:57:21 -05:00
parent 454268a740
commit 1a548f9f80
5 changed files with 12 additions and 2 deletions

View File

@ -100,7 +100,6 @@ namespace LayoutBXLYT
if (!mat.HasMaterialColor && mat.MatColor != STColor8.White) { if (!mat.HasMaterialColor && mat.MatColor != STColor8.White) {
mat.HasMaterialColor = true; mat.HasMaterialColor = true;
mat.Shader.Compile();
} }
} }

View File

@ -566,6 +566,10 @@ namespace LayoutBXLYT
LayoutTextureList?.LoadTextures(this, ActiveLayout, Textures); LayoutTextureList?.LoadTextures(this, ActiveLayout, Textures);
} }
public void DeselectTextureList() {
LayoutTextureList?.DeselectTextureList();
}
private void OnAnimationPlaying(object sender, EventArgs e) private void OnAnimationPlaying(object sender, EventArgs e)
{ {
if (LayoutAnimEditor != null) if (LayoutAnimEditor != null)

View File

@ -124,6 +124,10 @@ namespace LayoutBXLYT
isLoaded = true; isLoaded = true;
} }
public void DeselectTextureList() {
listViewCustom1.SelectedItems.Clear();
}
private void listViewTpyeCB_SelectedIndexChanged(object sender, EventArgs e) { private void listViewTpyeCB_SelectedIndexChanged(object sender, EventArgs e) {
if (isLoaded) if (isLoaded)
listViewCustom1.View = (View)listViewTpyeCB.SelectedItem; listViewCustom1.View = (View)listViewTpyeCB.SelectedItem;

View File

@ -1487,6 +1487,8 @@ namespace LayoutBXLYT
{ {
var item = e.Data.GetData(typeof(ListViewItem)) as ListViewItem; var item = e.Data.GetData(typeof(ListViewItem)) as ListViewItem;
string texture = item.Text; string texture = item.Text;
ParentEditor.DeselectTextureList();
if (Textures.ContainsKey(texture)) if (Textures.ContainsKey(texture))
{ {
var point = this.PointToClient(new Point(e.X, e.Y)); var point = this.PointToClient(new Point(e.X, e.Y));

View File

@ -422,7 +422,8 @@ namespace Toolbox.Library.Forms
selection = new Rectangle(rect.X,0, rect.Width, pe.ClipRectangle.Height); selection = new Rectangle(rect.X,0, rect.Width, pe.ClipRectangle.Height);
} }
pe.Graphics.DrawRectangle(new Pen(new SolidBrush(Color.Black), 1), selection); pe.Graphics.DrawRectangle(new Pen(new SolidBrush(Color.Black), 1), new Rectangle(
selection.X + 1, selection.Y + 1, selection.Width - 1, selection.Height - 1));
} }
} }
} }