Skip to content

Commit

Permalink
CustomSkinEditor - Load render settings when 'OnLoad' is called
Browse files Browse the repository at this point in the history
  • Loading branch information
NessieHax committed Aug 5, 2024
1 parent d0ffbcc commit ba7a2fb
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions PCK-Studio/Forms/Editor/CustomSkinEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ protected override void OnLoad(EventArgs e)
if (_skin.HasCape)
renderer3D1.CapeTexture = _skin.CapeTexture;
LoadModelData();
LoadRenderSettings();
}

private void LoadModelData()
Expand Down Expand Up @@ -456,18 +457,18 @@ void AddSetting<T>(string name, string displayName, T value)

RenderSettings renderSettings = new RenderSettings();

private void renderSettingsButton_Click(object sender, EventArgs e)
{
using AppSettingsForm settingsForm = new AppSettingsForm("Render Settings", renderSettings);
settingsForm.ShowDialog();
LoadRenderSettings(renderSettings);
}

private void LoadRenderSettings(RenderSettings renderSettings)
private void LoadRenderSettings()
{
renderer3D1.Animate = renderSettings.ShouldAnimate;
renderer3D1.LockMousePosition = renderSettings.LockMouse;
outlineColorButton.Visible = renderer3D1.ShowGuideLines = renderSettings.ShowGuidelines;
}

private void renderSettingsButton_Click(object sender, EventArgs e)
{
using AppSettingsForm settingsForm = new AppSettingsForm("Render Settings", renderSettings);
settingsForm.ShowDialog();
LoadRenderSettings();
}
}
}

0 comments on commit ba7a2fb

Please sign in to comment.