1
0
mirror of synced 2025-01-19 01:14:08 +01:00

Fix error dialog label size

This commit is contained in:
KillzXGaming 2019-06-01 15:16:39 -04:00
parent 4d7171605b
commit 60a1e52dfe
9 changed files with 39 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View File

@ -176,10 +176,13 @@ namespace Bfres.Structs
uvMenu.DropDownItems.Add(new ToolStripMenuItem("Flip (Vertical)", null, FlipUvsVertical));
uvMenu.DropDownItems.Add(new ToolStripMenuItem("Flip (Horizontal)", null, FlipUvsHorizontal));
uvMenu.DropDownItems.Add(new ToolStripMenuItem("Copy Channel", null, CopyUVChannelAction));
// uvMenu.DropDownItems.Add(new ToolStripMenuItem("Unwrap By Position", null, UVUnwrapPosition));
ContextMenuStrip.Items.Add(uvMenu);
ToolStripMenuItem normalsMenu = new ToolStripMenuItem("Normals");
normalsMenu.DropDownItems.Add(new ToolStripMenuItem("Smooth", null, SmoothNormals));
normalsMenu.DropDownItems.Add(new ToolStripMenuItem("Invert", null, InvertNormals));
normalsMenu.DropDownItems.Add(new ToolStripMenuItem("Recalculate", null, RecalculateNormals));
ContextMenuStrip.Items.Add(normalsMenu);
@ -235,6 +238,16 @@ namespace Bfres.Structs
{
((BFRES)Parent.Parent.Parent.Parent).LoadEditors(this);
}
private void UVUnwrapPosition(object sender, EventArgs args)
{
Cursor.Current = Cursors.WaitCursor;
UVUnwrapPosition();
SaveVertexBuffer(GetResFileU() != null);
UpdateVertexData();
Cursor.Current = Cursors.Default;
}
private void SmoothNormals(object sender, EventArgs args)
{
Cursor.Current = Cursors.WaitCursor;
@ -244,6 +257,15 @@ namespace Bfres.Structs
Cursor.Current = Cursors.Default;
}
private void InvertNormals(object sender, EventArgs args)
{
Cursor.Current = Cursors.WaitCursor;
InvertNormals();
SaveVertexBuffer(GetResFileU() != null);
UpdateVertexData();
Cursor.Current = Cursors.Default;
}
private void GenerateBoundingBoxes(object sender, EventArgs args)
{
Cursor.Current = Cursors.WaitCursor;

View File

@ -81,10 +81,10 @@
//
this.lblMessage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblMessage.Location = new System.Drawing.Point(52, 12);
this.lblMessage.Location = new System.Drawing.Point(52, 9);
this.lblMessage.MaximumSize = new System.Drawing.Size(310, 0);
this.lblMessage.Name = "lblMessage";
this.lblMessage.Size = new System.Drawing.Size(288, 37);
this.lblMessage.Size = new System.Drawing.Size(288, 40);
this.lblMessage.TabIndex = 5;
this.lblMessage.Text = "label1";
//

View File

@ -373,6 +373,21 @@ namespace Switch_Toolbox.Library
}
}
public void InvertNormals()
{
foreach (Vertex v in vertices)
{
v.nrm = new Vector3(-1 * v.nrm.X, -1 * v.nrm.Y, -1 * v.nrm.Z);
}
}
public void UVUnwrapPosition()
{
foreach (Vertex v in vertices)
{
}
}
public void CalculateNormals()
{
if (vertices.Count < 3)