mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-06-19 07:11:54 +00:00
SkinRenderer - Add 'HighlightlingColor' property
This commit is contained in:
@@ -255,6 +255,7 @@ namespace PckStudio.Forms.Editor
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: fixed outline rendering
|
||||
private void skinPartListBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
int scale = 4;
|
||||
@@ -269,7 +270,7 @@ namespace PckStudio.Forms.Editor
|
||||
GraphicsPath graphicsPath = box.GetUVGraphicsPath(new System.Numerics.Vector2(scaleSize.Width * renderer3D1.TillingFactor.X, scaleSize.Height * renderer3D1.TillingFactor.Y));
|
||||
g.ApplyConfig(_graphicsConfig);
|
||||
g.DrawImage(_skin.Model.Texture, new Rectangle(Point.Empty, scaleSize), new Rectangle(Point.Empty, _skin.Model.Texture.Size), GraphicsUnit.Pixel);
|
||||
g.DrawPath(new Pen(renderer3D1.GuideLineColor, lineWidth), graphicsPath);
|
||||
g.DrawPath(new Pen(renderer3D1.HighlightlingColor, lineWidth), graphicsPath);
|
||||
}
|
||||
uvPictureBox.Invalidate();
|
||||
}
|
||||
|
||||
@@ -82,6 +82,10 @@ namespace PckStudio.Rendering
|
||||
[Category("Appearance")]
|
||||
public Color GuideLineColor { get; set; }
|
||||
|
||||
[Description("The Color used for highlighting selected cube")]
|
||||
[Category("Appearance")]
|
||||
public Color HighlightlingColor { get; set; } = Color.Aqua;
|
||||
|
||||
public float MouseSensetivity { get; set; } = 0.01f;
|
||||
public int SelectedIndex
|
||||
{
|
||||
@@ -1181,7 +1185,7 @@ namespace PckStudio.Rendering
|
||||
Vector3 pivot = cubeMesh.Pivot + cubeMesh.Offset;
|
||||
transform = Pivot(translation, pivot, transform);
|
||||
GL.BlendFunc(BlendingFactor.DstAlpha, BlendingFactor.OneMinusSrcAlpha);
|
||||
DrawBoundingBox(transform, cubeBoundingBox, GuideLineColor);
|
||||
DrawBoundingBox(transform, cubeBoundingBox, HighlightlingColor);
|
||||
GL.BlendFunc(BlendingFactor.SrcAlpha, BlendingFactor.OneMinusSrcAlpha);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user