mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-06-01 19:04:50 +00:00
Merge branch 'main' of https://github.com/PhoenixARC/-PCK-Studio
This commit is contained in:
@@ -14,5 +14,19 @@ namespace PckStudio.Classes.Utils.ARC
|
||||
stream.Seek(0, SeekOrigin.Begin);
|
||||
writer.WriteToStream(stream);
|
||||
}
|
||||
|
||||
public static bool ContainsFile(Stream stream, string filepath)
|
||||
{
|
||||
var reader = new ARCFileReader();
|
||||
var archive = reader.FromStream(stream);
|
||||
return archive.ContainsKey(filepath);
|
||||
}
|
||||
|
||||
public static void Remove(Stream stream, string filepath)
|
||||
{
|
||||
var reader = new ARCFileReader();
|
||||
var archive = reader.FromStream(stream);
|
||||
archive.Remove(filepath);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,110 +0,0 @@
|
||||
namespace PckStudio
|
||||
{
|
||||
partial class MipMapPrompt
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MipMapPrompt));
|
||||
this.TextLabel = new System.Windows.Forms.Label();
|
||||
this.CancelBtn = new System.Windows.Forms.Button();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// TextLabel
|
||||
//
|
||||
resources.ApplyResources(this.TextLabel, "TextLabel");
|
||||
this.TextLabel.ForeColor = System.Drawing.Color.White;
|
||||
this.TextLabel.Name = "TextLabel";
|
||||
//
|
||||
// CancelButton
|
||||
//
|
||||
resources.ApplyResources(this.CancelBtn, "CancelButton");
|
||||
this.CancelBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.CancelBtn.Name = "CancelButton";
|
||||
this.CancelBtn.UseVisualStyleBackColor = true;
|
||||
this.CancelBtn.Click += new System.EventHandler(this.CancelButton_Click);
|
||||
//
|
||||
// button1
|
||||
//
|
||||
resources.ApplyResources(this.button1, "button1");
|
||||
this.button1.ForeColor = System.Drawing.Color.White;
|
||||
this.button1.Name = "button1";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.OKBtn_Click);
|
||||
//
|
||||
// numericUpDown1
|
||||
//
|
||||
resources.ApplyResources(this.numericUpDown1, "numericUpDown1");
|
||||
this.numericUpDown1.Maximum = new decimal(new int[] {
|
||||
4,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numericUpDown1.Minimum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numericUpDown1.Name = "numericUpDown1";
|
||||
this.numericUpDown1.Value = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
//
|
||||
// MipMapPrompt
|
||||
//
|
||||
this.AcceptButton = this.CancelBtn;
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.numericUpDown1);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.CancelBtn);
|
||||
this.Controls.Add(this.TextLabel);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "MipMapPrompt";
|
||||
this.Resizable = false;
|
||||
this.ShadowType = MetroFramework.Forms.MetroFormShadowType.DropShadow;
|
||||
this.Style = MetroFramework.MetroColorStyle.Silver;
|
||||
this.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
public System.Windows.Forms.Button CancelBtn;
|
||||
public System.Windows.Forms.Label TextLabel;
|
||||
public System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.NumericUpDown numericUpDown1;
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using MetroFramework.Forms;
|
||||
|
||||
namespace PckStudio
|
||||
{
|
||||
public partial class MipMapPrompt : MetroForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Text entered <c>only access when DialogResult == DialogResult.OK</c>
|
||||
/// </summary>
|
||||
public int Levels => (int)numericUpDown1.Value;
|
||||
|
||||
public MipMapPrompt()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void OKBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
private void CancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
}
|
||||
}
|
||||
}
|
||||
95
PCK-Studio/Forms/Additional-Popups/NumericPrompt.Designer.cs
generated
Normal file
95
PCK-Studio/Forms/Additional-Popups/NumericPrompt.Designer.cs
generated
Normal file
@@ -0,0 +1,95 @@
|
||||
namespace PckStudio
|
||||
{
|
||||
partial class NumericPrompt
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NumericPrompt));
|
||||
this.TextLabel = new System.Windows.Forms.Label();
|
||||
this.OKButton = new System.Windows.Forms.Button();
|
||||
this.ContextLabel = new MetroFramework.Controls.MetroLabel();
|
||||
this.ValueUpDown = new System.Windows.Forms.NumericUpDown();
|
||||
((System.ComponentModel.ISupportInitialize)(this.ValueUpDown)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// TextLabel
|
||||
//
|
||||
resources.ApplyResources(this.TextLabel, "TextLabel");
|
||||
this.TextLabel.ForeColor = System.Drawing.Color.White;
|
||||
this.TextLabel.Name = "TextLabel";
|
||||
//
|
||||
// OKButton
|
||||
//
|
||||
resources.ApplyResources(this.OKButton, "OKButton");
|
||||
this.OKButton.ForeColor = System.Drawing.Color.White;
|
||||
this.OKButton.Name = "OKButton";
|
||||
this.OKButton.UseVisualStyleBackColor = true;
|
||||
this.OKButton.Click += new System.EventHandler(this.OKBtn_Click);
|
||||
//
|
||||
// contextLabel
|
||||
//
|
||||
resources.ApplyResources(this.ContextLabel, "contextLabel");
|
||||
this.ContextLabel.FontSize = MetroFramework.MetroLabelSize.Small;
|
||||
this.ContextLabel.Name = "contextLabel";
|
||||
this.ContextLabel.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.ContextLabel.WrapToLine = true;
|
||||
//
|
||||
// valueUpDown
|
||||
//
|
||||
resources.ApplyResources(this.ValueUpDown, "valueUpDown");
|
||||
this.ValueUpDown.Name = "valueUpDown";
|
||||
//
|
||||
// NumericPrompt
|
||||
//
|
||||
this.AcceptButton = this.OKButton;
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.ValueUpDown);
|
||||
this.Controls.Add(this.ContextLabel);
|
||||
this.Controls.Add(this.OKButton);
|
||||
this.Controls.Add(this.TextLabel);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "NumericPrompt";
|
||||
this.Resizable = false;
|
||||
this.ShadowType = MetroFramework.Forms.MetroFormShadowType.DropShadow;
|
||||
this.Style = MetroFramework.MetroColorStyle.Silver;
|
||||
this.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.Load += new System.EventHandler(this.RenamePrompt_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.ValueUpDown)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
public System.Windows.Forms.Button OKButton;
|
||||
public System.Windows.Forms.Label TextLabel;
|
||||
public MetroFramework.Controls.MetroLabel ContextLabel;
|
||||
public System.Windows.Forms.NumericUpDown ValueUpDown;
|
||||
}
|
||||
}
|
||||
33
PCK-Studio/Forms/Additional-Popups/NumericPrompt.cs
Normal file
33
PCK-Studio/Forms/Additional-Popups/NumericPrompt.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using MetroFramework.Forms;
|
||||
|
||||
namespace PckStudio
|
||||
{
|
||||
public partial class NumericPrompt : MetroForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Text entered <c>only access when DialogResult == DialogResult.OK</c>
|
||||
/// </summary>
|
||||
public int NewValue => (int)ValueUpDown.Value;
|
||||
|
||||
public NumericPrompt(int InitialValue)
|
||||
{
|
||||
InitializeComponent();
|
||||
ValueUpDown.Value = InitialValue;
|
||||
}
|
||||
private void OKBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
private void RenamePrompt_Load(object sender, EventArgs e)
|
||||
{
|
||||
if(String.IsNullOrEmpty(ContextLabel.Text))
|
||||
{
|
||||
ContextLabel.Visible = false;
|
||||
Size = new System.Drawing.Size(264, 85);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -117,22 +117,26 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="TextLabel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Bottom</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="TextLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="TextLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>22, 26</value>
|
||||
<value>19, 90</value>
|
||||
</data>
|
||||
<data name="TextLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>220, 13</value>
|
||||
<value>34, 13</value>
|
||||
</data>
|
||||
<data name="TextLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="TextLabel.Text" xml:space="preserve">
|
||||
<value>How many levels would you like to generate?</value>
|
||||
<value>Value</value>
|
||||
</data>
|
||||
<data name="TextLabel.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
|
||||
<value>MiddleCenter</value>
|
||||
@@ -149,83 +153,85 @@
|
||||
<data name=">>TextLabel.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="CancelButton.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
|
||||
<data name="OKButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Bottom</value>
|
||||
</data>
|
||||
<data name="OKButton.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
|
||||
<value>Flat</value>
|
||||
</data>
|
||||
<data name="CancelButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>135, 74</value>
|
||||
</data>
|
||||
<data name="CancelButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>75, 23</value>
|
||||
</data>
|
||||
<data name="CancelButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="CancelButton.Text" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name=">>CancelButton.Name" xml:space="preserve">
|
||||
<value>CancelButton</value>
|
||||
</data>
|
||||
<data name=">>CancelButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>CancelButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>CancelButton.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="button1.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
|
||||
<value>Flat</value>
|
||||
</data>
|
||||
<data name="button1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<data name="OKButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="button1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>54, 74</value>
|
||||
<data name="OKButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>95, 118</value>
|
||||
</data>
|
||||
<data name="button1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<data name="OKButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>75, 23</value>
|
||||
</data>
|
||||
<data name="button1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
<data name="OKButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="button1.Text" xml:space="preserve">
|
||||
<value>Generate</value>
|
||||
<data name="OKButton.Text" xml:space="preserve">
|
||||
<value>Set</value>
|
||||
</data>
|
||||
<data name=">>button1.Name" xml:space="preserve">
|
||||
<value>button1</value>
|
||||
<data name=">>OKButton.Name" xml:space="preserve">
|
||||
<value>OKButton</value>
|
||||
</data>
|
||||
<data name=">>button1.Type" xml:space="preserve">
|
||||
<data name=">>OKButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>button1.Parent" xml:space="preserve">
|
||||
<data name=">>OKButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>button1.ZOrder" xml:space="preserve">
|
||||
<data name=">>OKButton.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="contextLabel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top</value>
|
||||
</data>
|
||||
<data name="contextLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>28, 39</value>
|
||||
</data>
|
||||
<data name="contextLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>208, 39</value>
|
||||
</data>
|
||||
<data name="contextLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="contextLabel.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
|
||||
<value>TopCenter</value>
|
||||
</data>
|
||||
<data name=">>contextLabel.Name" xml:space="preserve">
|
||||
<value>contextLabel</value>
|
||||
</data>
|
||||
<data name=">>contextLabel.Type" xml:space="preserve">
|
||||
<value>MetroFramework.Controls.MetroLabel, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
|
||||
</data>
|
||||
<data name=">>contextLabel.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>contextLabel.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="numericUpDown1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>72, 47</value>
|
||||
<data name="valueUpDown.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>71, 88</value>
|
||||
</data>
|
||||
<data name="numericUpDown1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>120, 20</value>
|
||||
<data name="valueUpDown.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>164, 20</value>
|
||||
</data>
|
||||
<data name="numericUpDown1.TabIndex" type="System.Int32, mscorlib">
|
||||
<data name="valueUpDown.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name=">>numericUpDown1.Name" xml:space="preserve">
|
||||
<value>numericUpDown1</value>
|
||||
<data name=">>valueUpDown.Name" xml:space="preserve">
|
||||
<value>valueUpDown</value>
|
||||
</data>
|
||||
<data name=">>numericUpDown1.Type" xml:space="preserve">
|
||||
<data name=">>valueUpDown.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>numericUpDown1.Parent" xml:space="preserve">
|
||||
<data name=">>valueUpDown.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>numericUpDown1.ZOrder" xml:space="preserve">
|
||||
<data name=">>valueUpDown.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
@@ -235,7 +241,7 @@
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>264, 105</value>
|
||||
<value>264, 150</value>
|
||||
</data>
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
@@ -2461,7 +2467,7 @@
|
||||
<value>CenterParent</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>MipMapPrompt</value>
|
||||
<value>NumericPrompt</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>MetroFramework.Forms.MetroForm, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
|
||||
@@ -28,112 +28,112 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.autoSaveCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.SettingToolTip = new MetroFramework.Components.MetroToolTip();
|
||||
this.endianCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.autoUpdateCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.autoLoadPckCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.showPresenceCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// autoSaveCheckBox
|
||||
//
|
||||
this.autoSaveCheckBox.AutoSize = true;
|
||||
this.autoSaveCheckBox.Location = new System.Drawing.Point(23, 63);
|
||||
this.autoSaveCheckBox.Name = "autoSaveCheckBox";
|
||||
this.autoSaveCheckBox.Size = new System.Drawing.Size(76, 15);
|
||||
this.autoSaveCheckBox.Style = MetroFramework.MetroColorStyle.White;
|
||||
this.autoSaveCheckBox.TabIndex = 0;
|
||||
this.autoSaveCheckBox.Text = "Auto Save";
|
||||
this.autoSaveCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.SettingToolTip.SetToolTip(this.autoSaveCheckBox, "Whether to automatically save changes inside of file editor such as the loc edito" +
|
||||
this.autoSaveCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.SettingToolTip = new MetroFramework.Components.MetroToolTip();
|
||||
this.endianCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.autoUpdateCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.autoLoadPckCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.showPresenceCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// autoSaveCheckBox
|
||||
//
|
||||
this.autoSaveCheckBox.AutoSize = true;
|
||||
this.autoSaveCheckBox.Location = new System.Drawing.Point(23, 63);
|
||||
this.autoSaveCheckBox.Name = "autoSaveCheckBox";
|
||||
this.autoSaveCheckBox.Size = new System.Drawing.Size(76, 15);
|
||||
this.autoSaveCheckBox.Style = MetroFramework.MetroColorStyle.White;
|
||||
this.autoSaveCheckBox.TabIndex = 0;
|
||||
this.autoSaveCheckBox.Text = "Auto Save";
|
||||
this.autoSaveCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.SettingToolTip.SetToolTip(this.autoSaveCheckBox, "Whether to automatically save changes inside of file editor such as the loc edito" +
|
||||
"r");
|
||||
this.autoSaveCheckBox.UseSelectable = true;
|
||||
this.autoSaveCheckBox.CheckedChanged += new System.EventHandler(this.autoSaveCheckBox_CheckedChanged);
|
||||
//
|
||||
// SettingToolTip
|
||||
//
|
||||
this.SettingToolTip.Style = MetroFramework.MetroColorStyle.White;
|
||||
this.SettingToolTip.StyleManager = null;
|
||||
this.SettingToolTip.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// endianCheckBox
|
||||
//
|
||||
this.endianCheckBox.AutoSize = true;
|
||||
this.endianCheckBox.Location = new System.Drawing.Point(23, 84);
|
||||
this.endianCheckBox.Name = "endianCheckBox";
|
||||
this.endianCheckBox.Size = new System.Drawing.Size(75, 15);
|
||||
this.endianCheckBox.Style = MetroFramework.MetroColorStyle.White;
|
||||
this.endianCheckBox.TabIndex = 1;
|
||||
this.endianCheckBox.Text = "Open Vita";
|
||||
this.endianCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.SettingToolTip.SetToolTip(this.endianCheckBox, "Whether to automatically set the \'Open as Switch/Vita pck\' checkbox");
|
||||
this.endianCheckBox.UseSelectable = true;
|
||||
this.endianCheckBox.CheckedChanged += new System.EventHandler(this.endianCheckBox_CheckedChanged);
|
||||
//
|
||||
// autoUpdateCheckBox
|
||||
//
|
||||
this.autoUpdateCheckBox.AutoSize = true;
|
||||
this.autoUpdateCheckBox.Enabled = false;
|
||||
this.autoUpdateCheckBox.Location = new System.Drawing.Point(23, 105);
|
||||
this.autoUpdateCheckBox.Name = "autoUpdateCheckBox";
|
||||
this.autoUpdateCheckBox.Size = new System.Drawing.Size(90, 15);
|
||||
this.autoUpdateCheckBox.Style = MetroFramework.MetroColorStyle.White;
|
||||
this.autoUpdateCheckBox.TabIndex = 2;
|
||||
this.autoUpdateCheckBox.Text = "Auto Update";
|
||||
this.autoUpdateCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.SettingToolTip.SetToolTip(this.autoUpdateCheckBox, "Whether to automatically check for updates");
|
||||
this.autoUpdateCheckBox.UseSelectable = true;
|
||||
//
|
||||
// autoLoadPckCheckBox
|
||||
//
|
||||
this.autoLoadPckCheckBox.AutoSize = true;
|
||||
this.autoLoadPckCheckBox.Location = new System.Drawing.Point(23, 126);
|
||||
this.autoLoadPckCheckBox.Name = "autoLoadPckCheckBox";
|
||||
this.autoLoadPckCheckBox.Size = new System.Drawing.Size(184, 15);
|
||||
this.autoLoadPckCheckBox.Style = MetroFramework.MetroColorStyle.White;
|
||||
this.autoLoadPckCheckBox.TabIndex = 3;
|
||||
this.autoLoadPckCheckBox.Text = "Auto Load addittional pck files";
|
||||
this.autoLoadPckCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.SettingToolTip.SetToolTip(this.autoLoadPckCheckBox, "Whether to automatically load files inside that end in .pck");
|
||||
this.autoLoadPckCheckBox.UseSelectable = true;
|
||||
this.autoLoadPckCheckBox.CheckedChanged += new System.EventHandler(this.autoLoadPckCheckBox_CheckedChanged);
|
||||
//
|
||||
// showPresenceCheckBox
|
||||
//
|
||||
this.showPresenceCheckBox.AutoSize = true;
|
||||
this.showPresenceCheckBox.Location = new System.Drawing.Point(23, 147);
|
||||
this.showPresenceCheckBox.Name = "showPresenceCheckBox";
|
||||
this.showPresenceCheckBox.Size = new System.Drawing.Size(171, 15);
|
||||
this.showPresenceCheckBox.Style = MetroFramework.MetroColorStyle.White;
|
||||
this.showPresenceCheckBox.TabIndex = 4;
|
||||
this.showPresenceCheckBox.Text = "Show Discord Rich Presence";
|
||||
this.showPresenceCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.SettingToolTip.SetToolTip(this.showPresenceCheckBox, "Whether to show a rich presence on discord");
|
||||
this.showPresenceCheckBox.UseSelectable = true;
|
||||
this.showPresenceCheckBox.CheckedChanged += new System.EventHandler(this.showPresenceCheckBox_CheckedChanged);
|
||||
//
|
||||
// AppBehaviorSettingsForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(527, 270);
|
||||
this.Controls.Add(this.showPresenceCheckBox);
|
||||
this.Controls.Add(this.autoLoadPckCheckBox);
|
||||
this.Controls.Add(this.autoUpdateCheckBox);
|
||||
this.Controls.Add(this.endianCheckBox);
|
||||
this.Controls.Add(this.autoSaveCheckBox);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "AppBehaviorSettingsForm";
|
||||
this.Resizable = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Style = MetroFramework.MetroColorStyle.Black;
|
||||
this.Text = "Application Settings";
|
||||
this.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.AppBehaviorSettingsForm_FormClosing);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
this.autoSaveCheckBox.UseSelectable = true;
|
||||
this.autoSaveCheckBox.CheckedChanged += new System.EventHandler(this.autoSaveCheckBox_CheckedChanged);
|
||||
//
|
||||
// SettingToolTip
|
||||
//
|
||||
this.SettingToolTip.Style = MetroFramework.MetroColorStyle.White;
|
||||
this.SettingToolTip.StyleManager = null;
|
||||
this.SettingToolTip.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// endianCheckBox
|
||||
//
|
||||
this.endianCheckBox.AutoSize = true;
|
||||
this.endianCheckBox.Location = new System.Drawing.Point(23, 84);
|
||||
this.endianCheckBox.Name = "endianCheckBox";
|
||||
this.endianCheckBox.Size = new System.Drawing.Size(75, 15);
|
||||
this.endianCheckBox.Style = MetroFramework.MetroColorStyle.White;
|
||||
this.endianCheckBox.TabIndex = 1;
|
||||
this.endianCheckBox.Text = "Open Vita";
|
||||
this.endianCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.SettingToolTip.SetToolTip(this.endianCheckBox, "Whether to automatically set the \'Open as Switch/Vita pck\' checkbox");
|
||||
this.endianCheckBox.UseSelectable = true;
|
||||
this.endianCheckBox.CheckedChanged += new System.EventHandler(this.endianCheckBox_CheckedChanged);
|
||||
//
|
||||
// autoUpdateCheckBox
|
||||
//
|
||||
this.autoUpdateCheckBox.AutoSize = true;
|
||||
this.autoUpdateCheckBox.Enabled = false;
|
||||
this.autoUpdateCheckBox.Location = new System.Drawing.Point(23, 105);
|
||||
this.autoUpdateCheckBox.Name = "autoUpdateCheckBox";
|
||||
this.autoUpdateCheckBox.Size = new System.Drawing.Size(90, 15);
|
||||
this.autoUpdateCheckBox.Style = MetroFramework.MetroColorStyle.White;
|
||||
this.autoUpdateCheckBox.TabIndex = 2;
|
||||
this.autoUpdateCheckBox.Text = "Auto Update";
|
||||
this.autoUpdateCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.SettingToolTip.SetToolTip(this.autoUpdateCheckBox, "Whether to automatically check for updates");
|
||||
this.autoUpdateCheckBox.UseSelectable = true;
|
||||
//
|
||||
// autoLoadPckCheckBox
|
||||
//
|
||||
this.autoLoadPckCheckBox.AutoSize = true;
|
||||
this.autoLoadPckCheckBox.Location = new System.Drawing.Point(23, 126);
|
||||
this.autoLoadPckCheckBox.Name = "autoLoadPckCheckBox";
|
||||
this.autoLoadPckCheckBox.Size = new System.Drawing.Size(331, 15);
|
||||
this.autoLoadPckCheckBox.Style = MetroFramework.MetroColorStyle.White;
|
||||
this.autoLoadPckCheckBox.TabIndex = 3;
|
||||
this.autoLoadPckCheckBox.Text = "Auto load additional pck files (also known as SubPCK files)";
|
||||
this.autoLoadPckCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.SettingToolTip.SetToolTip(this.autoLoadPckCheckBox, "Whether to automatically load files inside that end in .pck");
|
||||
this.autoLoadPckCheckBox.UseSelectable = true;
|
||||
this.autoLoadPckCheckBox.CheckedChanged += new System.EventHandler(this.autoLoadPckCheckBox_CheckedChanged);
|
||||
//
|
||||
// showPresenceCheckBox
|
||||
//
|
||||
this.showPresenceCheckBox.AutoSize = true;
|
||||
this.showPresenceCheckBox.Location = new System.Drawing.Point(23, 147);
|
||||
this.showPresenceCheckBox.Name = "showPresenceCheckBox";
|
||||
this.showPresenceCheckBox.Size = new System.Drawing.Size(171, 15);
|
||||
this.showPresenceCheckBox.Style = MetroFramework.MetroColorStyle.White;
|
||||
this.showPresenceCheckBox.TabIndex = 4;
|
||||
this.showPresenceCheckBox.Text = "Show Discord Rich Presence";
|
||||
this.showPresenceCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.SettingToolTip.SetToolTip(this.showPresenceCheckBox, "Whether to show a rich presence on discord");
|
||||
this.showPresenceCheckBox.UseSelectable = true;
|
||||
this.showPresenceCheckBox.CheckedChanged += new System.EventHandler(this.showPresenceCheckBox_CheckedChanged);
|
||||
//
|
||||
// AppBehaviorSettingsForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(527, 270);
|
||||
this.Controls.Add(this.showPresenceCheckBox);
|
||||
this.Controls.Add(this.autoLoadPckCheckBox);
|
||||
this.Controls.Add(this.autoUpdateCheckBox);
|
||||
this.Controls.Add(this.endianCheckBox);
|
||||
this.Controls.Add(this.autoSaveCheckBox);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "AppBehaviorSettingsForm";
|
||||
this.Resizable = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Style = MetroFramework.MetroColorStyle.Black;
|
||||
this.Text = "Application Settings";
|
||||
this.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.AppBehaviorSettingsForm_FormClosing);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -120,7 +120,4 @@
|
||||
<metadata name="SettingToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="SettingToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -35,7 +35,7 @@ namespace PckStudio.Internal
|
||||
get
|
||||
{
|
||||
// adopted Minecraft Java Edition Snapshot format (YYwWWn)
|
||||
// to keep better track of work in progress features and builds
|
||||
// to keep track of work in progress features and builds
|
||||
_buildCalendar ??= new System.Globalization.CultureInfo("en-US").Calendar;
|
||||
return _betaBuildVersion ??= string.Format("#{0}w{1}{2}",
|
||||
date.ToString("yy"),
|
||||
|
||||
@@ -137,11 +137,9 @@ namespace PckStudio
|
||||
modelsFileBINToolStripMenuItem.Click += (sender, e) => setFileType_Click(sender, e, PckFile.FileData.FileType.ModelsFile);
|
||||
behavioursFileBINToolStripMenuItem.Click += (sender, e) => setFileType_Click(sender, e, PckFile.FileData.FileType.BehavioursFile);
|
||||
entityMaterialsFileBINToolStripMenuItem.Click += (sender, e) => setFileType_Click(sender, e, PckFile.FileData.FileType.MaterialFile);
|
||||
|
||||
LoadUserSettings();
|
||||
}
|
||||
|
||||
private void LoadUserSettings()
|
||||
public void LoadUserSettings()
|
||||
{
|
||||
LittleEndianCheckBox.Checked = Settings.Default.UseLittleEndianAsDefault;
|
||||
}
|
||||
@@ -1950,10 +1948,16 @@ namespace PckStudio
|
||||
// TGA is not yet supported
|
||||
if (textureExtension == ".tga") return;
|
||||
|
||||
using MipMapPrompt diag = new MipMapPrompt();
|
||||
if (diag.ShowDialog(this) == DialogResult.OK)
|
||||
using NumericPrompt numericPrompt = new NumericPrompt(0);
|
||||
numericPrompt.ValueUpDown.Minimum = 1;
|
||||
numericPrompt.ValueUpDown.Maximum = 4; // 5 is the presumed max MipMap level
|
||||
numericPrompt.ContextLabel.Text = "You can enter the amount of MipMap levels that you would like to generate. " +
|
||||
"For example: if you enter 2, MipMapLevel1.png and MipMapLevel2.png will be generated";
|
||||
numericPrompt.TextLabel.Text = "Levels";
|
||||
|
||||
if (numericPrompt.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
for (int i = 2; i < 2 + diag.Levels; i++)
|
||||
for (int i = 2; i < 2 + numericPrompt.NewValue; i++)
|
||||
{
|
||||
string mippedPath = $"{textureDirectory}/{textureName}MipMapLevel{i}{textureExtension}";
|
||||
Debug.WriteLine(mippedPath);
|
||||
|
||||
@@ -178,6 +178,12 @@
|
||||
<Compile Include="Extensions\ImageSection.cs" />
|
||||
<Compile Include="Extensions\ListExtensions.cs" />
|
||||
<Compile Include="Extensions\PckFileExtensions.cs" />
|
||||
<Compile Include="Forms\Additional-Popups\NumericPrompt.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Additional-Popups\NumericPrompt.Designer.cs">
|
||||
<DependentUpon>NumericPrompt.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Utilities\AppBehaviorSettingsForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -269,12 +275,6 @@
|
||||
<Compile Include="Forms\Additional-Popups\CreateTexturePack.Designer.cs">
|
||||
<DependentUpon>CreateTexturePack.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Additional-Popups\MipMapPrompt.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Additional-Popups\MipMapPrompt.Designer.cs">
|
||||
<DependentUpon>MipMapPrompt.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Additional-Popups\AddFilePrompt.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -500,14 +500,14 @@
|
||||
<DependentUpon>CreateTexturePack.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Additional-Popups\MipMapPrompt.resx">
|
||||
<DependentUpon>MipMapPrompt.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Additional-Popups\AddFilePrompt.resx">
|
||||
<DependentUpon>AddFilePrompt.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Additional-Popups\NumericPrompt.resx">
|
||||
<DependentUpon>NumericPrompt.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Additional-Popups\RenamePrompt.resx">
|
||||
<DependentUpon>RenamePrompt.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
@@ -25,6 +25,7 @@ namespace PckStudio
|
||||
ApplicationScope.Initialize();
|
||||
RPC.Initialize();
|
||||
MainInstance = new MainForm();
|
||||
MainInstance.LoadUserSettings();
|
||||
if (args.Length > 0 && File.Exists(args[0]) && args[0].EndsWith(".pck"))
|
||||
MainInstance.LoadPckFromFile(args[0]);
|
||||
Application.Run(MainInstance);
|
||||
|
||||
2
PCK-Studio/Properties/Settings.Designer.cs
generated
2
PCK-Studio/Properties/Settings.Designer.cs
generated
@@ -58,7 +58,7 @@ namespace PckStudio.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool LoadSubPcks {
|
||||
get {
|
||||
return ((bool)(this["LoadSubPcks"]));
|
||||
|
||||
Reference in New Issue
Block a user