mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-06-11 12:12:57 +00:00
Merge branch 'main' of https://github.com/PhoenixARC/-PCK-Studio
This commit is contained in:
@@ -11,6 +11,13 @@
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
|
||||
</startup>
|
||||
<system.diagnostics>
|
||||
<trace autoflush="true">
|
||||
<listeners>
|
||||
<add name="TraceLogger" type="System.Diagnostics.TextWriterTraceListener" initializeData="trace.log"/>
|
||||
</listeners>
|
||||
</trace>
|
||||
</system.diagnostics>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
@@ -64,6 +71,9 @@
|
||||
<setting name="ShowRichPresence" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="UseComboBoxForGRFParameter" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
</PckStudio.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
|
||||
@@ -2,42 +2,54 @@
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using PckStudio.Extensions;
|
||||
using PckStudio.Internal;
|
||||
using SharpMSS;
|
||||
|
||||
namespace PckStudio.API.Miles
|
||||
{
|
||||
internal static class Binka
|
||||
{
|
||||
public static int FromWav(string inputFilepath, string outputFilepath, int compressionLevel)
|
||||
private static ProcessStartInfo WavProcessStartInfo = new ProcessStartInfo
|
||||
{
|
||||
UseShellExecute = true,
|
||||
CreateNoWindow = true,
|
||||
WindowStyle = ProcessWindowStyle.Hidden
|
||||
};
|
||||
|
||||
public static int ToBinka(string inputFilepath, string outputFilepath, int compressionLevel)
|
||||
{
|
||||
compressionLevel = MathExtensions.Clamp(compressionLevel, 1, 9);
|
||||
ApplicationScope.DataCacher.Cache(Properties.Resources.binka_encode, "binka_encode.exe");
|
||||
var process = Process.Start(new ProcessStartInfo
|
||||
{
|
||||
FileName = ApplicationScope.DataCacher.GetCachedFilepath("binka_encode.exe"),
|
||||
Arguments = $"\"{inputFilepath}\" \"{outputFilepath}\" -s -b{compressionLevel}",
|
||||
UseShellExecute = true,
|
||||
CreateNoWindow = true,
|
||||
WindowStyle = ProcessWindowStyle.Hidden
|
||||
});
|
||||
WavProcessStartInfo.FileName = ApplicationScope.DataCacher.GetCachedFilepath("binka_encode.exe");
|
||||
WavProcessStartInfo.Arguments = $"\"{inputFilepath}\" \"{outputFilepath}\" -s -b{compressionLevel}";
|
||||
var process = Process.Start(WavProcessStartInfo);
|
||||
process.WaitForExit();
|
||||
return process.ExitCode;
|
||||
}
|
||||
|
||||
public static void ToWav(Stream source, Stream destination)
|
||||
{
|
||||
string sourceFilepath = Path.GetTempFileName();
|
||||
using (var sourceFs = File.OpenWrite(sourceFilepath))
|
||||
{
|
||||
source.CopyTo(sourceFs);
|
||||
_ = source ?? throw new ArgumentNullException(nameof(source));
|
||||
_ = destination ?? throw new ArgumentNullException(nameof(destination));
|
||||
if (!source.CanRead)
|
||||
{
|
||||
throw new NotSupportedException("Can not read from source stream");
|
||||
}
|
||||
byte[] buffer = ToWav(sourceFilepath);
|
||||
File.Delete(sourceFilepath);
|
||||
|
||||
if (!destination.CanWrite)
|
||||
{
|
||||
throw new NotSupportedException("Can not read to destination stream");
|
||||
}
|
||||
|
||||
using var sourceFs = new MemoryStream();
|
||||
source.CopyTo(sourceFs);
|
||||
byte[] buffer = ToWav(sourceFs.ToArray());
|
||||
|
||||
using(var ms = new MemoryStream(buffer))
|
||||
{
|
||||
ms.CopyTo(destination);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void ToWav(string inputFilepath, string outputFilepath)
|
||||
@@ -51,9 +63,13 @@ namespace PckStudio.API.Miles
|
||||
|
||||
public static byte[] ToWav(string inputFilepath)
|
||||
{
|
||||
if (!File.Exists(inputFilepath))
|
||||
{
|
||||
throw new FileNotFoundException(nameof(inputFilepath));
|
||||
}
|
||||
if (!inputFilepath.EndsWith(".binka"))
|
||||
{
|
||||
throw new Exception("Not a Bink Audio file.");
|
||||
throw new ArgumentException("Not a Bink Audio file.");
|
||||
}
|
||||
return ToWav(File.ReadAllBytes(inputFilepath));
|
||||
}
|
||||
@@ -83,7 +99,8 @@ namespace PckStudio.API.Miles
|
||||
AILAPI.MemFreeLock(resultBuffer);
|
||||
RIBAPI.FreeProviderLibrary(0); // free all loaded providers
|
||||
AILAPI.Shutdown();
|
||||
return buffer;
|
||||
mss32LibHandle.Release();
|
||||
return buffer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,10 +6,9 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using OMI.Workers;
|
||||
using PckStudio.Classes._3ds;
|
||||
using OMI;
|
||||
|
||||
namespace PckStudio.Classes.IO._3DST
|
||||
namespace PckStudio.IO._3DST
|
||||
{
|
||||
internal class _3DSTextureReader : IDataFormatReader<Image>, IDataFormatReader
|
||||
{
|
||||
|
||||
@@ -4,9 +4,8 @@ using System.IO;
|
||||
using System.Text;
|
||||
using OMI;
|
||||
using OMI.Workers;
|
||||
using PckStudio.Classes._3ds;
|
||||
|
||||
namespace PckStudio.Classes.IO._3DST
|
||||
namespace PckStudio.IO._3DST
|
||||
{
|
||||
internal class _3DSTextureWriter : IDataFormatWriter
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace PckStudio.Classes._3ds
|
||||
namespace PckStudio.IO._3DST
|
||||
{
|
||||
/// <summary>
|
||||
/// Format of the texture used on the PICA200.
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
using System.Text;
|
||||
using OMI;
|
||||
using OMI.Workers;
|
||||
using PckStudio.Classes.FileTypes;
|
||||
using PckStudio.FileFormats;
|
||||
|
||||
namespace PckStudio.Classes.IO.CSMB
|
||||
namespace PckStudio.IO.CSMB
|
||||
{
|
||||
internal class CSMBFileReader : IDataFormatReader<CSMBFile>, IDataFormatReader
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using PckStudio.Classes.FileTypes;
|
||||
using PckStudio.FileFormats;
|
||||
using OMI.Workers;
|
||||
using OMI;
|
||||
|
||||
namespace PckStudio.Classes.IO.CSMB
|
||||
namespace PckStudio.IO.CSMB
|
||||
{
|
||||
internal class CSMBFileWriter : IDataFormatWriter
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using OMI;
|
||||
using OMI.Workers;
|
||||
using PckStudio.Classes.FileTypes;
|
||||
using PckStudio.FileFormats;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
@@ -8,7 +8,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace PckStudio.Classes.IO.PCK
|
||||
namespace PckStudio.IO.PckAudio
|
||||
{
|
||||
|
||||
public class InvalidAudioPckException : Exception
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
using OMI;
|
||||
using OMI.Workers;
|
||||
using PckStudio.Classes.FileTypes;
|
||||
using PckStudio.FileFormats;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace PckStudio.Classes.IO.PCK
|
||||
namespace PckStudio.IO.PckAudio
|
||||
{
|
||||
internal class PckAudioFileWriter : IDataFormatWriter
|
||||
{
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace PckStudio.Classes.IO.Sounds
|
||||
{
|
||||
public class SoundIO
|
||||
{
|
||||
public Dictionary<string, SoundInfo> Read(string Filepath)
|
||||
{
|
||||
var jObj = (Newtonsoft.Json.Linq.JObject)JsonConvert.DeserializeObject(File.ReadAllText(Filepath));
|
||||
var dict = JsonConvert.DeserializeObject<Dictionary<string, SoundInfo>>(jObj.ToString());
|
||||
|
||||
return dict;
|
||||
}
|
||||
|
||||
public string Serialize(Dictionary<string, SoundInfo> input)
|
||||
{
|
||||
return JsonConvert.SerializeObject(input, Formatting.Indented);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PckStudio.Classes.IO.Sounds
|
||||
{
|
||||
public class SoundInfo
|
||||
{
|
||||
public bool replace { get; set; }
|
||||
public List<Sound> sounds = new List<Sound>();
|
||||
}
|
||||
|
||||
public class Sound
|
||||
{
|
||||
public string name { get; set; }
|
||||
public string type { get; set; }
|
||||
public bool stream { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,18 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using DiscordRPC;
|
||||
using PckStudio.Internal;
|
||||
using PckStudio.Properties;
|
||||
using DiscordRPC.Logging;
|
||||
|
||||
namespace PckStudio.Classes.Misc
|
||||
{
|
||||
// https://github.com/BullyWiiPlaza/Minecraft-Wii-U-Mod-Injector/blob/main/Minecraft%20Wii%20U%20Mod%20Injector/Helpers/DiscordRp.cs
|
||||
// https://github.com/BullyWiiPlaza/Minecraft-Wii-U-Mod-Injector/blob/main/Minecraft%20Wii%20U%20Mod%20Injector/Helpers/DiscordRpc.cs
|
||||
static class RPC
|
||||
{
|
||||
public static DiscordRpcClient Client;
|
||||
public static readonly DateTime StartUpTime = DateTime.UtcNow;
|
||||
private static DiscordRpcClient Client;
|
||||
private static readonly DateTime StartUpTime = DateTime.UtcNow;
|
||||
private static RichPresence _richPresence;
|
||||
|
||||
private static readonly Assets _assets = new Assets()
|
||||
{
|
||||
@@ -16,6 +20,8 @@ namespace PckStudio.Classes.Misc
|
||||
LargeImageText = System.Windows.Forms.Application.ProductName,
|
||||
};
|
||||
|
||||
private static readonly Timestamps _startTimestamp = new Timestamps(StartUpTime);
|
||||
|
||||
private static readonly Button[] _buttons = new Button[]
|
||||
{
|
||||
new Button()
|
||||
@@ -25,13 +31,34 @@ namespace PckStudio.Classes.Misc
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
if (Settings.Default.ShowRichPresence)
|
||||
Client ??= new DiscordRpcClient(Settings.Default.RichPresenceId);
|
||||
#if DEBUG
|
||||
Client.Logger = new ConsoleLogger(LogLevel.Info, true);
|
||||
#endif
|
||||
if (!Client.IsInitialized)
|
||||
{
|
||||
Client ??= new DiscordRpcClient(Settings.Default.RichPresenceId);
|
||||
Client.Initialize();
|
||||
}
|
||||
SettingsManager.RegisterPropertyChangedCallback<bool>(nameof(Settings.Default.ShowRichPresence), state =>
|
||||
{
|
||||
if (state)
|
||||
{
|
||||
Client.SetPresence(_richPresence);
|
||||
return;
|
||||
}
|
||||
Client.ClearPresence();
|
||||
});
|
||||
}
|
||||
|
||||
public static void Deinitialize()
|
||||
{
|
||||
if (Client.IsInitialized)
|
||||
Client?.ClearPresence();
|
||||
Client?.Dispose();
|
||||
Client = null;
|
||||
}
|
||||
|
||||
public static void SetPresence(string details)
|
||||
@@ -41,21 +68,16 @@ namespace PckStudio.Classes.Misc
|
||||
|
||||
public static void SetPresence(string details, string state)
|
||||
{
|
||||
Client?.SetPresence(new RichPresence()
|
||||
_richPresence = new RichPresence()
|
||||
{
|
||||
Details = details,
|
||||
State = state,
|
||||
Timestamps = new Timestamps() { Start = StartUpTime },
|
||||
Timestamps = _startTimestamp,
|
||||
Assets = _assets,
|
||||
Buttons = _buttons
|
||||
});
|
||||
}
|
||||
|
||||
public static void Deinitialize()
|
||||
{
|
||||
Client?.ClearPresence();
|
||||
Client?.Dispose();
|
||||
Client = null;
|
||||
};
|
||||
if (Settings.Default.ShowRichPresence)
|
||||
Client?.SetPresence(_richPresence);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,7 @@ namespace PckStudio.Classes.Models.DefaultModels
|
||||
_ = Textures[0] ?? throw new NullReferenceException(nameof(Textures));
|
||||
Image source = Textures[0];
|
||||
|
||||
(int top, int side) armWidth = _skinANIM.GetFlag(ANIM_EFFECTS.SLIM_MODEL) ? (6, 14) : (8, 16);
|
||||
(int top, int side) armWidth = _skinANIM.GetFlag(SkinAnimFlag.SLIM_MODEL) ? (6, 14) : (8, 16);
|
||||
|
||||
Box head = new Box(source, new Rectangle(8, 0, 16, 8), new Rectangle(0, 8, 32, 8), new Point3D(0f, 0f, 0f));
|
||||
Box headOverlay = new Box(source, new Rectangle(40, 0, 16, 8), new Rectangle(32, 8, 32, 8), new Point3D(0f, 0f, 0f));
|
||||
|
||||
@@ -7,6 +7,8 @@ using PckStudio.API.Miles;
|
||||
using PckStudio.Forms.Additional_Popups;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using PckStudio.Internal;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace PckStudio.Classes.Utils
|
||||
{
|
||||
@@ -25,8 +27,43 @@ namespace PckStudio.Classes.Utils
|
||||
|
||||
waitDiag.Close();
|
||||
waitDiag.Dispose();
|
||||
MessageBox.Show($"Successfully converted {convertedCount}/{filenames.Length} file{(filenames.Length != 1 ? "s" : "")}", "Done!");
|
||||
MessageBox.Show($"Successfully converted {convertedCount}/{filenames.Length} file{(filenames.Length > 1 ? "s" : "")}", "Done!");
|
||||
}
|
||||
|
||||
public static void ToBinka(string[] filenames, DirectoryInfo destination)
|
||||
{
|
||||
int convertedCount = 0;
|
||||
Directory.CreateDirectory(ApplicationScope.DataCacher.CacheDirectory);
|
||||
|
||||
InProgressPrompt waitDiag = new InProgressPrompt();
|
||||
waitDiag.Show();
|
||||
|
||||
foreach (string file in filenames)
|
||||
{
|
||||
string[] a = Path.GetFileNameWithoutExtension(file).Split(Path.GetInvalidFileNameChars());
|
||||
string songName = string.Join("_", a);
|
||||
// Replace UTF characters
|
||||
songName = Regex.Replace(songName, @"[^\u0000-\u007F]+", "_");
|
||||
string cacheSongFilepath = Path.Combine(ApplicationScope.DataCacher.CacheDirectory, songName + Path.GetExtension(file));
|
||||
|
||||
using (var reader = new NAudio.Wave.WaveFileReader(file))
|
||||
{
|
||||
var newFormat = new NAudio.Wave.WaveFormat(reader.WaveFormat.SampleRate, 16, reader.WaveFormat.Channels);
|
||||
using (var conversionStream = new NAudio.Wave.WaveFormatConversionStream(newFormat, reader))
|
||||
{
|
||||
NAudio.Wave.WaveFileWriter.CreateWaveFile(cacheSongFilepath, conversionStream); //write to new location
|
||||
}
|
||||
}
|
||||
|
||||
Cursor.Current = Cursors.WaitCursor;
|
||||
int exitCode = Binka.ToBinka(cacheSongFilepath, Path.Combine(destination.FullName, Path.GetFileNameWithoutExtension(file) + ".binka"), 4);
|
||||
if (exitCode == 0)
|
||||
convertedCount++;
|
||||
}
|
||||
|
||||
waitDiag.Close();
|
||||
waitDiag.Dispose();
|
||||
MessageBox.Show($"Successfully converted {convertedCount}/{filenames.Length} file{(filenames.Length > 1 ? "s" : "")}", "Done!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
35
PCK-Studio/Extensions/AnimationExtensions.cs
Normal file
35
PCK-Studio/Extensions/AnimationExtensions.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using PckStudio.Internal;
|
||||
|
||||
namespace PckStudio.Extensions
|
||||
{
|
||||
internal static class AnimationExtensions
|
||||
{
|
||||
|
||||
internal static JObject ConvertToJavaAnimation(this Animation animation)
|
||||
{
|
||||
JObject janimation = new JObject();
|
||||
JObject mcmeta = new JObject();
|
||||
mcmeta["comment"] = $"Animation converted with {Application.ProductName}";
|
||||
mcmeta["animation"] = janimation;
|
||||
JArray jframes = new JArray();
|
||||
foreach (var frame in animation.GetFrames())
|
||||
{
|
||||
JObject jframe = new JObject();
|
||||
jframe["index"] = animation.GetTextureIndex(frame.Texture);
|
||||
jframe["time"] = frame.Ticks;
|
||||
jframes.Add(jframe);
|
||||
};
|
||||
janimation["interpolation"] = animation.Interpolate;
|
||||
janimation["frames"] = jframes;
|
||||
return mcmeta;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace PckStudio.Extensions
|
||||
{
|
||||
public enum BlendMode
|
||||
internal enum BlendMode
|
||||
{
|
||||
Add,
|
||||
Subtract,
|
||||
@@ -8,6 +8,7 @@
|
||||
Average,
|
||||
DescendingOrder,
|
||||
AscendingOrder,
|
||||
Screen
|
||||
Screen,
|
||||
Overlay
|
||||
}
|
||||
}
|
||||
@@ -15,17 +15,15 @@ namespace PckStudio.Extensions
|
||||
return new Vector4(color.R / 255f, color.G / 255f, color.B / 255f, color.A / 255f);
|
||||
}
|
||||
|
||||
internal static T Clamp<T>(T value, T min, T max) where T : IComparable<T>
|
||||
internal static byte BlendValues(byte source, byte overlay, BlendMode blendType)
|
||||
{
|
||||
if (value.CompareTo(min) < 0) return min;
|
||||
if (value.CompareTo(max) > 0) return max;
|
||||
return value;
|
||||
return (byte)MathExtensions.Clamp(BlendValues(source / 255f, overlay / 255f, blendType) * 255, 0, 255);
|
||||
}
|
||||
|
||||
internal static byte BlendValues(float source, float overlay, BlendMode blendType)
|
||||
internal static float BlendValues(float source, float overlay, BlendMode blendType)
|
||||
{
|
||||
source = Clamp(source, 0.0f, 1.0f);
|
||||
overlay = Clamp(overlay, 0.0f, 1.0f);
|
||||
source = MathExtensions.Clamp(source, 0.0f, 1.0f);
|
||||
overlay = MathExtensions.Clamp(overlay, 0.0f, 1.0f);
|
||||
float resultValue = blendType switch
|
||||
{
|
||||
BlendMode.Add => source + overlay,
|
||||
@@ -35,20 +33,21 @@ namespace PckStudio.Extensions
|
||||
BlendMode.AscendingOrder => source > overlay ? overlay : source,
|
||||
BlendMode.DescendingOrder => source < overlay ? overlay : source,
|
||||
BlendMode.Screen => 1f - (1f - source) * (1f - overlay),
|
||||
BlendMode.Overlay => source < 0.5f ? 2f * source * overlay : 1f - 2f * (1f - source) * (1f - overlay),
|
||||
_ => 0.0f
|
||||
};
|
||||
return (byte)Clamp(resultValue * 255, 0, 255);
|
||||
return MathExtensions.Clamp(resultValue, 0.0f, 1.0f);
|
||||
}
|
||||
|
||||
internal static byte Mix(double ratio, byte val1, byte val2)
|
||||
{
|
||||
ratio = Clamp(ratio, 0.0, 1.0);
|
||||
ratio = MathExtensions.Clamp(ratio, 0.0, 1.0);
|
||||
return (byte)(ratio * val1 + (1.0 - ratio) * val2);
|
||||
}
|
||||
|
||||
internal static Color Mix(this Color c1, Color c2, double ratio)
|
||||
{
|
||||
ratio = Clamp(ratio, 0.0, 1.0);
|
||||
ratio = MathExtensions.Clamp(ratio, 0.0, 1.0);
|
||||
return Color.FromArgb(c1.A,
|
||||
Mix(ratio, c1.R, c2.R),
|
||||
Mix(ratio, c1.G, c2.G),
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace PckStudio.Extensions
|
||||
{
|
||||
internal static class EnumerableExtensions
|
||||
{
|
||||
public static IEnumerable<(int index, T type)>enumerate<T>(this IEnumerable<T> array)
|
||||
public static IEnumerable<(int index, T value)>enumerate<T>(this IEnumerable<T> array)
|
||||
{
|
||||
int i = 0;
|
||||
foreach (var item in array)
|
||||
@@ -15,6 +15,16 @@ namespace PckStudio.Extensions
|
||||
yield break;
|
||||
}
|
||||
|
||||
public static bool EqualsAny<T>(this T type, params T[] items)
|
||||
{
|
||||
foreach (var item in items)
|
||||
{
|
||||
if (item.Equals(type))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool ContainsAny<T>(this IEnumerable<T> array, params T[] items)
|
||||
{
|
||||
foreach (var item in array)
|
||||
|
||||
@@ -7,15 +7,15 @@ using System.Text;
|
||||
|
||||
namespace PckStudio.Extensions
|
||||
{
|
||||
public struct GraphicsConfig
|
||||
internal struct GraphicsConfig
|
||||
{
|
||||
public GraphicsConfig()
|
||||
{
|
||||
CompositingQuality = CompositingQuality.Default;
|
||||
InterpolationMode = InterpolationMode.Default;
|
||||
SmoothingMode = SmoothingMode.Default;
|
||||
PixelOffsetMode = PixelOffsetMode.Default;
|
||||
CompositingMode = CompositingMode.SourceOver;
|
||||
CompositingQuality = default;
|
||||
InterpolationMode = default;
|
||||
SmoothingMode = default;
|
||||
PixelOffsetMode = default;
|
||||
CompositingMode = default;
|
||||
}
|
||||
|
||||
public CompositingMode CompositingMode { get; set; }
|
||||
@@ -35,5 +35,14 @@ namespace PckStudio.Extensions
|
||||
graphics.SmoothingMode = config.SmoothingMode;
|
||||
graphics.PixelOffsetMode = config.PixelOffsetMode;
|
||||
}
|
||||
|
||||
internal static Graphics Fill(this Graphics graphics, Rectangle area, Color color)
|
||||
{
|
||||
var clip = graphics.Clip;
|
||||
graphics.SetClip(area, CombineMode.Replace);
|
||||
graphics.Clear(color);
|
||||
graphics.SetClip(clip, CombineMode.Replace);
|
||||
return graphics;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
using System;
|
||||
/* Copyright (c) 2023-present miku-666
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
* warranty. In no event will the authors be held liable for any damages
|
||||
* arising from the use of this software.
|
||||
*
|
||||
* Permission is granted to anyone to use this software for any purpose,
|
||||
* including commercial applications, and to alter it and redistribute it
|
||||
* freely, subject to the following restrictions:
|
||||
*
|
||||
* 1.The origin of this software must not be misrepresented; you must not
|
||||
* claim that you wrote the original software. If you use this software
|
||||
* in a product, an acknowledgment in the product documentation would be
|
||||
* appreciated but is not required.
|
||||
* 2. Altered source versions must be plainly marked as such, and must not be
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
**/
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing.Imaging;
|
||||
@@ -6,6 +23,9 @@ using System.Drawing.Drawing2D;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Linq;
|
||||
using PckStudio.Internal;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading.Tasks;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
|
||||
@@ -27,30 +47,26 @@ namespace PckStudio.Extensions
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates an image array by reading in horizontal order
|
||||
/// Creates an IEnumerable by reading in horizontal order
|
||||
/// </summary>
|
||||
/// <param name="source"></param>
|
||||
/// <param name="size">Size of individual image inside of <paramref name="source"/></param>
|
||||
internal static IEnumerable<Image> CreateImageList(this Image source, Size size)
|
||||
/// <param name="source">this image</param>
|
||||
/// <param name="scalar">Indecates width and height of image sub section</param>
|
||||
/// <returns><see cref="IEnumerable{Image}"/> of type <see cref="Image"/></returns>
|
||||
internal static IEnumerable<Image> SplitHorizontal(this Image source, int scalar)
|
||||
{
|
||||
return source.CreateImageList(size, ImageLayoutDirection.Horizontal);
|
||||
return source.Split(scalar, ImageLayoutDirection.Horizontal);
|
||||
}
|
||||
|
||||
internal static IEnumerable<Image> CreateImageList(this Image source, int scalar)
|
||||
internal static IEnumerable<Image> Split(this Image source, int scalar, ImageLayoutDirection layoutDirection)
|
||||
{
|
||||
return source.CreateImageList(scalar, ImageLayoutDirection.Horizontal);
|
||||
return Split(source, new Size(scalar, scalar), layoutDirection);
|
||||
}
|
||||
|
||||
internal static IEnumerable<Image> CreateImageList(this Image source, int scalar, ImageLayoutDirection layoutDirection)
|
||||
{
|
||||
return CreateImageList(source, new Size(scalar, scalar), layoutDirection);
|
||||
}
|
||||
|
||||
internal static IEnumerable<Image> CreateImageList(this Image source, Size size, ImageLayoutDirection imageLayout)
|
||||
internal static IEnumerable<Image> Split(this Image source, Size size, ImageLayoutDirection imageLayout)
|
||||
{
|
||||
int rowCount = source.Width / size.Width;
|
||||
int columnCount = source.Height / size.Height;
|
||||
Debug.WriteLine($"{nameof(source.Size)}={source.Size}, {nameof(size)}={size}, {columnCount} {rowCount}");
|
||||
Debug.WriteLine($"Image size: {source.Size}, Area size: {size}, col num: {columnCount}, row num: {rowCount}");
|
||||
for (int i = 0; i < columnCount * rowCount; i++)
|
||||
{
|
||||
int row = Math.DivRem(i, rowCount, out int column);
|
||||
@@ -62,7 +78,7 @@ namespace PckStudio.Extensions
|
||||
yield break;
|
||||
}
|
||||
|
||||
internal static IEnumerable<Image> CreateImageList(this Image source, ImageLayoutDirection layoutDirection)
|
||||
internal static IEnumerable<Image> Split(this Image source, ImageLayoutDirection layoutDirection)
|
||||
{
|
||||
for (int i = 0; i < source.Height / source.Width; i++)
|
||||
{
|
||||
@@ -72,7 +88,7 @@ namespace PckStudio.Extensions
|
||||
yield break;
|
||||
}
|
||||
|
||||
internal static Image CombineImages(this IList<Image> sources, ImageLayoutDirection layoutDirection)
|
||||
internal static Image Combine(this IList<Image> sources, ImageLayoutDirection layoutDirection)
|
||||
{
|
||||
Size imageSize = CalculateImageSize(sources, layoutDirection);
|
||||
var image = new Bitmap(imageSize.Width, imageSize.Height);
|
||||
@@ -110,7 +126,12 @@ namespace PckStudio.Extensions
|
||||
return new Size(width, height);
|
||||
}
|
||||
|
||||
internal static Image ResizeImage(this Image image, int width, int height, GraphicsConfig graphicsConfig)
|
||||
internal static Image Resize(this Image image, Size size, GraphicsConfig graphicsConfig)
|
||||
{
|
||||
return image.Resize(size.Width, size.Height, graphicsConfig);
|
||||
}
|
||||
|
||||
internal static Image Resize(this Image image, int width, int height, GraphicsConfig graphicsConfig)
|
||||
{
|
||||
var destRect = new Rectangle(0, 0, width, height);
|
||||
var destImage = new Bitmap(width, height);
|
||||
@@ -129,47 +150,42 @@ namespace PckStudio.Extensions
|
||||
return destImage;
|
||||
}
|
||||
|
||||
internal static Image Fill(this Image image, Color color)
|
||||
{
|
||||
using (var g = Graphics.FromImage(image))
|
||||
{
|
||||
using (SolidBrush brush = new SolidBrush(color))
|
||||
{
|
||||
g.FillRectangle(brush, new Rectangle(Point.Empty, image.Size));
|
||||
}
|
||||
}
|
||||
return image;
|
||||
}
|
||||
|
||||
internal static Image Blend(this Image image, Color overlayColor, BlendMode mode)
|
||||
{
|
||||
if (image is not Bitmap baseImage)
|
||||
return image;
|
||||
|
||||
Bitmap bitmapResult = new Bitmap(baseImage.Width, baseImage.Height, PixelFormat.Format32bppArgb);
|
||||
|
||||
BitmapData baseImageData = baseImage.LockBits(new Rectangle(Point.Empty, baseImage.Size),
|
||||
ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
|
||||
byte[] baseImageBuffer = new byte[baseImageData.Stride * baseImageData.Height];
|
||||
|
||||
Marshal.Copy(baseImageData.Scan0, baseImageBuffer, 0, baseImageBuffer.Length);
|
||||
|
||||
var normalized = overlayColor.Normalize();
|
||||
|
||||
for (int k = 0; k < baseImageBuffer.Length; k += 4)
|
||||
{
|
||||
baseImageBuffer[k + 0] = ColorExtensions.BlendValues(baseImageBuffer[k + 0] / 255f, normalized.X, mode);
|
||||
baseImageBuffer[k + 1] = ColorExtensions.BlendValues(baseImageBuffer[k + 1] / 255f, normalized.Y, mode);
|
||||
baseImageBuffer[k + 2] = ColorExtensions.BlendValues(baseImageBuffer[k + 2] / 255f, normalized.Z, mode);
|
||||
}
|
||||
|
||||
Bitmap bitmapResult = new Bitmap(baseImage.Width, baseImage.Height, PixelFormat.Format32bppArgb);
|
||||
BitmapData resultImageData = bitmapResult.LockBits(new Rectangle(Point.Empty, bitmapResult.Size),
|
||||
ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
|
||||
Marshal.Copy(baseImageBuffer, 0, resultImageData.Scan0, baseImageBuffer.Length);
|
||||
Profiler.Start();
|
||||
Parallel.For(0, baseImageData.Stride * baseImageData.Height / 4, (i) =>
|
||||
{
|
||||
int k = i * 4;
|
||||
unsafe
|
||||
{
|
||||
int color = Unsafe.Read<int>((baseImageData.Scan0 + k).ToPointer());
|
||||
byte a = (byte)(color >> 24 & 0xff);
|
||||
if (a == 0)
|
||||
{
|
||||
Unsafe.Write((resultImageData.Scan0 + k).ToPointer(), 0);
|
||||
return;
|
||||
}
|
||||
var b = ColorExtensions.BlendValues((byte)(color >> 0 & 0xff), overlayColor.B, mode);
|
||||
var g = ColorExtensions.BlendValues((byte)(color >> 8 & 0xff), overlayColor.G, mode);
|
||||
var r = ColorExtensions.BlendValues((byte)(color >> 16 & 0xff), overlayColor.R, mode);
|
||||
int blendedValue = a << 24 | r << 16 | g << 8 | b;
|
||||
Unsafe.Write((resultImageData.Scan0 + k).ToPointer(), blendedValue);
|
||||
}
|
||||
});
|
||||
Profiler.Stop();
|
||||
|
||||
bitmapResult.UnlockBits(resultImageData);
|
||||
baseImage.UnlockBits(baseImageData);
|
||||
|
||||
return bitmapResult;
|
||||
}
|
||||
|
||||
@@ -193,9 +209,9 @@ namespace PckStudio.Extensions
|
||||
|
||||
for (int k = 0; k < baseImageBuffer.Length && k < overlayImageBuffer.Length; k += 4)
|
||||
{
|
||||
baseImageBuffer[k + 0] = ColorExtensions.BlendValues(baseImageBuffer[k + 0] / 255f, overlayImageBuffer[k + 0] / 255f, mode);
|
||||
baseImageBuffer[k + 1] = ColorExtensions.BlendValues(baseImageBuffer[k + 1] / 255f, overlayImageBuffer[k + 1] / 255f, mode);
|
||||
baseImageBuffer[k + 2] = ColorExtensions.BlendValues(baseImageBuffer[k + 2] / 255f, overlayImageBuffer[k + 2] / 255f, mode);
|
||||
baseImageBuffer[k + 0] = ColorExtensions.BlendValues(baseImageBuffer[k + 0], overlayImageBuffer[k + 0], mode);
|
||||
baseImageBuffer[k + 1] = ColorExtensions.BlendValues(baseImageBuffer[k + 1], overlayImageBuffer[k + 1], mode);
|
||||
baseImageBuffer[k + 2] = ColorExtensions.BlendValues(baseImageBuffer[k + 2], overlayImageBuffer[k + 2], mode);
|
||||
}
|
||||
|
||||
Bitmap bitmapResult = new Bitmap(baseImage.Width, baseImage.Height, PixelFormat.Format32bppArgb);
|
||||
@@ -212,7 +228,7 @@ namespace PckStudio.Extensions
|
||||
|
||||
internal static Image Interpolate(this Image image1, Image image2, double delta)
|
||||
{
|
||||
delta = ColorExtensions.Clamp(delta, 0.0, 1.0);
|
||||
delta = MathExtensions.Clamp(delta, 0.0, 1.0);
|
||||
if (image1 is not Bitmap baseImage || image2 is not Bitmap overlayImage ||
|
||||
image1.Width != image2.Width || image1.Height != image2.Height)
|
||||
return image1;
|
||||
|
||||
@@ -2,27 +2,27 @@
|
||||
|
||||
namespace PckStudio.Extensions
|
||||
{
|
||||
struct ImageSection
|
||||
internal struct ImageSection
|
||||
{
|
||||
public readonly Size Size;
|
||||
public readonly Point Point;
|
||||
public readonly Rectangle Area;
|
||||
|
||||
internal ImageSection(Size sectionSize, int index, ImageLayoutDirection layoutDirection)
|
||||
internal ImageSection(Size originalSize, int index, ImageLayoutDirection layoutDirection)
|
||||
{
|
||||
switch(layoutDirection)
|
||||
{
|
||||
case ImageLayoutDirection.Horizontal:
|
||||
{
|
||||
Size = new Size(sectionSize.Height, sectionSize.Height);
|
||||
Point = new Point(index * sectionSize.Height, 0);
|
||||
Size = new Size(originalSize.Height, originalSize.Height);
|
||||
Point = new Point(index * originalSize.Height, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
case ImageLayoutDirection.Vertical:
|
||||
{
|
||||
Size = new Size(sectionSize.Width, sectionSize.Width);
|
||||
Point = new Point(0, index * sectionSize.Width);
|
||||
Size = new Size(originalSize.Width, originalSize.Width);
|
||||
Point = new Point(0, index * originalSize.Width);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace PckStudio.Extensions
|
||||
{
|
||||
public static class ListExtensions
|
||||
internal static class ListExtensions
|
||||
{
|
||||
public static IList<T> Swap<T>(this IList<T> list, int index1, int index2)
|
||||
{
|
||||
@@ -11,5 +11,10 @@ namespace PckStudio.Extensions
|
||||
list[index2] = temp;
|
||||
return list;
|
||||
}
|
||||
|
||||
public static bool IndexInRange<T>(this IList<T> list, int index)
|
||||
{
|
||||
return index >= 0 && index < list.Count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
18
PCK-Studio/Extensions/MathExtensions.cs
Normal file
18
PCK-Studio/Extensions/MathExtensions.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PckStudio.Extensions
|
||||
{
|
||||
internal class MathExtensions
|
||||
{
|
||||
internal static T Clamp<T>(T value, T min, T max) where T : IComparable<T>
|
||||
{
|
||||
if (value.CompareTo(min) < 0) return min;
|
||||
if (value.CompareTo(max) > 0) return max;
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
92
PCK-Studio/Extensions/PckFileDataExtensions.cs
Normal file
92
PCK-Studio/Extensions/PckFileDataExtensions.cs
Normal file
@@ -0,0 +1,92 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using OMI.Formats.Pck;
|
||||
using OMI.Workers;
|
||||
|
||||
namespace PckStudio.Extensions
|
||||
{
|
||||
internal static class PckFileDataExtensions
|
||||
{
|
||||
private const string MipMap = "MipMapLevel";
|
||||
|
||||
private static Image EmptyImage = new Bitmap(1, 1, PixelFormat.Format32bppArgb);
|
||||
|
||||
internal static Image GetTexture(this PckFileData file)
|
||||
{
|
||||
if (file.Filetype != PckFileType.SkinFile &&
|
||||
file.Filetype != PckFileType.CapeFile &&
|
||||
file.Filetype != PckFileType.TextureFile)
|
||||
{
|
||||
throw new Exception("File is not suitable to contain image data.");
|
||||
}
|
||||
using (var stream = new MemoryStream(file.Data))
|
||||
{
|
||||
try
|
||||
{
|
||||
return Image.FromStream(stream);
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
Trace.WriteLine($"Failed to read image from pck file data({file.Filename}).", category: nameof(PckFileDataExtensions) + "." + nameof(GetTexture));
|
||||
Debug.WriteLine(ex.Message);
|
||||
return EmptyImage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal static void SetData(this PckFileData file, IDataFormatWriter writer)
|
||||
{
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
writer.WriteToStream(stream);
|
||||
file.SetData(stream.ToArray());
|
||||
}
|
||||
}
|
||||
|
||||
internal static void SetData(this PckFileData file, Image image, ImageFormat imageFormat)
|
||||
{
|
||||
if (file.Filetype != PckFileType.SkinFile &&
|
||||
file.Filetype != PckFileType.CapeFile &&
|
||||
file.Filetype != PckFileType.TextureFile)
|
||||
{
|
||||
throw new Exception("File is not suitable to contain image data.");
|
||||
}
|
||||
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
image.Save(stream, imageFormat);
|
||||
file.SetData(stream.ToArray());
|
||||
}
|
||||
}
|
||||
|
||||
internal static bool IsMipmappedFile(this PckFileData file)
|
||||
{
|
||||
// We only want to test the file name itself. ex: "terrainMipMapLevel2"
|
||||
string name = Path.GetFileNameWithoutExtension(file.Filename);
|
||||
|
||||
// check if last character is a digit (0-9). If not return false
|
||||
if (!char.IsDigit(name[name.Length - 1]))
|
||||
return false;
|
||||
|
||||
// If string does not end with MipMapLevel, then it's not MipMapped
|
||||
if (!name.Remove(name.Length - 1, 1).EndsWith(MipMap))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
internal static string GetNormalPath(this PckFileData file)
|
||||
{
|
||||
if (!file.IsMipmappedFile())
|
||||
return file.Filename;
|
||||
string ext = Path.GetExtension(file.Filename);
|
||||
return file.Filename.Remove(file.Filename.Length - (MipMap.Length + 1) - ext.Length) + ext;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,35 +5,26 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using OMI.Formats.Pck;
|
||||
using OMI.Workers;
|
||||
|
||||
namespace PckStudio.Extensions
|
||||
{
|
||||
internal static class PckFileExtensions
|
||||
{
|
||||
private const string MipMap = "MipMapLevel";
|
||||
|
||||
internal static bool IsMipmappedFile(this PckFile.FileData file)
|
||||
internal static PckFileData CreateNewFileIf(this PckFile pck, bool condition, string filename, PckFileType filetype, IDataFormatWriter writer)
|
||||
{
|
||||
// We only want to test the file name itself. ex: "terrainMipMapLevel2"
|
||||
string name = Path.GetFileNameWithoutExtension(file.Filename);
|
||||
|
||||
// check if last character is a digit (0-9). If not return false
|
||||
if (!char.IsDigit(name[name.Length - 1]))
|
||||
return false;
|
||||
|
||||
// If string does not end with MipMapLevel, then it's not MipMapped
|
||||
if (!name.Remove(name.Length - 1, 1).EndsWith(MipMap))
|
||||
return false;
|
||||
return true;
|
||||
if (condition)
|
||||
{
|
||||
return pck.CreateNewFile(filename, filetype, writer);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
internal static string GetNormalPath(this PckFile.FileData file)
|
||||
internal static PckFileData CreateNewFile(this PckFile pck, string filename, PckFileType filetype, IDataFormatWriter writer)
|
||||
{
|
||||
if (!file.IsMipmappedFile())
|
||||
return file.Filename;
|
||||
string ext = Path.GetExtension(file.Filename);
|
||||
return file.Filename.Remove(file.Filename.Length - (MipMap.Length + 1) - ext.Length) + ext;
|
||||
var file = pck.CreateNewFile(filename, filetype);
|
||||
file.SetData(writer);
|
||||
return file;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
51
PCK-Studio/Extensions/TreeNodeExtensions.cs
Normal file
51
PCK-Studio/Extensions/TreeNodeExtensions.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PckStudio.Extensions
|
||||
{
|
||||
internal static class TreeNodeExtensions
|
||||
{
|
||||
internal static bool IsTagOfType<T>(this TreeNode node) where T : class
|
||||
{
|
||||
return node.Tag is T;
|
||||
}
|
||||
|
||||
internal static bool TryGetTagData<TOut>(this TreeNode node, out TOut tagData) where TOut : class
|
||||
{
|
||||
if (node?.Tag is TOut _data)
|
||||
{
|
||||
tagData = _data;
|
||||
return true;
|
||||
}
|
||||
tagData = default;
|
||||
return false;
|
||||
}
|
||||
|
||||
internal static bool Contains(this TreeNode thisNode, TreeNode childNode)
|
||||
{
|
||||
if (childNode.Parent == null)
|
||||
return false;
|
||||
if (thisNode.Equals(childNode.Parent))
|
||||
return true;
|
||||
// If the parent node is not equal to the first node,
|
||||
// call the TreeNode.Contains recursively using the parent of the node.
|
||||
return thisNode.Contains(childNode.Parent);
|
||||
}
|
||||
|
||||
internal static List<TreeNode> GetChildNodes(this TreeNode thisNode)
|
||||
{
|
||||
List<TreeNode> nodes = new List<TreeNode>(thisNode.Nodes.Count);
|
||||
foreach (TreeNode node in thisNode.Nodes)
|
||||
{
|
||||
nodes.Add(node);
|
||||
nodes.AddRange(node.GetChildNodes());
|
||||
}
|
||||
return nodes;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
32
PCK-Studio/Features/CemuPanel.Designer.cs
generated
32
PCK-Studio/Features/CemuPanel.Designer.cs
generated
@@ -30,6 +30,9 @@
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.Windows.Forms.TableLayoutPanel layoutPanel;
|
||||
this.gameDirectoryContextMenu = new MetroFramework.Controls.MetroContextMenu(this.components);
|
||||
this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.radioButtonEur = new System.Windows.Forms.RadioButton();
|
||||
this.radioButtonUs = new System.Windows.Forms.RadioButton();
|
||||
this.radioButtonJap = new System.Windows.Forms.RadioButton();
|
||||
@@ -43,6 +46,7 @@
|
||||
this.removePckToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
layoutPanel = new System.Windows.Forms.TableLayoutPanel();
|
||||
layoutPanel.SuspendLayout();
|
||||
this.gameDirectoryContextMenu.SuspendLayout();
|
||||
this.DLCContextMenu.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
@@ -53,6 +57,7 @@
|
||||
layoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33332F));
|
||||
layoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33334F));
|
||||
layoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33334F));
|
||||
layoutPanel.ContextMenuStrip = this.gameDirectoryContextMenu;
|
||||
layoutPanel.Controls.Add(this.radioButtonEur, 0, 1);
|
||||
layoutPanel.Controls.Add(this.radioButtonUs, 1, 1);
|
||||
layoutPanel.Controls.Add(this.radioButtonJap, 2, 1);
|
||||
@@ -71,6 +76,28 @@
|
||||
layoutPanel.Size = new System.Drawing.Size(430, 550);
|
||||
layoutPanel.TabIndex = 4;
|
||||
//
|
||||
// gameDirectoryContextMenu
|
||||
//
|
||||
this.gameDirectoryContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.openToolStripMenuItem,
|
||||
this.copyToolStripMenuItem});
|
||||
this.gameDirectoryContextMenu.Name = "gameDirectoryContextMenu";
|
||||
this.gameDirectoryContextMenu.Size = new System.Drawing.Size(155, 48);
|
||||
//
|
||||
// openToolStripMenuItem
|
||||
//
|
||||
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
|
||||
this.openToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
|
||||
this.openToolStripMenuItem.Text = "Open Directory";
|
||||
this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
|
||||
//
|
||||
// copyToolStripMenuItem
|
||||
//
|
||||
this.copyToolStripMenuItem.Name = "copyToolStripMenuItem";
|
||||
this.copyToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
|
||||
this.copyToolStripMenuItem.Text = "Copy Path";
|
||||
this.copyToolStripMenuItem.Click += new System.EventHandler(this.copyToolStripMenuItem_Click);
|
||||
//
|
||||
// radioButtonEur
|
||||
//
|
||||
this.radioButtonEur.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
@@ -180,7 +207,6 @@
|
||||
this.GameDirectoryTextBox.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.GameDirectoryTextBox.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
this.GameDirectoryTextBox.TextChanged += new System.EventHandler(this.GameDirectoryTextBox_TextChanged);
|
||||
this.GameDirectoryTextBox.Click += new System.EventHandler(this.GameDirectoryTextBox_Click);
|
||||
//
|
||||
// BrowseDirectoryBtn
|
||||
//
|
||||
@@ -265,6 +291,7 @@
|
||||
this.Size = new System.Drawing.Size(430, 550);
|
||||
layoutPanel.ResumeLayout(false);
|
||||
layoutPanel.PerformLayout();
|
||||
this.gameDirectoryContextMenu.ResumeLayout(false);
|
||||
this.DLCContextMenu.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
@@ -283,5 +310,8 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem openTexturePackToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem addCustomPckToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem removePckToolStripMenuItem;
|
||||
private MetroFramework.Controls.MetroContextMenu gameDirectoryContextMenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem copyToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,27 @@
|
||||
using System;
|
||||
/* Copyright (c) 2023-present miku-666
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
* warranty. In no event will the authors be held liable for any damages
|
||||
* arising from the use of this software.
|
||||
*
|
||||
* Permission is granted to anyone to use this software for any purpose,
|
||||
* including commercial applications, and to alter it and redistribute it
|
||||
* freely, subject to the following restrictions:
|
||||
*
|
||||
* 1.The origin of this software must not be misrepresented; you must not
|
||||
* claim that you wrote the original software. If you use this software
|
||||
* in a product, an acknowledgment in the product documentation would be
|
||||
* appreciated but is not required.
|
||||
* 2. Altered source versions must be plainly marked as such, and must not be
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
**/
|
||||
using System;
|
||||
using System.Xml;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using PckStudio.Extensions;
|
||||
using PckStudio.Classes.Misc;
|
||||
using System.Xml.Serialization;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace PckStudio.Features
|
||||
@@ -54,7 +70,7 @@ namespace PckStudio.Features
|
||||
var xml = new XmlDocument();
|
||||
xml.Load(settingsPath);
|
||||
GameDirectoryTextBox.Text = xml.SelectSingleNode("content").SelectSingleNode("mlc_path").InnerText;
|
||||
GameDirectoryTextBox.ReadOnly = true;
|
||||
GameDirectoryTextBox.Enabled = false;
|
||||
BrowseDirectoryBtn.Enabled = false;
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -83,7 +99,7 @@ namespace PckStudio.Features
|
||||
var configNode = xml.SelectSingleNode("config");
|
||||
var mlcpathNode = configNode.SelectSingleNode("MlcPath");
|
||||
GameDirectoryTextBox.Text = mlcpathNode.InnerText;
|
||||
GameDirectoryTextBox.ReadOnly = true;
|
||||
GameDirectoryTextBox.Enabled = false;
|
||||
BrowseDirectoryBtn.Enabled = false;
|
||||
return true;
|
||||
}
|
||||
@@ -311,14 +327,6 @@ namespace PckStudio.Features
|
||||
ListDLCs();
|
||||
}
|
||||
|
||||
private void GameDirectoryTextBox_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (GameDirectoryTextBox.ReadOnly)
|
||||
{
|
||||
Process.Start(GetContentSubDirectory("WiiU", "DLC"));
|
||||
}
|
||||
}
|
||||
|
||||
private void DLCTreeView_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Enter && DLCTreeView.SelectedNode is not null)
|
||||
@@ -332,5 +340,15 @@ namespace PckStudio.Features
|
||||
{
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void openToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Process.Start(GetContentSubDirectory("WiiU", "DLC"));
|
||||
}
|
||||
|
||||
private void copyToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Clipboard.SetText(GameDirectoryTextBox.Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,6 +120,9 @@
|
||||
<metadata name="layoutPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="gameDirectoryContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>165, 17</value>
|
||||
</metadata>
|
||||
<metadata name="DLCContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2022-present miku-666
|
||||
/* Copyright (c) 2023-present miku-666
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
* warranty. In no event will the authors be held liable for any damages
|
||||
* arising from the use of this software.
|
||||
|
||||
@@ -236,7 +236,7 @@ namespace PckStudio.Features
|
||||
var reader = new PckFileReader();
|
||||
currentPCK = reader.FromFile(filepath);
|
||||
if (currentPCK is null) return string.Empty;
|
||||
return currentPCK.TryGetFile("0", PckFile.FileData.FileType.InfoFile, out var file)
|
||||
return currentPCK.TryGetFile("0", PckFileType.InfoFile, out var file)
|
||||
? file.Properties.GetPropertyValue("PACKID")
|
||||
: string.Empty;
|
||||
}
|
||||
@@ -273,7 +273,7 @@ namespace PckStudio.Features
|
||||
client.UploadFile(ms, GetGameContentPath() + "/Common/Media/MediaWiiU.arc");
|
||||
}
|
||||
archive.Clear();
|
||||
currentPCK?.Files.Clear();
|
||||
//currentPCK?.Files.Clear();
|
||||
currentPCK = null;
|
||||
}
|
||||
GC.Collect();
|
||||
|
||||
@@ -5,11 +5,10 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using PckStudio.Models;
|
||||
|
||||
namespace PckStudio.Classes.FileTypes
|
||||
namespace PckStudio.FileFormats
|
||||
{
|
||||
#region File Template
|
||||
#region File Structure
|
||||
/*
|
||||
Version - 4 bytes[int32]
|
||||
NumberOfParts - 4 bytes[int32]
|
||||
@@ -5,7 +5,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using OMI.Formats.Languages;
|
||||
|
||||
namespace PckStudio.Classes.FileTypes
|
||||
namespace PckStudio.FileFormats
|
||||
{
|
||||
public class PckAudioFile
|
||||
{
|
||||
@@ -13,7 +13,7 @@ namespace PckStudio.Popups
|
||||
/// otherwise <see cref="string.Empty"/>
|
||||
/// </summary>
|
||||
public string Filepath => DialogResult == DialogResult.OK ? InputTextBox.Text : string.Empty;
|
||||
public PckFile.FileData.FileType Filetype => (PckFile.FileData.FileType)FileTypeComboBox.SelectedIndex;
|
||||
public PckFileType Filetype => (PckFileType)FileTypeComboBox.SelectedIndex;
|
||||
|
||||
public AddFilePrompt(string initialText) : this(initialText, -1)
|
||||
{ }
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddPropertyPrompt));
|
||||
System.Windows.Forms.Label label1;
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddPropertyPrompt));
|
||||
System.Windows.Forms.Label label2;
|
||||
this.keyTextBox = new System.Windows.Forms.TextBox();
|
||||
this.valueTextBox = new System.Windows.Forms.TextBox();
|
||||
@@ -38,6 +38,18 @@
|
||||
label2 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
resources.ApplyResources(label1, "label1");
|
||||
label1.ForeColor = System.Drawing.Color.White;
|
||||
label1.Name = "label1";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
resources.ApplyResources(label2, "label2");
|
||||
label2.ForeColor = System.Drawing.Color.White;
|
||||
label2.Name = "label2";
|
||||
//
|
||||
// keyTextBox
|
||||
//
|
||||
this.keyTextBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(13)))), ((int)(((byte)(13)))), ((int)(((byte)(13)))));
|
||||
@@ -54,18 +66,6 @@
|
||||
resources.ApplyResources(this.valueTextBox, "valueTextBox");
|
||||
this.valueTextBox.Name = "valueTextBox";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
resources.ApplyResources(label1, "label1");
|
||||
label1.ForeColor = System.Drawing.Color.White;
|
||||
label1.Name = "label1";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
resources.ApplyResources(label2, "label2");
|
||||
label2.ForeColor = System.Drawing.Color.White;
|
||||
label2.Name = "label2";
|
||||
//
|
||||
// saveButton
|
||||
//
|
||||
resources.ApplyResources(this.saveButton, "saveButton");
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,17 +5,18 @@ using System.Windows.Forms;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using PckStudio.ToolboxItems;
|
||||
using PckStudio.Extensions;
|
||||
using PckStudio.Forms.Utilities;
|
||||
using PckStudio.Internal;
|
||||
using PckStudio.Internal.Json;
|
||||
|
||||
namespace PckStudio.Forms.Additional_Popups.Animation
|
||||
{
|
||||
internal partial class ChangeTile : ThemeForm
|
||||
{
|
||||
string selectedTile = "";
|
||||
Editor.Animation.AnimationCategory category = Editor.Animation.AnimationCategory.Blocks;
|
||||
Internal.AnimationCategory category = Internal.AnimationCategory.Blocks;
|
||||
|
||||
public string SelectedTile => selectedTile;
|
||||
public Editor.Animation.AnimationCategory Category => category;
|
||||
public Internal.AnimationCategory Category => category;
|
||||
|
||||
List<TreeNode> treeViewBlockCache = new List<TreeNode>();
|
||||
List<TreeNode> treeViewItemCache = new List<TreeNode>();
|
||||
@@ -23,62 +24,56 @@ namespace PckStudio.Forms.Additional_Popups.Animation
|
||||
public ChangeTile()
|
||||
{
|
||||
InitializeComponent();
|
||||
treeViewBlocks.ImageList = AnimationResources.BlockList;
|
||||
treeViewItems.ImageList = AnimationResources.ItemList;
|
||||
treeViewBlocks.ImageList = Tiles.BlockImageList;
|
||||
treeViewItems.ImageList = Tiles.ItemImageList;
|
||||
InitializeTreeviews();
|
||||
}
|
||||
|
||||
private void InitializeTreeviews()
|
||||
{
|
||||
Stopwatch stopwatch = Stopwatch.StartNew();
|
||||
GetTileDataToView("blocks", treeViewBlocks.Nodes, treeViewBlockCache.Add);
|
||||
GetTileDataToView("items", treeViewItems.Nodes, treeViewItemCache.Add);
|
||||
stopwatch.Stop();
|
||||
Debug.WriteLine($"{nameof(InitializeTreeviews)} took {stopwatch.ElapsedMilliseconds}ms");
|
||||
Profiler.Start();
|
||||
GetTileDataToView(Internal.AnimationCategory.Blocks, treeViewBlocks.Nodes, treeViewBlockCache.Add);
|
||||
GetTileDataToView(Internal.AnimationCategory.Items, treeViewItems.Nodes, treeViewItemCache.Add);
|
||||
Profiler.Stop();
|
||||
}
|
||||
|
||||
private void treeViews_AfterSelect(object sender, TreeViewEventArgs e)
|
||||
{
|
||||
if (e.Node.Tag is string tileData)
|
||||
if (e.Node.Tag is JsonTileInfo tileData)
|
||||
{
|
||||
selectedTile = tileData;
|
||||
Console.WriteLine(selectedTile);
|
||||
selectedTile = tileData.InternalName;
|
||||
Debug.WriteLine(selectedTile);
|
||||
category = e.Node.TreeView == treeViewItems
|
||||
? Editor.Animation.AnimationCategory.Items
|
||||
: Editor.Animation.AnimationCategory.Blocks;
|
||||
? Internal.AnimationCategory.Items
|
||||
: Internal.AnimationCategory.Blocks;
|
||||
}
|
||||
}
|
||||
|
||||
private void GetTileDataToView(string key, TreeNodeCollection collection, Action<TreeNode> additinalAction)
|
||||
private void GetTileDataToView(Internal.AnimationCategory key, TreeNodeCollection collection, Action<TreeNode> additinalAction)
|
||||
{
|
||||
try
|
||||
List<JsonTileInfo> textureInfos = key switch
|
||||
{
|
||||
Internal.AnimationCategory.Blocks => Tiles.BlockTileInfos,
|
||||
Internal.AnimationCategory.Items => Tiles.ItemTileInfos,
|
||||
_ => throw new InvalidOperationException(nameof(key))
|
||||
};
|
||||
Profiler.Start();
|
||||
if (textureInfos is not null)
|
||||
{
|
||||
if (AnimationResources.JsonTileData[key] is not null)
|
||||
{
|
||||
foreach ( (int i, JToken content) in AnimationResources.JsonTileData[key].Children().enumerate())
|
||||
{
|
||||
foreach (JProperty prop in ((JObject)content).Properties())
|
||||
{
|
||||
if (!string.IsNullOrEmpty((string)prop.Value))
|
||||
{
|
||||
TreeNode tileNode = new TreeNode((string)prop.Value)
|
||||
{
|
||||
Tag = prop.Name,
|
||||
ImageIndex = i,
|
||||
SelectedImageIndex = i,
|
||||
};
|
||||
collection.Add(tileNode);
|
||||
additinalAction(tileNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Newtonsoft.Json.JsonException j_ex)
|
||||
{
|
||||
MessageBox.Show(j_ex.Message, "Error");
|
||||
return;
|
||||
foreach ((int i, var content) in textureInfos.enumerate())
|
||||
{
|
||||
if (string.IsNullOrEmpty(content.InternalName) || collection.ContainsKey(content.InternalName))
|
||||
continue;
|
||||
TreeNode tileNode = new TreeNode(content.DisplayName, i, i)
|
||||
{
|
||||
Name = content.InternalName,
|
||||
Tag = content
|
||||
};
|
||||
collection.Add(tileNode);
|
||||
additinalAction(tileNode);
|
||||
}
|
||||
}
|
||||
Profiler.Stop();
|
||||
}
|
||||
|
||||
void filter_TextChanged(object sender, EventArgs e)
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace PckStudio.Forms.Additional_Popups.Animation
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.FrameTimeUpDown.Minimum = new decimal(new int[] {
|
||||
this.FrameTimeUpDown.Minimum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
namespace PckStudio.Forms.Additional_Popups.Audio
|
||||
{
|
||||
partial class CreditsEditor
|
||||
{
|
||||
/// <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(CreditsEditor));
|
||||
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
|
||||
this.SaveButton = new CBH.Ultimate.Controls.CrEaTiiOn_Ultimate_GradientButton();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// richTextBox1
|
||||
//
|
||||
resources.ApplyResources(this.richTextBox1, "richTextBox1");
|
||||
this.richTextBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(30)))), ((int)(((byte)(30)))));
|
||||
this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.richTextBox1.ForeColor = System.Drawing.Color.White;
|
||||
this.richTextBox1.Name = "richTextBox1";
|
||||
//
|
||||
// SaveButton
|
||||
//
|
||||
this.SaveButton.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.SaveButton.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.SaveButton.BorderRadius = 10;
|
||||
this.SaveButton.BorderSize = 1;
|
||||
this.SaveButton.ClickedColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(15)))), ((int)(((byte)(15)))));
|
||||
this.SaveButton.FlatAppearance.BorderSize = 0;
|
||||
this.SaveButton.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(15)))), ((int)(((byte)(15)))));
|
||||
this.SaveButton.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(250)))), ((int)(((byte)(165)))));
|
||||
resources.ApplyResources(this.SaveButton, "SaveButton");
|
||||
this.SaveButton.ForeColor = System.Drawing.Color.White;
|
||||
this.SaveButton.GradientColorPrimary = System.Drawing.Color.FromArgb(((int)(((byte)(70)))), ((int)(((byte)(70)))), ((int)(((byte)(70)))));
|
||||
this.SaveButton.GradientColorSecondary = System.Drawing.Color.FromArgb(((int)(((byte)(70)))), ((int)(((byte)(70)))), ((int)(((byte)(70)))));
|
||||
this.SaveButton.HoverOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(250)))), ((int)(((byte)(165)))));
|
||||
this.SaveButton.Name = "SaveButton";
|
||||
this.SaveButton.TextColor = System.Drawing.Color.White;
|
||||
this.SaveButton.UseVisualStyleBackColor = false;
|
||||
this.SaveButton.Click += new System.EventHandler(this.SaveButton_Click);
|
||||
//
|
||||
// CreditsEditor
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.Controls.Add(this.SaveButton);
|
||||
this.Controls.Add(this.richTextBox1);
|
||||
this.ForeColor = System.Drawing.Color.White;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "CreditsEditor";
|
||||
this.Load += new System.EventHandler(this.creditsEditor_Load);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private System.Windows.Forms.RichTextBox richTextBox1;
|
||||
private CBH.Ultimate.Controls.CrEaTiiOn_Ultimate_GradientButton SaveButton;
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
using PckStudio.ToolboxItems;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
// Audio Editor by MattNL
|
||||
|
||||
namespace PckStudio.Forms.Additional_Popups.Audio
|
||||
{
|
||||
public partial class CreditsEditor : ThemeForm
|
||||
{
|
||||
public string Credits => richTextBox1.Text;
|
||||
public CreditsEditor(string cred)
|
||||
{
|
||||
InitializeComponent();
|
||||
richTextBox1.Text = cred;
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void creditsEditor_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void SaveButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -34,6 +34,7 @@
|
||||
this.metroComboBox1 = new MetroFramework.Controls.MetroComboBox();
|
||||
this.TextLabel = new System.Windows.Forms.Label();
|
||||
this.InputTextBox = new MetroFramework.Controls.MetroTextBox();
|
||||
this.createSkinsPckCheckBox = new CBH.Controls.CrEaTiiOn_ModernCheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// OkButton
|
||||
@@ -127,11 +128,25 @@
|
||||
this.InputTextBox.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.InputTextBox.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// createSkinsPckCheckBox
|
||||
//
|
||||
this.createSkinsPckCheckBox.BackColor = System.Drawing.Color.Transparent;
|
||||
this.createSkinsPckCheckBox.Checked = false;
|
||||
this.createSkinsPckCheckBox.CheckedBackColorA = System.Drawing.Color.Transparent;
|
||||
this.createSkinsPckCheckBox.CheckedBackColorB = System.Drawing.Color.Transparent;
|
||||
this.createSkinsPckCheckBox.CheckedBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200)))));
|
||||
this.createSkinsPckCheckBox.CheckedColor = System.Drawing.Color.FromArgb(((int)(((byte)(250)))), ((int)(((byte)(36)))), ((int)(((byte)(38)))));
|
||||
this.createSkinsPckCheckBox.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
resources.ApplyResources(this.createSkinsPckCheckBox, "createSkinsPckCheckBox");
|
||||
this.createSkinsPckCheckBox.ForeColor = System.Drawing.Color.White;
|
||||
this.createSkinsPckCheckBox.Name = "createSkinsPckCheckBox";
|
||||
//
|
||||
// CreateTexturePack
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.Controls.Add(this.createSkinsPckCheckBox);
|
||||
this.Controls.Add(this.OkButton);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.metroComboBox1);
|
||||
@@ -153,5 +168,6 @@
|
||||
private MetroFramework.Controls.MetroComboBox metroComboBox1;
|
||||
public System.Windows.Forms.Label label1;
|
||||
private CBH.Ultimate.Controls.CrEaTiiOn_Ultimate_GradientButton OkButton;
|
||||
private CBH.Controls.CrEaTiiOn_ModernCheckBox createSkinsPckCheckBox;
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ namespace PckStudio
|
||||
/// <summary>
|
||||
/// Text entered <c>only access when DialogResult == DialogResult.OK</c>
|
||||
/// </summary>
|
||||
public bool CreateSkinsPck => createSkinsPckCheckBox.Checked;
|
||||
public string PackName => InputTextBox.Text;
|
||||
public string PackRes => metroComboBox1.Text;
|
||||
|
||||
@@ -127,19 +127,19 @@
|
||||
</data>
|
||||
<data name="OkButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAABBSURBVFhH7dIxCgAgFMPQ3v/SumR3sHwQ8zZBagYjPW2B4zzeN8AAAwzoB7Bbx/wZ9+uY72HX
|
||||
T2iAAQZ8HCDdSzYZRU7AU4PQAAAAAABJRU5ErkJggg==
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAEFJREFUWEft
|
||||
0jEKACAUw9De/9K6ZHewfBDzNkFqBiM9bYHjPN43wAADDOgHsFvH/Bn365jvYddPaIABBnwcIN1LNhlF
|
||||
TsBTg9AAAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="OkButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="OkButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>72, 71</value>
|
||||
<value>147, 71</value>
|
||||
</data>
|
||||
<data name="OkButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>120, 40</value>
|
||||
<value>102, 40</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="OkButton.TabIndex" type="System.Int32, mscorlib">
|
||||
@@ -158,13 +158,13 @@
|
||||
<value>OkButton</value>
|
||||
</data>
|
||||
<data name=">>OkButton.Type" xml:space="preserve">
|
||||
<value>CBH.Ultimate.Controls.CrEaTiiOn_Ultimate_GradientButton, CBH-Ultimate-Theme-Library-NET-Framework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>CBH.Ultimate.Controls.CrEaTiiOn_Ultimate_GradientButton, CBH-WinForm-Theme-Library, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>OkButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>OkButton.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -197,7 +197,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="metroComboBox1.ItemHeight" type="System.Int32, mscorlib">
|
||||
<value>23</value>
|
||||
@@ -248,7 +248,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>metroComboBox1.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="TextLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -281,7 +281,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>TextLabel.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="resource.Image" type="System.Resources.ResXNullRef, System.Windows.Forms">
|
||||
<value />
|
||||
@@ -320,7 +320,34 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>InputTextBox.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="createSkinsPckCheckBox.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 8.25pt</value>
|
||||
</data>
|
||||
<data name="createSkinsPckCheckBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 94</value>
|
||||
</data>
|
||||
<data name="createSkinsPckCheckBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>129, 15</value>
|
||||
</data>
|
||||
<data name="createSkinsPckCheckBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>18</value>
|
||||
</data>
|
||||
<data name="createSkinsPckCheckBox.Text" xml:space="preserve">
|
||||
<value>Create Skins.pck file</value>
|
||||
</data>
|
||||
<data name=">>createSkinsPckCheckBox.Name" xml:space="preserve">
|
||||
<value>createSkinsPckCheckBox</value>
|
||||
</data>
|
||||
<data name=">>createSkinsPckCheckBox.Type" xml:space="preserve">
|
||||
<value>CBH.Controls.CrEaTiiOn_ModernCheckBox, CBH-WinForm-Theme-Library, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>createSkinsPckCheckBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>createSkinsPckCheckBox.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">
|
||||
<value>True</value>
|
||||
@@ -2840,9 +2867,6 @@
|
||||
AP//AAA=
|
||||
</value>
|
||||
</data>
|
||||
<data name="$this.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="$this.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
@@ -1,162 +0,0 @@
|
||||
namespace PckStudio
|
||||
{
|
||||
partial class CreditsForm
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroLabel2 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroLabel3 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroLabel4 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroLabel5 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroLabel6 = new MetroFramework.Controls.MetroLabel();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pictureBox1.Enabled = false;
|
||||
this.pictureBox1.Image = global::PckStudio.Properties.Resources.Splash;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(4, 5);
|
||||
this.pictureBox1.Margin = new System.Windows.Forms.Padding(0, 0, 11, 0);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(550, 293);
|
||||
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.pictureBox1.TabIndex = 0;
|
||||
this.pictureBox1.TabStop = false;
|
||||
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
|
||||
this.pictureBox1.DoubleClick += new System.EventHandler(this.pictureBox1_Click);
|
||||
//
|
||||
// metroLabel1
|
||||
//
|
||||
this.metroLabel1.AutoSize = true;
|
||||
this.metroLabel1.Enabled = false;
|
||||
this.metroLabel1.Location = new System.Drawing.Point(4, 301);
|
||||
this.metroLabel1.Name = "metroLabel1";
|
||||
this.metroLabel1.Size = new System.Drawing.Size(250, 19);
|
||||
this.metroLabel1.TabIndex = 1;
|
||||
this.metroLabel1.Text = "Restored and maintained by PhoenixARC";
|
||||
this.metroLabel1.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// metroLabel2
|
||||
//
|
||||
this.metroLabel2.AutoSize = true;
|
||||
this.metroLabel2.Enabled = false;
|
||||
this.metroLabel2.Location = new System.Drawing.Point(314, 301);
|
||||
this.metroLabel2.Name = "metroLabel2";
|
||||
this.metroLabel2.Size = new System.Drawing.Size(269, 19);
|
||||
this.metroLabel2.TabIndex = 2;
|
||||
this.metroLabel2.Text = "Utilizing the Nobledez Website by Newagent";
|
||||
this.metroLabel2.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// metroLabel3
|
||||
//
|
||||
this.metroLabel3.AutoSize = true;
|
||||
this.metroLabel3.Enabled = false;
|
||||
this.metroLabel3.Location = new System.Drawing.Point(314, 339);
|
||||
this.metroLabel3.Name = "metroLabel3";
|
||||
this.metroLabel3.Size = new System.Drawing.Size(212, 19);
|
||||
this.metroLabel3.TabIndex = 3;
|
||||
this.metroLabel3.Text = "3D skin renderer by Łukasz Rejman";
|
||||
this.metroLabel3.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// metroLabel4
|
||||
//
|
||||
this.metroLabel4.AutoSize = true;
|
||||
this.metroLabel4.Enabled = false;
|
||||
this.metroLabel4.Location = new System.Drawing.Point(314, 320);
|
||||
this.metroLabel4.Name = "metroLabel4";
|
||||
this.metroLabel4.Size = new System.Drawing.Size(199, 19);
|
||||
this.metroLabel4.TabIndex = 4;
|
||||
this.metroLabel4.Text = "3D renderer found by Newagent";
|
||||
this.metroLabel4.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// metroLabel5
|
||||
//
|
||||
this.metroLabel5.AutoSize = true;
|
||||
this.metroLabel5.Enabled = false;
|
||||
this.metroLabel5.Location = new System.Drawing.Point(4, 320);
|
||||
this.metroLabel5.Name = "metroLabel5";
|
||||
this.metroLabel5.Size = new System.Drawing.Size(300, 19);
|
||||
this.metroLabel5.TabIndex = 5;
|
||||
this.metroLabel5.Text = "Additional development by MattNL and Miku-666";
|
||||
this.metroLabel5.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// metroLabel6
|
||||
//
|
||||
this.metroLabel6.AutoSize = true;
|
||||
this.metroLabel6.Enabled = false;
|
||||
this.metroLabel6.Location = new System.Drawing.Point(4, 339);
|
||||
this.metroLabel6.Name = "metroLabel6";
|
||||
this.metroLabel6.Size = new System.Drawing.Size(203, 19);
|
||||
this.metroLabel6.TabIndex = 6;
|
||||
this.metroLabel6.Text = "Code base overhaul by Miku-666";
|
||||
this.metroLabel6.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// programInfo
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(585, 364);
|
||||
this.Controls.Add(this.metroLabel6);
|
||||
this.Controls.Add(this.metroLabel1);
|
||||
this.Controls.Add(this.metroLabel5);
|
||||
this.Controls.Add(this.metroLabel4);
|
||||
this.Controls.Add(this.metroLabel3);
|
||||
this.Controls.Add(this.metroLabel2);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.DisplayHeader = false;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "programInfo";
|
||||
this.Padding = new System.Windows.Forms.Padding(20, 30, 20, 20);
|
||||
this.Resizable = false;
|
||||
this.ShadowType = MetroFramework.Forms.MetroFormShadowType.DropShadow;
|
||||
this.Style = MetroFramework.MetroColorStyle.Black;
|
||||
this.Text = "programInfo";
|
||||
this.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel1;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel2;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel3;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel4;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel5;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel6;
|
||||
}
|
||||
}
|
||||
@@ -28,143 +28,145 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.acceptBtn = new System.Windows.Forms.Button();
|
||||
this.CancelBtn = new System.Windows.Forms.Button();
|
||||
this.treeViewEntity = new System.Windows.Forms.TreeView();
|
||||
this.metroLabel2 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroTextBox1 = new MetroFramework.Controls.MetroTextBox();
|
||||
this.metroTabControl1 = new MetroFramework.Controls.MetroTabControl();
|
||||
this.Blocks = new System.Windows.Forms.TabPage();
|
||||
this.metroTabControl1.SuspendLayout();
|
||||
this.Blocks.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// acceptBtn
|
||||
//
|
||||
this.acceptBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.acceptBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.acceptBtn.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.acceptBtn.Location = new System.Drawing.Point(92, 196);
|
||||
this.acceptBtn.Name = "acceptBtn";
|
||||
this.acceptBtn.Size = new System.Drawing.Size(75, 23);
|
||||
this.acceptBtn.TabIndex = 7;
|
||||
this.acceptBtn.Text = "Add";
|
||||
this.acceptBtn.UseVisualStyleBackColor = true;
|
||||
this.acceptBtn.Click += new System.EventHandler(this.AcceptBtn_Click);
|
||||
//
|
||||
// CancelBtn
|
||||
//
|
||||
this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.CancelBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.CancelBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.CancelBtn.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.CancelBtn.Location = new System.Drawing.Point(172, 196);
|
||||
this.CancelBtn.Name = "CancelBtn";
|
||||
this.CancelBtn.Size = new System.Drawing.Size(75, 23);
|
||||
this.CancelBtn.TabIndex = 13;
|
||||
this.CancelBtn.Text = "Cancel";
|
||||
this.CancelBtn.UseVisualStyleBackColor = true;
|
||||
this.CancelBtn.Click += new System.EventHandler(this.CancelBtn_Click);
|
||||
//
|
||||
// treeViewEntity
|
||||
//
|
||||
this.treeViewEntity.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.treeViewEntity.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.treeViewEntity.ForeColor = System.Drawing.Color.White;
|
||||
this.treeViewEntity.Location = new System.Drawing.Point(0, 0);
|
||||
this.treeViewEntity.Name = "treeViewEntity";
|
||||
this.treeViewEntity.Size = new System.Drawing.Size(318, 142);
|
||||
this.treeViewEntity.TabIndex = 14;
|
||||
this.treeViewEntity.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeViews_AfterSelect);
|
||||
//
|
||||
// metroLabel2
|
||||
//
|
||||
this.metroLabel2.AutoSize = true;
|
||||
this.metroLabel2.Location = new System.Drawing.Point(133, 19);
|
||||
this.metroLabel2.Name = "metroLabel2";
|
||||
this.metroLabel2.Size = new System.Drawing.Size(46, 19);
|
||||
this.metroLabel2.TabIndex = 16;
|
||||
this.metroLabel2.Text = "Filter: ";
|
||||
this.metroLabel2.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// metroTextBox1
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.metroTextBox1.CustomButton.Image = null;
|
||||
this.metroTextBox1.CustomButton.Location = new System.Drawing.Point(134, 1);
|
||||
this.metroTextBox1.CustomButton.Name = "";
|
||||
this.metroTextBox1.CustomButton.Size = new System.Drawing.Size(21, 21);
|
||||
this.metroTextBox1.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.metroTextBox1.CustomButton.TabIndex = 1;
|
||||
this.metroTextBox1.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.metroTextBox1.CustomButton.UseSelectable = true;
|
||||
this.metroTextBox1.CustomButton.Visible = false;
|
||||
this.metroTextBox1.Lines = new string[0];
|
||||
this.metroTextBox1.Location = new System.Drawing.Point(173, 18);
|
||||
this.metroTextBox1.MaxLength = 32767;
|
||||
this.metroTextBox1.Name = "metroTextBox1";
|
||||
this.metroTextBox1.PasswordChar = '\0';
|
||||
this.metroTextBox1.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.metroTextBox1.SelectedText = "";
|
||||
this.metroTextBox1.SelectionLength = 0;
|
||||
this.metroTextBox1.SelectionStart = 0;
|
||||
this.metroTextBox1.ShortcutsEnabled = true;
|
||||
this.metroTextBox1.Size = new System.Drawing.Size(156, 23);
|
||||
this.metroTextBox1.TabIndex = 17;
|
||||
this.metroTextBox1.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroTextBox1.UseSelectable = true;
|
||||
this.metroTextBox1.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.metroTextBox1.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
this.metroTextBox1.TextChanged += new System.EventHandler(this.filter_TextChanged);
|
||||
//
|
||||
// metroTabControl1
|
||||
//
|
||||
this.metroTabControl1.Controls.Add(this.Blocks);
|
||||
this.metroTabControl1.Location = new System.Drawing.Point(6, 8);
|
||||
this.metroTabControl1.Name = "metroTabControl1";
|
||||
this.metroTabControl1.SelectedIndex = 0;
|
||||
this.metroTabControl1.Size = new System.Drawing.Size(326, 184);
|
||||
this.metroTabControl1.Style = MetroFramework.MetroColorStyle.White;
|
||||
this.metroTabControl1.TabIndex = 18;
|
||||
this.metroTabControl1.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroTabControl1.UseSelectable = true;
|
||||
//
|
||||
// Blocks
|
||||
//
|
||||
this.Blocks.BackColor = System.Drawing.SystemColors.WindowFrame;
|
||||
this.Blocks.Controls.Add(this.treeViewEntity);
|
||||
this.Blocks.Location = new System.Drawing.Point(4, 38);
|
||||
this.Blocks.Name = "Blocks";
|
||||
this.Blocks.Size = new System.Drawing.Size(318, 142);
|
||||
this.Blocks.TabIndex = 0;
|
||||
this.Blocks.Text = "Entities";
|
||||
//
|
||||
// AddBehaviour
|
||||
//
|
||||
this.AcceptButton = this.acceptBtn;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.CancelBtn;
|
||||
this.ClientSize = new System.Drawing.Size(338, 228);
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.metroTextBox1);
|
||||
this.Controls.Add(this.metroLabel2);
|
||||
this.Controls.Add(this.metroTabControl1);
|
||||
this.Controls.Add(this.CancelBtn);
|
||||
this.Controls.Add(this.acceptBtn);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "AddBehaviour";
|
||||
this.Resizable = false;
|
||||
this.Style = MetroFramework.MetroColorStyle.Silver;
|
||||
this.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroTabControl1.ResumeLayout(false);
|
||||
this.Blocks.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddEntry));
|
||||
this.acceptBtn = new System.Windows.Forms.Button();
|
||||
this.CancelBtn = new System.Windows.Forms.Button();
|
||||
this.treeViewEntity = new System.Windows.Forms.TreeView();
|
||||
this.metroLabel2 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroTextBox1 = new MetroFramework.Controls.MetroTextBox();
|
||||
this.metroTabControl1 = new MetroFramework.Controls.MetroTabControl();
|
||||
this.Blocks = new System.Windows.Forms.TabPage();
|
||||
this.metroTabControl1.SuspendLayout();
|
||||
this.Blocks.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// acceptBtn
|
||||
//
|
||||
this.acceptBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.acceptBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.acceptBtn.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.acceptBtn.Location = new System.Drawing.Point(92, 196);
|
||||
this.acceptBtn.Name = "acceptBtn";
|
||||
this.acceptBtn.Size = new System.Drawing.Size(75, 23);
|
||||
this.acceptBtn.TabIndex = 7;
|
||||
this.acceptBtn.Text = "Add";
|
||||
this.acceptBtn.UseVisualStyleBackColor = true;
|
||||
this.acceptBtn.Click += new System.EventHandler(this.AcceptBtn_Click);
|
||||
//
|
||||
// CancelBtn
|
||||
//
|
||||
this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.CancelBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.CancelBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.CancelBtn.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.CancelBtn.Location = new System.Drawing.Point(172, 196);
|
||||
this.CancelBtn.Name = "CancelBtn";
|
||||
this.CancelBtn.Size = new System.Drawing.Size(75, 23);
|
||||
this.CancelBtn.TabIndex = 13;
|
||||
this.CancelBtn.Text = "Cancel";
|
||||
this.CancelBtn.UseVisualStyleBackColor = true;
|
||||
this.CancelBtn.Click += new System.EventHandler(this.CancelBtn_Click);
|
||||
//
|
||||
// treeViewEntity
|
||||
//
|
||||
this.treeViewEntity.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.treeViewEntity.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.treeViewEntity.ForeColor = System.Drawing.Color.White;
|
||||
this.treeViewEntity.Location = new System.Drawing.Point(0, 0);
|
||||
this.treeViewEntity.Name = "treeViewEntity";
|
||||
this.treeViewEntity.Size = new System.Drawing.Size(318, 142);
|
||||
this.treeViewEntity.TabIndex = 14;
|
||||
this.treeViewEntity.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeViews_AfterSelect);
|
||||
//
|
||||
// metroLabel2
|
||||
//
|
||||
this.metroLabel2.AutoSize = true;
|
||||
this.metroLabel2.Location = new System.Drawing.Point(133, 19);
|
||||
this.metroLabel2.Name = "metroLabel2";
|
||||
this.metroLabel2.Size = new System.Drawing.Size(46, 19);
|
||||
this.metroLabel2.TabIndex = 16;
|
||||
this.metroLabel2.Text = "Filter: ";
|
||||
this.metroLabel2.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// metroTextBox1
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.metroTextBox1.CustomButton.Image = null;
|
||||
this.metroTextBox1.CustomButton.Location = new System.Drawing.Point(134, 1);
|
||||
this.metroTextBox1.CustomButton.Name = "";
|
||||
this.metroTextBox1.CustomButton.Size = new System.Drawing.Size(21, 21);
|
||||
this.metroTextBox1.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.metroTextBox1.CustomButton.TabIndex = 1;
|
||||
this.metroTextBox1.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.metroTextBox1.CustomButton.UseSelectable = true;
|
||||
this.metroTextBox1.CustomButton.Visible = false;
|
||||
this.metroTextBox1.Lines = new string[0];
|
||||
this.metroTextBox1.Location = new System.Drawing.Point(173, 18);
|
||||
this.metroTextBox1.MaxLength = 32767;
|
||||
this.metroTextBox1.Name = "metroTextBox1";
|
||||
this.metroTextBox1.PasswordChar = '\0';
|
||||
this.metroTextBox1.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.metroTextBox1.SelectedText = "";
|
||||
this.metroTextBox1.SelectionLength = 0;
|
||||
this.metroTextBox1.SelectionStart = 0;
|
||||
this.metroTextBox1.ShortcutsEnabled = true;
|
||||
this.metroTextBox1.Size = new System.Drawing.Size(156, 23);
|
||||
this.metroTextBox1.TabIndex = 17;
|
||||
this.metroTextBox1.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroTextBox1.UseSelectable = true;
|
||||
this.metroTextBox1.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.metroTextBox1.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
this.metroTextBox1.TextChanged += new System.EventHandler(this.filter_TextChanged);
|
||||
//
|
||||
// metroTabControl1
|
||||
//
|
||||
this.metroTabControl1.Controls.Add(this.Blocks);
|
||||
this.metroTabControl1.Location = new System.Drawing.Point(6, 8);
|
||||
this.metroTabControl1.Name = "metroTabControl1";
|
||||
this.metroTabControl1.SelectedIndex = 0;
|
||||
this.metroTabControl1.Size = new System.Drawing.Size(326, 184);
|
||||
this.metroTabControl1.Style = MetroFramework.MetroColorStyle.White;
|
||||
this.metroTabControl1.TabIndex = 18;
|
||||
this.metroTabControl1.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroTabControl1.UseSelectable = true;
|
||||
//
|
||||
// Blocks
|
||||
//
|
||||
this.Blocks.BackColor = System.Drawing.SystemColors.WindowFrame;
|
||||
this.Blocks.Controls.Add(this.treeViewEntity);
|
||||
this.Blocks.Location = new System.Drawing.Point(4, 38);
|
||||
this.Blocks.Name = "Blocks";
|
||||
this.Blocks.Size = new System.Drawing.Size(318, 142);
|
||||
this.Blocks.TabIndex = 0;
|
||||
this.Blocks.Text = "Entities";
|
||||
//
|
||||
// AddEntry
|
||||
//
|
||||
this.AcceptButton = this.acceptBtn;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.CancelBtn;
|
||||
this.ClientSize = new System.Drawing.Size(338, 228);
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.metroTextBox1);
|
||||
this.Controls.Add(this.metroLabel2);
|
||||
this.Controls.Add(this.metroTabControl1);
|
||||
this.Controls.Add(this.CancelBtn);
|
||||
this.Controls.Add(this.acceptBtn);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "AddEntry";
|
||||
this.Resizable = false;
|
||||
this.Style = MetroFramework.MetroColorStyle.Silver;
|
||||
this.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroTabControl1.ResumeLayout(false);
|
||||
this.Blocks.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -34,6 +34,8 @@
|
||||
this.CancelButton = new CBH.Ultimate.Controls.CrEaTiiOn_Ultimate_GradientButton();
|
||||
this.CreateButton = new CBH.Ultimate.Controls.CrEaTiiOn_Ultimate_GradientButton();
|
||||
this.ValueTextBox = new MetroFramework.Controls.MetroTextBox();
|
||||
this.availableComboBox = new MetroFramework.Controls.MetroComboBox();
|
||||
metroLabel1 = new MetroFramework.Controls.MetroLabel();
|
||||
this.NameTextBox = new MetroFramework.Controls.MetroTextBox();
|
||||
metroLabel2 = new MetroFramework.Controls.MetroLabel();
|
||||
metroLabel1 = new MetroFramework.Controls.MetroLabel();
|
||||
@@ -181,6 +183,20 @@
|
||||
this.NameTextBox.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.NameTextBox.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// availableComboBox
|
||||
//
|
||||
this.availableComboBox.FormattingEnabled = true;
|
||||
this.availableComboBox.ItemHeight = 23;
|
||||
this.availableComboBox.Location = new System.Drawing.Point(72, 21);
|
||||
this.availableComboBox.Name = "availableComboBox";
|
||||
this.availableComboBox.Size = new System.Drawing.Size(165, 29);
|
||||
this.availableComboBox.Style = MetroFramework.MetroColorStyle.Silver;
|
||||
this.availableComboBox.TabIndex = 6;
|
||||
this.availableComboBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.availableComboBox.UseSelectable = true;
|
||||
this.availableComboBox.Visible = false;
|
||||
this.availableComboBox.SelectedIndexChanged += new System.EventHandler(this.availableComboBox_SelectedIndexChanged);
|
||||
//
|
||||
// AddParameter
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
@@ -213,5 +229,6 @@
|
||||
private MetroFramework.Controls.MetroTextBox NameTextBox;
|
||||
private CBH.Ultimate.Controls.CrEaTiiOn_Ultimate_GradientButton CancelButton;
|
||||
private CBH.Ultimate.Controls.CrEaTiiOn_Ultimate_GradientButton CreateButton;
|
||||
private MetroFramework.Controls.MetroComboBox availableComboBox;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
using PckStudio.ToolboxItems;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using OMI.Formats.GameRule;
|
||||
using PckStudio.Properties;
|
||||
|
||||
namespace PckStudio.Forms.Additional_Popups.Grf
|
||||
{
|
||||
@@ -8,19 +10,35 @@ namespace PckStudio.Forms.Additional_Popups.Grf
|
||||
{
|
||||
public string ParameterName => NameTextBox.Text;
|
||||
public string ParameterValue => ValueTextBox.Text;
|
||||
|
||||
private bool _useComboBox
|
||||
{
|
||||
get
|
||||
{
|
||||
return availableComboBox.Visible && !NameTextBox.Visible;
|
||||
}
|
||||
set
|
||||
{
|
||||
NameTextBox.Visible = !value;
|
||||
availableComboBox.Visible = value;
|
||||
}
|
||||
}
|
||||
|
||||
public AddParameter()
|
||||
{
|
||||
InitializeComponent();
|
||||
availableComboBox.Items.Clear();
|
||||
availableComboBox.Items.AddRange(GameRuleFile.GameRule.ValidParameters);
|
||||
_useComboBox = Settings.Default.UseComboBoxForGRFParameter;
|
||||
}
|
||||
public AddParameter(string parameterName, string parameterValue) : this()
|
||||
|
||||
public AddParameter(string parameterName, string parameterValue, bool isKeyReadonly = true) : this()
|
||||
{
|
||||
NameTextBox.Text = parameterName;
|
||||
ValueTextBox.Text = parameterValue;
|
||||
}
|
||||
|
||||
public AddParameter(string parameterName, string parameterValue, bool parameterNameBoxEnabled = true) : this(parameterName, parameterValue)
|
||||
{
|
||||
NameTextBox.Enabled = parameterNameBoxEnabled;
|
||||
NameTextBox.Enabled = isKeyReadonly;
|
||||
availableComboBox.Enabled = isKeyReadonly;
|
||||
availableComboBox.SelectedItem = parameterName;
|
||||
}
|
||||
|
||||
private void ConfirmButton_Click(object sender, EventArgs e)
|
||||
@@ -46,7 +64,11 @@ namespace PckStudio.Forms.Additional_Popups.Grf
|
||||
return;
|
||||
}
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void availableComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
NameTextBox.Text = availableComboBox.SelectedItem.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -8,6 +8,17 @@ namespace PckStudio.Forms.Additional_Popups
|
||||
{
|
||||
public string SelectedItem => DialogResult == DialogResult.OK ? ComboBox.Text : string.Empty;
|
||||
|
||||
public string LabelText
|
||||
{
|
||||
get => label2.Text;
|
||||
set => label2.Text = value;
|
||||
}
|
||||
public string ButtonText
|
||||
{
|
||||
get => okBtn.Text;
|
||||
set => okBtn.Text = value;
|
||||
}
|
||||
|
||||
public ItemSelectionPopUp(params string[] items)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -82,10 +82,6 @@
|
||||
this.ClientSize = new System.Drawing.Size(289, 101);
|
||||
this.Controls.Add(this.AddButton);
|
||||
this.Controls.Add(this.LanguageComboBox);
|
||||
this.Font = new System.Drawing.Font("Segoe UI", 8.25F);
|
||||
this.ForeColor = System.Drawing.Color.White;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Location = new System.Drawing.Point(0, 0);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(289, 140);
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MultiTextPrompt));
|
||||
this.PromptTextBox = new MetroFramework.Controls.MetroTextBox();
|
||||
this.okBtn = new MetroFramework.Controls.MetroButton();
|
||||
this.cancelBtn = new MetroFramework.Controls.MetroButton();
|
||||
@@ -94,7 +95,7 @@
|
||||
this.cancelBtn.UseSelectable = true;
|
||||
this.cancelBtn.Click += new System.EventHandler(this.cancelBtn_Click);
|
||||
//
|
||||
// TextPrompt
|
||||
// MultiTextPrompt
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
@@ -102,9 +103,10 @@
|
||||
this.Controls.Add(this.cancelBtn);
|
||||
this.Controls.Add(this.okBtn);
|
||||
this.Controls.Add(this.PromptTextBox);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(270, 335);
|
||||
this.Name = "TextPrompt";
|
||||
this.Name = "MultiTextPrompt";
|
||||
this.Padding = new System.Windows.Forms.Padding(20, 60, 20, 40);
|
||||
this.Style = MetroFramework.MetroColorStyle.Black;
|
||||
this.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -28,61 +28,61 @@
|
||||
/// </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();
|
||||
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();
|
||||
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
167
PCK-Studio/Forms/AppSettingsForm.Designer.cs
generated
Normal file
167
PCK-Studio/Forms/AppSettingsForm.Designer.cs
generated
Normal file
@@ -0,0 +1,167 @@
|
||||
namespace PckStudio.Forms
|
||||
{
|
||||
partial class AppSettingsForm
|
||||
{
|
||||
/// <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(AppSettingsForm));
|
||||
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.grf_paramKeyComboBoxCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// autoSaveCheckBox
|
||||
//
|
||||
this.autoSaveCheckBox.AutoSize = true;
|
||||
this.autoSaveCheckBox.Location = new System.Drawing.Point(12, 12);
|
||||
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(12, 33);
|
||||
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(12, 54);
|
||||
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(12, 75);
|
||||
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(12, 96);
|
||||
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);
|
||||
//
|
||||
// grf_paramKeyComboBoxCheckBox
|
||||
//
|
||||
this.grf_paramKeyComboBoxCheckBox.AutoSize = true;
|
||||
this.grf_paramKeyComboBoxCheckBox.Location = new System.Drawing.Point(12, 118);
|
||||
this.grf_paramKeyComboBoxCheckBox.Name = "grf_paramKeyComboBoxCheckBox";
|
||||
this.grf_paramKeyComboBoxCheckBox.Size = new System.Drawing.Size(100, 15);
|
||||
this.grf_paramKeyComboBoxCheckBox.Style = MetroFramework.MetroColorStyle.White;
|
||||
this.grf_paramKeyComboBoxCheckBox.TabIndex = 5;
|
||||
this.grf_paramKeyComboBoxCheckBox.Text = "Select GRF Key";
|
||||
this.grf_paramKeyComboBoxCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.SettingToolTip.SetToolTip(this.grf_paramKeyComboBoxCheckBox, "Use a combobox instead of typing the parameter key name");
|
||||
this.grf_paramKeyComboBoxCheckBox.UseSelectable = true;
|
||||
this.grf_paramKeyComboBoxCheckBox.CheckedChanged += new System.EventHandler(this.grf_paramKeyComboBoxCheckBox_CheckedChanged);
|
||||
//
|
||||
// AppSettingsForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.ClientSize = new System.Drawing.Size(527, 270);
|
||||
this.Controls.Add(this.grf_paramKeyComboBoxCheckBox);
|
||||
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.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Location = new System.Drawing.Point(0, 0);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "AppSettingsForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Application Settings";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.AppBehaviorSettingsForm_FormClosing);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private MetroFramework.Controls.MetroCheckBox autoSaveCheckBox;
|
||||
private MetroFramework.Components.MetroToolTip SettingToolTip;
|
||||
private MetroFramework.Controls.MetroCheckBox endianCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox autoUpdateCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox autoLoadPckCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox showPresenceCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox grf_paramKeyComboBoxCheckBox;
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ using MetroFramework.Forms;
|
||||
using PckStudio.Properties;
|
||||
using PckStudio.ToolboxItems;
|
||||
|
||||
namespace PckStudio.Forms.Utilities
|
||||
namespace PckStudio.Forms
|
||||
{
|
||||
public partial class AppSettingsForm : ThemeForm
|
||||
{
|
||||
@@ -42,11 +42,16 @@ namespace PckStudio.Forms.Utilities
|
||||
Settings.Default.ShowRichPresence = showPresenceCheckBox.Checked;
|
||||
}
|
||||
|
||||
private void LoadCheckboxState(CrEaTiiOn_CustomCheckBox checkBox, EventHandler eventHandler, bool state)
|
||||
private void grf_paramKeyComboBoxCheckBox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
checkBox.CheckedStateChanged -= eventHandler;
|
||||
Settings.Default.UseComboBoxForGRFParameter = grf_paramKeyComboBoxCheckBox.Checked;
|
||||
}
|
||||
|
||||
private void LoadCheckboxState(CheckBox checkBox, EventHandler eventHandler, bool state)
|
||||
{
|
||||
checkBox.CheckedChanged -= eventHandler;
|
||||
checkBox.Checked = state;
|
||||
checkBox.CheckedStateChanged += eventHandler;
|
||||
checkBox.CheckedChanged += eventHandler;
|
||||
}
|
||||
|
||||
private void LoadSettings()
|
||||
@@ -55,6 +60,7 @@ namespace PckStudio.Forms.Utilities
|
||||
LoadCheckboxState(endianCheckBox, endianCheckBox_CheckedChanged, Settings.Default.UseLittleEndianAsDefault);
|
||||
LoadCheckboxState(autoLoadPckCheckBox, autoLoadPckCheckBox_CheckedChanged, Settings.Default.LoadSubPcks);
|
||||
LoadCheckboxState(showPresenceCheckBox, showPresenceCheckBox_CheckedChanged, Settings.Default.ShowRichPresence);
|
||||
LoadCheckboxState(grf_paramKeyComboBoxCheckBox, grf_paramKeyComboBoxCheckBox_CheckedChanged, Settings.Default.UseComboBoxForGRFParameter);
|
||||
}
|
||||
|
||||
private void AppBehaviorSettingsForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||
179
PCK-Studio/Forms/CreditsForm.Designer.cs
generated
Normal file
179
PCK-Studio/Forms/CreditsForm.Designer.cs
generated
Normal file
@@ -0,0 +1,179 @@
|
||||
namespace PckStudio.Forms
|
||||
{
|
||||
partial class CreditsForm
|
||||
{
|
||||
/// <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.Windows.Forms.PictureBox pictureBox1;
|
||||
MetroFramework.Controls.MetroLabel metroLabel1;
|
||||
MetroFramework.Controls.MetroLabel metroLabel2;
|
||||
MetroFramework.Controls.MetroLabel metroLabel3;
|
||||
MetroFramework.Controls.MetroLabel metroLabel4;
|
||||
MetroFramework.Controls.MetroLabel metroLabel5;
|
||||
MetroFramework.Controls.MetroLabel metroLabel6;
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CreditsForm));
|
||||
this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
|
||||
this.buildLabel = new MetroFramework.Controls.MetroLabel();
|
||||
pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
metroLabel1 = new MetroFramework.Controls.MetroLabel();
|
||||
metroLabel2 = new MetroFramework.Controls.MetroLabel();
|
||||
metroLabel3 = new MetroFramework.Controls.MetroLabel();
|
||||
metroLabel4 = new MetroFramework.Controls.MetroLabel();
|
||||
metroLabel5 = new MetroFramework.Controls.MetroLabel();
|
||||
metroLabel6 = new MetroFramework.Controls.MetroLabel();
|
||||
((System.ComponentModel.ISupportInitialize)(pictureBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
pictureBox1.BackColor = System.Drawing.Color.Transparent;
|
||||
pictureBox1.Enabled = false;
|
||||
pictureBox1.Image = global::PckStudio.Properties.Resources.Splash;
|
||||
pictureBox1.Location = new System.Drawing.Point(4, 5);
|
||||
pictureBox1.Margin = new System.Windows.Forms.Padding(0, 0, 11, 0);
|
||||
pictureBox1.Name = "pictureBox1";
|
||||
pictureBox1.Size = new System.Drawing.Size(550, 293);
|
||||
pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
pictureBox1.TabIndex = 0;
|
||||
pictureBox1.TabStop = false;
|
||||
//
|
||||
// metroLabel1
|
||||
//
|
||||
metroLabel1.AutoSize = true;
|
||||
metroLabel1.Enabled = false;
|
||||
metroLabel1.Location = new System.Drawing.Point(4, 301);
|
||||
metroLabel1.Name = "metroLabel1";
|
||||
metroLabel1.Size = new System.Drawing.Size(250, 19);
|
||||
metroLabel1.TabIndex = 1;
|
||||
metroLabel1.Text = "Restored and maintained by PhoenixARC";
|
||||
metroLabel1.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// metroLabel2
|
||||
//
|
||||
metroLabel2.AutoSize = true;
|
||||
metroLabel2.Enabled = false;
|
||||
metroLabel2.Location = new System.Drawing.Point(314, 301);
|
||||
metroLabel2.Name = "metroLabel2";
|
||||
metroLabel2.Size = new System.Drawing.Size(269, 19);
|
||||
metroLabel2.TabIndex = 2;
|
||||
metroLabel2.Text = "Utilizing the Nobledez Website by Newagent";
|
||||
metroLabel2.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// metroLabel3
|
||||
//
|
||||
metroLabel3.AutoSize = true;
|
||||
metroLabel3.Enabled = false;
|
||||
metroLabel3.Location = new System.Drawing.Point(314, 339);
|
||||
metroLabel3.Name = "metroLabel3";
|
||||
metroLabel3.Size = new System.Drawing.Size(212, 19);
|
||||
metroLabel3.TabIndex = 3;
|
||||
metroLabel3.Text = "3D skin renderer by Łukasz Rejman";
|
||||
metroLabel3.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// metroLabel4
|
||||
//
|
||||
metroLabel4.AutoSize = true;
|
||||
metroLabel4.Enabled = false;
|
||||
metroLabel4.Location = new System.Drawing.Point(314, 320);
|
||||
metroLabel4.Name = "metroLabel4";
|
||||
metroLabel4.Size = new System.Drawing.Size(199, 19);
|
||||
metroLabel4.TabIndex = 4;
|
||||
metroLabel4.Text = "3D renderer found by Newagent";
|
||||
metroLabel4.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// metroLabel5
|
||||
//
|
||||
metroLabel5.AutoSize = true;
|
||||
metroLabel5.Enabled = false;
|
||||
metroLabel5.Location = new System.Drawing.Point(4, 320);
|
||||
metroLabel5.Name = "metroLabel5";
|
||||
metroLabel5.Size = new System.Drawing.Size(300, 19);
|
||||
metroLabel5.TabIndex = 5;
|
||||
metroLabel5.Text = "Additional development by MattNL and Miku-666";
|
||||
metroLabel5.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// metroLabel6
|
||||
//
|
||||
metroLabel6.AutoSize = true;
|
||||
metroLabel6.Enabled = false;
|
||||
metroLabel6.Location = new System.Drawing.Point(4, 339);
|
||||
metroLabel6.Name = "metroLabel6";
|
||||
metroLabel6.Size = new System.Drawing.Size(203, 19);
|
||||
metroLabel6.TabIndex = 6;
|
||||
metroLabel6.Text = "Code base overhaul by Miku-666";
|
||||
metroLabel6.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// buildLabel
|
||||
//
|
||||
this.buildLabel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(12)))), ((int)(((byte)(34)))), ((int)(((byte)(56)))));
|
||||
this.buildLabel.Enabled = false;
|
||||
this.buildLabel.ForeColor = System.Drawing.SystemColors.Control;
|
||||
this.buildLabel.Location = new System.Drawing.Point(314, 30);
|
||||
this.buildLabel.Name = "buildLabel";
|
||||
this.buildLabel.Size = new System.Drawing.Size(212, 171);
|
||||
this.buildLabel.TabIndex = 7;
|
||||
this.buildLabel.Text = "Build Information";
|
||||
this.buildLabel.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
||||
this.buildLabel.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.buildLabel.WrapToLine = true;
|
||||
//
|
||||
// CreditsForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(585, 364);
|
||||
this.Controls.Add(this.buildLabel);
|
||||
this.Controls.Add(metroLabel6);
|
||||
this.Controls.Add(metroLabel1);
|
||||
this.Controls.Add(metroLabel5);
|
||||
this.Controls.Add(metroLabel4);
|
||||
this.Controls.Add(metroLabel3);
|
||||
this.Controls.Add(metroLabel2);
|
||||
this.Controls.Add(pictureBox1);
|
||||
this.DisplayHeader = false;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "CreditsForm";
|
||||
this.Padding = new System.Windows.Forms.Padding(20, 30, 20, 20);
|
||||
this.Resizable = false;
|
||||
this.ShadowType = MetroFramework.Forms.MetroFormShadowType.DropShadow;
|
||||
this.Style = MetroFramework.MetroColorStyle.Black;
|
||||
this.Text = "programInfo";
|
||||
this.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
((System.ComponentModel.ISupportInitialize)(pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
|
||||
private MetroFramework.Controls.MetroLabel buildLabel;
|
||||
}
|
||||
}
|
||||
22
PCK-Studio/Forms/CreditsForm.cs
Normal file
22
PCK-Studio/Forms/CreditsForm.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using MetroFramework.Forms;
|
||||
using PckStudio.Internal;
|
||||
|
||||
namespace PckStudio.Forms
|
||||
{
|
||||
public partial class CreditsForm : MetroForm
|
||||
{
|
||||
public CreditsForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
#if BETA
|
||||
buildLabel.Text = $"Build Config: Beta\nBuild Version: {ApplicationBuildInfo.BetaBuildVersion}\n Branch: {CommitInfo.BranchName}";
|
||||
#elif DEBUG
|
||||
buildLabel.Text = $"Build Config: Debug\nBranch: {CommitInfo.BranchName}\nCommit Id: {CommitInfo.CommitHash}";
|
||||
#else
|
||||
buildLabel.Text = string.Empty;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
2651
PCK-Studio/Forms/CreditsForm.resx
Normal file
2651
PCK-Studio/Forms/CreditsForm.resx
Normal file
File diff suppressed because it is too large
Load Diff
@@ -48,15 +48,15 @@ namespace PckStudio.Forms.Editor
|
||||
}
|
||||
}
|
||||
}
|
||||
private Bictionary<CheckBox, ANIM_EFFECTS> checkBoxLinkage;
|
||||
private Bictionary<CheckBox, SkinAnimFlag> checkBoxLinkage;
|
||||
private SkinANIM anim;
|
||||
private bool ignoreCheckChanged = false;
|
||||
|
||||
public ANIMRuleSet(params (CheckBox, ANIM_EFFECTS)[] linkage)
|
||||
public ANIMRuleSet(params (CheckBox, SkinAnimFlag)[] linkage)
|
||||
{
|
||||
checkBoxLinkage = new Bictionary<CheckBox, ANIM_EFFECTS>(32);
|
||||
checkBoxLinkage = new Bictionary<CheckBox, SkinAnimFlag>(32);
|
||||
if (linkage.Length < 32)
|
||||
Debug.WriteLine($"Not all {nameof(ANIM_EFFECTS)} are mapped to a given checkbox.");
|
||||
Debug.WriteLine($"Not all {nameof(SkinAnimFlag)} are mapped to a given checkbox.");
|
||||
|
||||
checkBoxLinkage.AddRange(linkage);
|
||||
foreach (var (checkbox, _) in linkage)
|
||||
@@ -74,15 +74,15 @@ namespace PckStudio.Forms.Editor
|
||||
checkbox.Checked = state;
|
||||
switch(checkBoxLinkage[checkbox])
|
||||
{
|
||||
case ANIM_EFFECTS.FORCE_HEAD_ARMOR:
|
||||
case ANIM_EFFECTS.FORCE_BODY_ARMOR:
|
||||
case ANIM_EFFECTS.FORCE_LEFT_ARM_ARMOR:
|
||||
case ANIM_EFFECTS.FORCE_RIGHT_ARM_ARMOR:
|
||||
case ANIM_EFFECTS.FORCE_LEFT_LEG_ARMOR:
|
||||
case ANIM_EFFECTS.FORCE_RIGHT_LEG_ARMOR:
|
||||
case SkinAnimFlag.FORCE_HEAD_ARMOR:
|
||||
case SkinAnimFlag.FORCE_BODY_ARMOR:
|
||||
case SkinAnimFlag.FORCE_LEFT_ARM_ARMOR:
|
||||
case SkinAnimFlag.FORCE_RIGHT_ARM_ARMOR:
|
||||
case SkinAnimFlag.FORCE_LEFT_LEG_ARMOR:
|
||||
case SkinAnimFlag.FORCE_RIGHT_LEG_ARMOR:
|
||||
checkbox.Enabled = state;
|
||||
break;
|
||||
case ANIM_EFFECTS.RESOLUTION_64x64:
|
||||
case SkinAnimFlag.RESOLUTION_64x64:
|
||||
if (state) checkbox.Checked = false; // Prioritize slim model > classic model, LCE would
|
||||
break;
|
||||
}
|
||||
@@ -107,39 +107,39 @@ namespace PckStudio.Forms.Editor
|
||||
{
|
||||
switch (checkBoxLinkage[checkBox])
|
||||
{
|
||||
case ANIM_EFFECTS.HEAD_DISABLED:
|
||||
checkBoxLinkage[ANIM_EFFECTS.FORCE_HEAD_ARMOR].Enabled = checkBox.Checked;
|
||||
Uncheck(checkBoxLinkage[ANIM_EFFECTS.FORCE_HEAD_ARMOR]);
|
||||
case SkinAnimFlag.HEAD_DISABLED:
|
||||
checkBoxLinkage[SkinAnimFlag.FORCE_HEAD_ARMOR].Enabled = checkBox.Checked;
|
||||
Uncheck(checkBoxLinkage[SkinAnimFlag.FORCE_HEAD_ARMOR]);
|
||||
break;
|
||||
case ANIM_EFFECTS.BODY_DISABLED:
|
||||
checkBoxLinkage[ANIM_EFFECTS.FORCE_BODY_ARMOR].Enabled = checkBox.Checked;
|
||||
Uncheck(checkBoxLinkage[ANIM_EFFECTS.FORCE_BODY_ARMOR]);
|
||||
case SkinAnimFlag.BODY_DISABLED:
|
||||
checkBoxLinkage[SkinAnimFlag.FORCE_BODY_ARMOR].Enabled = checkBox.Checked;
|
||||
Uncheck(checkBoxLinkage[SkinAnimFlag.FORCE_BODY_ARMOR]);
|
||||
break;
|
||||
case ANIM_EFFECTS.LEFT_LEG_DISABLED:
|
||||
checkBoxLinkage[ANIM_EFFECTS.FORCE_LEFT_LEG_ARMOR].Enabled = checkBox.Checked;
|
||||
Uncheck(checkBoxLinkage[ANIM_EFFECTS.FORCE_LEFT_LEG_ARMOR]);
|
||||
case SkinAnimFlag.LEFT_LEG_DISABLED:
|
||||
checkBoxLinkage[SkinAnimFlag.FORCE_LEFT_LEG_ARMOR].Enabled = checkBox.Checked;
|
||||
Uncheck(checkBoxLinkage[SkinAnimFlag.FORCE_LEFT_LEG_ARMOR]);
|
||||
break;
|
||||
case ANIM_EFFECTS.RIGHT_LEG_DISABLED:
|
||||
checkBoxLinkage[ANIM_EFFECTS.FORCE_RIGHT_LEG_ARMOR].Enabled = checkBox.Checked;
|
||||
Uncheck(checkBoxLinkage[ANIM_EFFECTS.FORCE_RIGHT_LEG_ARMOR]);
|
||||
case SkinAnimFlag.RIGHT_LEG_DISABLED:
|
||||
checkBoxLinkage[SkinAnimFlag.FORCE_RIGHT_LEG_ARMOR].Enabled = checkBox.Checked;
|
||||
Uncheck(checkBoxLinkage[SkinAnimFlag.FORCE_RIGHT_LEG_ARMOR]);
|
||||
break;
|
||||
case ANIM_EFFECTS.LEFT_ARM_DISABLED:
|
||||
checkBoxLinkage[ANIM_EFFECTS.FORCE_LEFT_ARM_ARMOR].Enabled = checkBox.Checked;
|
||||
Uncheck(checkBoxLinkage[ANIM_EFFECTS.FORCE_LEFT_ARM_ARMOR]);
|
||||
case SkinAnimFlag.LEFT_ARM_DISABLED:
|
||||
checkBoxLinkage[SkinAnimFlag.FORCE_LEFT_ARM_ARMOR].Enabled = checkBox.Checked;
|
||||
Uncheck(checkBoxLinkage[SkinAnimFlag.FORCE_LEFT_ARM_ARMOR]);
|
||||
break;
|
||||
case ANIM_EFFECTS.RIGHT_ARM_DISABLED:
|
||||
checkBoxLinkage[ANIM_EFFECTS.FORCE_RIGHT_ARM_ARMOR].Enabled = checkBox.Checked;
|
||||
Uncheck(checkBoxLinkage[ANIM_EFFECTS.FORCE_RIGHT_ARM_ARMOR]);
|
||||
case SkinAnimFlag.RIGHT_ARM_DISABLED:
|
||||
checkBoxLinkage[SkinAnimFlag.FORCE_RIGHT_ARM_ARMOR].Enabled = checkBox.Checked;
|
||||
Uncheck(checkBoxLinkage[SkinAnimFlag.FORCE_RIGHT_ARM_ARMOR]);
|
||||
break;
|
||||
|
||||
case ANIM_EFFECTS.RESOLUTION_64x64:
|
||||
Uncheck(checkBoxLinkage[ANIM_EFFECTS.SLIM_MODEL]);
|
||||
checkBoxLinkage[ANIM_EFFECTS.SLIM_MODEL].Enabled = !checkBox.Checked;
|
||||
case SkinAnimFlag.RESOLUTION_64x64:
|
||||
Uncheck(checkBoxLinkage[SkinAnimFlag.SLIM_MODEL]);
|
||||
checkBoxLinkage[SkinAnimFlag.SLIM_MODEL].Enabled = !checkBox.Checked;
|
||||
break;
|
||||
|
||||
case ANIM_EFFECTS.SLIM_MODEL:
|
||||
Uncheck(checkBoxLinkage[ANIM_EFFECTS.RESOLUTION_64x64]);
|
||||
checkBoxLinkage[ANIM_EFFECTS.RESOLUTION_64x64].Enabled = !checkBox.Checked;
|
||||
case SkinAnimFlag.SLIM_MODEL:
|
||||
Uncheck(checkBoxLinkage[SkinAnimFlag.RESOLUTION_64x64]);
|
||||
checkBoxLinkage[SkinAnimFlag.RESOLUTION_64x64].Enabled = !checkBox.Checked;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -183,6 +183,7 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
public ANIMEditor(SkinANIM skinANIM) : this()
|
||||
{
|
||||
initialANIM = skinANIM;
|
||||
setDisplayAnim(skinANIM);
|
||||
ruleset.ApplyAnim(skinANIM);
|
||||
}
|
||||
@@ -190,38 +191,38 @@ namespace PckStudio.Forms.Editor
|
||||
private void InitializeRuleSet()
|
||||
{
|
||||
ruleset = new ANIMRuleSet(
|
||||
(bobbingCheckBox, ANIM_EFFECTS.HEAD_BOBBING_DISABLED),
|
||||
(bodyCheckBox, ANIM_EFFECTS.BODY_DISABLED),
|
||||
(bodyOCheckBox, ANIM_EFFECTS.BODY_OVERLAY_DISABLED),
|
||||
(chestplateCheckBox, ANIM_EFFECTS.FORCE_BODY_ARMOR),
|
||||
(classicCheckBox, ANIM_EFFECTS.RESOLUTION_64x64),
|
||||
(crouchCheckBox, ANIM_EFFECTS.DO_BACKWARDS_CROUCH),
|
||||
(dinnerboneCheckBox, ANIM_EFFECTS.DINNERBONE),
|
||||
(headCheckBox, ANIM_EFFECTS.HEAD_DISABLED),
|
||||
(headOCheckBox, ANIM_EFFECTS.HEAD_OVERLAY_DISABLED),
|
||||
(helmetCheckBox, ANIM_EFFECTS.FORCE_HEAD_ARMOR),
|
||||
(leftArmCheckBox, ANIM_EFFECTS.LEFT_ARM_DISABLED),
|
||||
(leftArmOCheckBox, ANIM_EFFECTS.LEFT_ARM_OVERLAY_DISABLED),
|
||||
(leftArmorCheckBox, ANIM_EFFECTS.FORCE_LEFT_ARM_ARMOR),
|
||||
(leftLegCheckBox, ANIM_EFFECTS.LEFT_LEG_DISABLED),
|
||||
(leftLeggingCheckBox, ANIM_EFFECTS.FORCE_LEFT_LEG_ARMOR),
|
||||
(leftLegOCheckBox, ANIM_EFFECTS.LEFT_LEG_OVERLAY_DISABLED),
|
||||
(noArmorCheckBox, ANIM_EFFECTS.ALL_ARMOR_DISABLED),
|
||||
(rightArmCheckBox, ANIM_EFFECTS.RIGHT_ARM_DISABLED),
|
||||
(rightArmOCheckBox, ANIM_EFFECTS.RIGHT_ARM_OVERLAY_DISABLED),
|
||||
(rightArmorCheckBox, ANIM_EFFECTS.FORCE_RIGHT_ARM_ARMOR),
|
||||
(rightLegCheckBox, ANIM_EFFECTS.RIGHT_LEG_DISABLED),
|
||||
(rightLeggingCheckBox, ANIM_EFFECTS.FORCE_RIGHT_LEG_ARMOR),
|
||||
(rightLegOCheckBox, ANIM_EFFECTS.RIGHT_LEG_OVERLAY_DISABLED),
|
||||
(santaCheckBox, ANIM_EFFECTS.BAD_SANTA),
|
||||
(slimCheckBox, ANIM_EFFECTS.SLIM_MODEL),
|
||||
(staticArmsCheckBox, ANIM_EFFECTS.STATIC_ARMS),
|
||||
(staticLegsCheckBox, ANIM_EFFECTS.STATIC_LEGS),
|
||||
(statueCheckBox, ANIM_EFFECTS.STATUE_OF_LIBERTY),
|
||||
(syncArmsCheckBox, ANIM_EFFECTS.SYNCED_ARMS),
|
||||
(syncLegsCheckBox, ANIM_EFFECTS.SYNCED_LEGS),
|
||||
(unknownCheckBox, ANIM_EFFECTS.__BIT_4),
|
||||
(zombieCheckBox, ANIM_EFFECTS.ZOMBIE_ARMS)
|
||||
(bobbingCheckBox, SkinAnimFlag.HEAD_BOBBING_DISABLED),
|
||||
(bodyCheckBox, SkinAnimFlag.BODY_DISABLED),
|
||||
(bodyOCheckBox, SkinAnimFlag.BODY_OVERLAY_DISABLED),
|
||||
(chestplateCheckBox, SkinAnimFlag.FORCE_BODY_ARMOR),
|
||||
(classicCheckBox, SkinAnimFlag.RESOLUTION_64x64),
|
||||
(crouchCheckBox, SkinAnimFlag.DO_BACKWARDS_CROUCH),
|
||||
(dinnerboneCheckBox, SkinAnimFlag.DINNERBONE),
|
||||
(headCheckBox, SkinAnimFlag.HEAD_DISABLED),
|
||||
(headOCheckBox, SkinAnimFlag.HEAD_OVERLAY_DISABLED),
|
||||
(helmetCheckBox, SkinAnimFlag.FORCE_HEAD_ARMOR),
|
||||
(leftArmCheckBox, SkinAnimFlag.LEFT_ARM_DISABLED),
|
||||
(leftArmOCheckBox, SkinAnimFlag.LEFT_ARM_OVERLAY_DISABLED),
|
||||
(leftArmorCheckBox, SkinAnimFlag.FORCE_LEFT_ARM_ARMOR),
|
||||
(leftLegCheckBox, SkinAnimFlag.LEFT_LEG_DISABLED),
|
||||
(leftLeggingCheckBox, SkinAnimFlag.FORCE_LEFT_LEG_ARMOR),
|
||||
(leftLegOCheckBox, SkinAnimFlag.LEFT_LEG_OVERLAY_DISABLED),
|
||||
(noArmorCheckBox, SkinAnimFlag.ALL_ARMOR_DISABLED),
|
||||
(rightArmCheckBox, SkinAnimFlag.RIGHT_ARM_DISABLED),
|
||||
(rightArmOCheckBox, SkinAnimFlag.RIGHT_ARM_OVERLAY_DISABLED),
|
||||
(rightArmorCheckBox, SkinAnimFlag.FORCE_RIGHT_ARM_ARMOR),
|
||||
(rightLegCheckBox, SkinAnimFlag.RIGHT_LEG_DISABLED),
|
||||
(rightLeggingCheckBox, SkinAnimFlag.FORCE_RIGHT_LEG_ARMOR),
|
||||
(rightLegOCheckBox, SkinAnimFlag.RIGHT_LEG_OVERLAY_DISABLED),
|
||||
(santaCheckBox, SkinAnimFlag.BAD_SANTA),
|
||||
(slimCheckBox, SkinAnimFlag.SLIM_MODEL),
|
||||
(staticArmsCheckBox, SkinAnimFlag.STATIC_ARMS),
|
||||
(staticLegsCheckBox, SkinAnimFlag.STATIC_LEGS),
|
||||
(statueCheckBox, SkinAnimFlag.STATUE_OF_LIBERTY),
|
||||
(syncArmsCheckBox, SkinAnimFlag.SYNCED_ARMS),
|
||||
(syncLegsCheckBox, SkinAnimFlag.SYNCED_LEGS),
|
||||
(unknownCheckBox, SkinAnimFlag.__BIT_4),
|
||||
(zombieCheckBox, SkinAnimFlag.ZOMBIE_ARMS)
|
||||
);
|
||||
ruleset.OnCheckboxChanged = setDisplayAnim;
|
||||
}
|
||||
@@ -278,8 +279,8 @@ namespace PckStudio.Forms.Editor
|
||||
};
|
||||
if (saveFileDialog.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
bool isSlim = ruleset.Value.GetFlag(ANIM_EFFECTS.SLIM_MODEL);
|
||||
bool is64x64 = ruleset.Value.GetFlag(ANIM_EFFECTS.RESOLUTION_64x64);
|
||||
bool isSlim = ruleset.Value.GetFlag(SkinAnimFlag.SLIM_MODEL);
|
||||
bool is64x64 = ruleset.Value.GetFlag(SkinAnimFlag.RESOLUTION_64x64);
|
||||
bool isClassic32 = !isSlim && !is64x64;
|
||||
|
||||
Image skin = isSlim ? Properties.Resources.slim_template : Properties.Resources.classic_template;
|
||||
@@ -290,31 +291,31 @@ namespace PckStudio.Forms.Editor
|
||||
using (Graphics graphic = Graphics.FromImage(img))
|
||||
{
|
||||
graphic.DrawImage(skin, new Rectangle(Point.Empty, imgSize), new Rectangle(Point.Empty, imgSize), GraphicsUnit.Pixel);
|
||||
if (ruleset.Value.GetFlag(ANIM_EFFECTS.HEAD_OVERLAY_DISABLED))
|
||||
if (ruleset.Value.GetFlag(SkinAnimFlag.HEAD_OVERLAY_DISABLED))
|
||||
graphic.FillRectangle(Brushes.Magenta, new Rectangle(32, 0, 32, 16));
|
||||
if (ruleset.Value.GetFlag(ANIM_EFFECTS.HEAD_DISABLED))
|
||||
if (ruleset.Value.GetFlag(SkinAnimFlag.HEAD_DISABLED))
|
||||
graphic.FillRectangle(Brushes.Magenta, new Rectangle(0, 0, 32, 16));
|
||||
if (ruleset.Value.GetFlag(ANIM_EFFECTS.BODY_DISABLED))
|
||||
if (ruleset.Value.GetFlag(SkinAnimFlag.BODY_DISABLED))
|
||||
graphic.FillRectangle(Brushes.Magenta, new Rectangle(16, 16, 24, 16));
|
||||
if (img.Height == 64)
|
||||
{
|
||||
if (ruleset.Value.GetFlag(ANIM_EFFECTS.RIGHT_ARM_DISABLED)) graphic.FillRectangle(Brushes.Magenta, new Rectangle(40, 16, 16, 16));
|
||||
if (ruleset.Value.GetFlag(ANIM_EFFECTS.RIGHT_LEG_DISABLED)) graphic.FillRectangle(Brushes.Magenta, new Rectangle(0, 16, 16, 16));
|
||||
if (ruleset.Value.GetFlag(ANIM_EFFECTS.BODY_OVERLAY_DISABLED)) graphic.FillRectangle(Brushes.Magenta, new Rectangle(16, 32, 24, 16));
|
||||
if (ruleset.Value.GetFlag(ANIM_EFFECTS.RIGHT_ARM_OVERLAY_DISABLED)) graphic.FillRectangle(Brushes.Magenta, new Rectangle(40, 32, 16, 16));
|
||||
if (ruleset.Value.GetFlag(ANIM_EFFECTS.RIGHT_LEG_OVERLAY_DISABLED)) graphic.FillRectangle(Brushes.Magenta, new Rectangle(0, 32, 16, 16));
|
||||
if (ruleset.Value.GetFlag(ANIM_EFFECTS.LEFT_LEG_OVERLAY_DISABLED)) graphic.FillRectangle(Brushes.Magenta, new Rectangle(0, 48, 16, 16));
|
||||
if (ruleset.Value.GetFlag(ANIM_EFFECTS.LEFT_LEG_DISABLED)) graphic.FillRectangle(Brushes.Magenta, new Rectangle(16, 48, 16, 16));
|
||||
if (ruleset.Value.GetFlag(ANIM_EFFECTS.LEFT_ARM_DISABLED)) graphic.FillRectangle(Brushes.Magenta, new Rectangle(32, 48, 16, 16));
|
||||
if (ruleset.Value.GetFlag(ANIM_EFFECTS.LEFT_ARM_OVERLAY_DISABLED)) graphic.FillRectangle(Brushes.Magenta, new Rectangle(48, 48, 16, 16));
|
||||
if (ruleset.Value.GetFlag(SkinAnimFlag.RIGHT_ARM_DISABLED)) graphic.FillRectangle(Brushes.Magenta, new Rectangle(40, 16, 16, 16));
|
||||
if (ruleset.Value.GetFlag(SkinAnimFlag.RIGHT_LEG_DISABLED)) graphic.FillRectangle(Brushes.Magenta, new Rectangle(0, 16, 16, 16));
|
||||
if (ruleset.Value.GetFlag(SkinAnimFlag.BODY_OVERLAY_DISABLED)) graphic.FillRectangle(Brushes.Magenta, new Rectangle(16, 32, 24, 16));
|
||||
if (ruleset.Value.GetFlag(SkinAnimFlag.RIGHT_ARM_OVERLAY_DISABLED)) graphic.FillRectangle(Brushes.Magenta, new Rectangle(40, 32, 16, 16));
|
||||
if (ruleset.Value.GetFlag(SkinAnimFlag.RIGHT_LEG_OVERLAY_DISABLED)) graphic.FillRectangle(Brushes.Magenta, new Rectangle(0, 32, 16, 16));
|
||||
if (ruleset.Value.GetFlag(SkinAnimFlag.LEFT_LEG_OVERLAY_DISABLED)) graphic.FillRectangle(Brushes.Magenta, new Rectangle(0, 48, 16, 16));
|
||||
if (ruleset.Value.GetFlag(SkinAnimFlag.LEFT_LEG_DISABLED)) graphic.FillRectangle(Brushes.Magenta, new Rectangle(16, 48, 16, 16));
|
||||
if (ruleset.Value.GetFlag(SkinAnimFlag.LEFT_ARM_DISABLED)) graphic.FillRectangle(Brushes.Magenta, new Rectangle(32, 48, 16, 16));
|
||||
if (ruleset.Value.GetFlag(SkinAnimFlag.LEFT_ARM_OVERLAY_DISABLED)) graphic.FillRectangle(Brushes.Magenta, new Rectangle(48, 48, 16, 16));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Since both classic 32 arms and legs use the same texture, removing the texture would remove both limbs instead of just one.
|
||||
// So both must be disabled by the user before they're removed from the texture;
|
||||
if (ruleset.Value.GetFlag(ANIM_EFFECTS.RIGHT_ARM_DISABLED) && ruleset.Value.GetFlag(ANIM_EFFECTS.LEFT_ARM_DISABLED))
|
||||
if (ruleset.Value.GetFlag(SkinAnimFlag.RIGHT_ARM_DISABLED) && ruleset.Value.GetFlag(SkinAnimFlag.LEFT_ARM_DISABLED))
|
||||
graphic.FillRectangle(Brushes.Magenta, new Rectangle(40, 16, 16, 16));
|
||||
if (ruleset.Value.GetFlag(ANIM_EFFECTS.RIGHT_LEG_DISABLED) && ruleset.Value.GetFlag(ANIM_EFFECTS.LEFT_LEG_DISABLED))
|
||||
if (ruleset.Value.GetFlag(SkinAnimFlag.RIGHT_LEG_DISABLED) && ruleset.Value.GetFlag(SkinAnimFlag.LEFT_LEG_DISABLED))
|
||||
graphic.FillRectangle(Brushes.Magenta, new Rectangle(0, 16, 16, 16));
|
||||
}
|
||||
img.MakeTransparent(Color.Magenta);
|
||||
@@ -329,25 +330,25 @@ namespace PckStudio.Forms.Editor
|
||||
setDisplayAnim((SkinANIM)initialANIM.Clone());
|
||||
}
|
||||
|
||||
static readonly Dictionary<string, ANIM_EFFECTS> Templates = new Dictionary<string, ANIM_EFFECTS>()
|
||||
static readonly Dictionary<string, SkinAnimMask> Templates = new Dictionary<string, SkinAnimMask>()
|
||||
{
|
||||
{ "Steve (64x32)", ANIM_EFFECTS.NONE },
|
||||
{ "Steve (64x64)", ANIM_EFFECTS.RESOLUTION_64x64 },
|
||||
{ "Alex (64x64)", ANIM_EFFECTS.SLIM_MODEL },
|
||||
{ "Zombie Skins", ANIM_EFFECTS.ZOMBIE_ARMS },
|
||||
{ "Cetacean Skins", ANIM_EFFECTS.SYNCED_ARMS | ANIM_EFFECTS.SYNCED_LEGS },
|
||||
{ "Ski Skins", ANIM_EFFECTS.SYNCED_ARMS | ANIM_EFFECTS.STATIC_LEGS },
|
||||
{ "Ghost Skins", ANIM_EFFECTS.STATIC_LEGS | ANIM_EFFECTS.ZOMBIE_ARMS },
|
||||
{ "Medusa (Greek Myth.)", ANIM_EFFECTS.SYNCED_LEGS },
|
||||
{ "Librarian (Halo)", ANIM_EFFECTS.STATIC_LEGS },
|
||||
{ "Grim Reaper (Halloween)", ANIM_EFFECTS.STATIC_LEGS | ANIM_EFFECTS.STATIC_ARMS }
|
||||
{ "Steve (64x32)", SkinAnimMask.NONE },
|
||||
{ "Steve (64x64)", SkinAnimMask.RESOLUTION_64x64 },
|
||||
{ "Alex (64x64)", SkinAnimMask.SLIM_MODEL },
|
||||
{ "Zombie Skins", SkinAnimMask.ZOMBIE_ARMS },
|
||||
{ "Cetacean Skins", SkinAnimMask.SYNCED_ARMS | SkinAnimMask.SYNCED_LEGS },
|
||||
{ "Ski Skins", SkinAnimMask.SYNCED_ARMS | SkinAnimMask.STATIC_LEGS },
|
||||
{ "Ghost Skins", SkinAnimMask.STATIC_LEGS | SkinAnimMask.ZOMBIE_ARMS },
|
||||
{ "Medusa (Greek Myth.)", SkinAnimMask.SYNCED_LEGS },
|
||||
{ "Librarian (Halo)", SkinAnimMask.STATIC_LEGS },
|
||||
{ "Grim Reaper (Halloween)", SkinAnimMask.STATIC_LEGS | SkinAnimMask.STATIC_ARMS }
|
||||
};
|
||||
|
||||
private void templateButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
var diag = new ItemSelectionPopUp(Templates.Keys.ToArray());
|
||||
diag.label2.Text = "Presets";
|
||||
diag.okBtn.Text = "Load";
|
||||
diag.ButtonText = "Presets";
|
||||
diag.ButtonText = "Load";
|
||||
|
||||
if (diag.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
this.AnimationStartStopBtn = new MetroFramework.Controls.MetroButton();
|
||||
this.tileLabel = new MetroFramework.Controls.MetroLabel();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.animationPictureBox = new PckStudio.Forms.Editor.AnimationPictureBox();
|
||||
this.animationPictureBox = new PckStudio.ToolboxItems.AnimationPictureBox();
|
||||
this.frameTimeandTicksToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.contextMenuStrip1.SuspendLayout();
|
||||
this.menuStrip.SuspendLayout();
|
||||
@@ -347,7 +347,7 @@
|
||||
private System.Windows.Forms.MenuStrip menuStrip;
|
||||
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem1;
|
||||
private PckStudio.Forms.Editor.AnimationPictureBox animationPictureBox;
|
||||
private PckStudio.ToolboxItems.AnimationPictureBox animationPictureBox;
|
||||
private MetroFramework.Controls.MetroCheckBox InterpolationCheckbox;
|
||||
private MetroFramework.Controls.MetroButton AnimationStartStopBtn;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
using PckStudio.ToolboxItems;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
/* Copyright (c) 2023-present miku-666, MattNL
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
* warranty. In no event will the authors be held liable for any damages
|
||||
* arising from the use of this software.
|
||||
*
|
||||
* Permission is granted to anyone to use this software for any purpose,
|
||||
* including commercial applications, and to alter it and redistribute it
|
||||
* freely, subject to the following restrictions:
|
||||
*
|
||||
* 1.The origin of this software must not be misrepresented; you must not
|
||||
* claim that you wrote the original software. If you use this software
|
||||
* in a product, an acknowledgment in the product documentation would be
|
||||
* appreciated but is not required.
|
||||
* 2. Altered source versions must be plainly marked as such, and must not be
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
**/
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
@@ -8,104 +22,120 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using System.Diagnostics;
|
||||
using MetroFramework.Forms;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using OMI.Formats.Pck;
|
||||
|
||||
using PckStudio.Forms.Additional_Popups.Animation;
|
||||
using PckStudio.Forms.Utilities;
|
||||
using PckStudio.Extensions;
|
||||
using PckStudio.Properties;
|
||||
using PckStudio.Internal;
|
||||
using PckStudio.Internal.Json;
|
||||
using PckStudio.Helper;
|
||||
using AnimatedGif;
|
||||
using PckStudio.ToolboxItems;
|
||||
|
||||
namespace PckStudio.Forms.Editor
|
||||
{
|
||||
public partial class AnimationEditor : ThemeForm
|
||||
{
|
||||
private PckFile.FileData animationFile;
|
||||
private Animation currentAnimation;
|
||||
private Animation _animation;
|
||||
|
||||
private string TileName = string.Empty;
|
||||
private string _tileName = string.Empty;
|
||||
|
||||
private bool IsSpecialTile(string tileName)
|
||||
private static readonly string[] specialTileNames = { "clock", "compass" };
|
||||
|
||||
private static bool IsSpecialTile(string name)
|
||||
{
|
||||
return tileName == "clock" || tileName == "compass";
|
||||
return name.ToLower().EqualsAny(specialTileNames);
|
||||
}
|
||||
|
||||
public AnimationEditor(PckFile.FileData file)
|
||||
private AnimationEditor()
|
||||
{
|
||||
InitializeComponent();
|
||||
animationFile = file;
|
||||
InitializeComponent();
|
||||
toolStripSeparator1.Visible = saveToolStripMenuItem1.Visible = !Settings.Default.AutoSaveChanges;
|
||||
}
|
||||
|
||||
TileName = Path.GetFileNameWithoutExtension(animationFile.Filename);
|
||||
internal AnimationEditor(Animation animation, string name)
|
||||
: this()
|
||||
{
|
||||
_ = animation ?? throw new ArgumentNullException(nameof(animation));
|
||||
_animation = animation;
|
||||
_tileName = name;
|
||||
}
|
||||
|
||||
bulkAnimationSpeedToolStripMenuItem.Enabled =
|
||||
importToolStripMenuItem.Enabled =
|
||||
exportAsToolStripMenuItem.Enabled =
|
||||
InterpolationCheckbox.Visible = !IsSpecialTile(TileName);
|
||||
|
||||
toolStripSeparator1.Visible = saveToolStripMenuItem1.Visible = !Settings.Default.AutoSaveChanges;
|
||||
|
||||
if (animationFile.Size > 0)
|
||||
{
|
||||
using MemoryStream textureMem = new MemoryStream(animationFile.Data);
|
||||
var texture = new Bitmap(textureMem);
|
||||
var frameTextures = texture.CreateImageList(ImageLayoutDirection.Vertical);
|
||||
|
||||
currentAnimation = animationFile.Properties.HasProperty("ANIM")
|
||||
? new Animation(frameTextures, animationFile.Properties.GetPropertyValue("ANIM"))
|
||||
: new Animation(frameTextures);
|
||||
}
|
||||
currentAnimation.Category = animationFile.Filename.Split('/').Contains("items")
|
||||
? Animation.AnimationCategory.Items
|
||||
: Animation.AnimationCategory.Blocks;
|
||||
SetTileLabel();
|
||||
LoadAnimationTreeView();
|
||||
internal AnimationEditor(Animation animation, string name, Color blendColor)
|
||||
: this(animation, name)
|
||||
{
|
||||
animationPictureBox.UseBlendColor = true;
|
||||
animationPictureBox.BlendColor = blendColor;
|
||||
}
|
||||
|
||||
private void AnimationEditor_Load(object sender, EventArgs e)
|
||||
{
|
||||
bulkAnimationSpeedToolStripMenuItem.Enabled =
|
||||
importToolStripMenuItem.Enabled =
|
||||
exportAsToolStripMenuItem.Enabled =
|
||||
InterpolationCheckbox.Visible = !IsSpecialTile(_tileName);
|
||||
|
||||
SetTileLabel();
|
||||
LoadAnimationTreeView();
|
||||
}
|
||||
|
||||
private void LoadAnimationTreeView()
|
||||
{
|
||||
if (currentAnimation is null)
|
||||
{
|
||||
{
|
||||
if (_animation is null)
|
||||
{
|
||||
AnimationStartStopBtn.Enabled = false;
|
||||
return;
|
||||
}
|
||||
AnimationStartStopBtn.Enabled = true;
|
||||
InterpolationCheckbox.Checked = currentAnimation.Interpolate;
|
||||
frameTreeView.Nodes.Clear();
|
||||
TextureIcons.Images.Clear();
|
||||
TextureIcons.Images.AddRange(currentAnimation.GetTextures().ToArray());
|
||||
foreach (var frame in currentAnimation.GetFrames())
|
||||
{
|
||||
var imageIndex = currentAnimation.GetTextureIndex(frame.Texture);
|
||||
frameTreeView.Nodes.Add(new TreeNode($"for {frame.Ticks} ticks")
|
||||
{
|
||||
ImageIndex = imageIndex,
|
||||
SelectedImageIndex = imageIndex,
|
||||
});
|
||||
}
|
||||
animationPictureBox.SelectFrame(currentAnimation, 0);
|
||||
}
|
||||
AnimationStartStopBtn.Enabled = true;
|
||||
InterpolationCheckbox.Checked = _animation.Interpolate;
|
||||
TextureIcons.Images.Clear();
|
||||
TextureIcons.Images.AddRange(_animation.GetTextures().ToArray());
|
||||
|
||||
private void frameTreeView_AfterSelect(object sender, TreeViewEventArgs e)
|
||||
UpdateTreeView();
|
||||
|
||||
if (_animation.FrameCount > 0)
|
||||
{
|
||||
animationPictureBox.SelectFrame(_animation, 0);
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateTreeView()
|
||||
{
|
||||
frameTreeView.Nodes.Clear();
|
||||
frameTreeView.Nodes.AddRange(
|
||||
_animation.GetFrames()
|
||||
.Select(frame =>
|
||||
{
|
||||
var imageIndex = _animation.GetTextureIndex(frame.Texture);
|
||||
return new TreeNode($"for {frame.Ticks} ticks", imageIndex, imageIndex);
|
||||
})
|
||||
.ToArray()
|
||||
);
|
||||
}
|
||||
|
||||
private void frameTreeView_AfterSelect(object sender, TreeViewEventArgs e)
|
||||
{
|
||||
if (animationPictureBox.IsPlaying)
|
||||
AnimationStartStopBtn.Text = "Play Animation";
|
||||
animationPictureBox.SelectFrame(currentAnimation, frameTreeView.SelectedNode.Index);
|
||||
animationPictureBox.SelectFrame(_animation, frameTreeView.SelectedNode.Index);
|
||||
}
|
||||
|
||||
private void AnimationStartStopBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (animationPictureBox.IsPlaying)
|
||||
{
|
||||
AnimationStartStopBtn.Text = "Play Animation";
|
||||
animationPictureBox.Stop();
|
||||
AnimationStartStopBtn.Text = "Play Animation";
|
||||
return;
|
||||
}
|
||||
if (currentAnimation.FrameCount > 1)
|
||||
if (_animation.FrameCount > 1)
|
||||
{
|
||||
animationPictureBox.Start(currentAnimation);
|
||||
animationPictureBox.Start(_animation);
|
||||
AnimationStartStopBtn.Text = "Stop Animation";
|
||||
}
|
||||
}
|
||||
@@ -128,17 +158,8 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private void saveToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsSpecialTile(TileName) && currentAnimation is not null)
|
||||
if (!IsSpecialTile(_tileName) && _animation is not null)
|
||||
{
|
||||
string anim = currentAnimation.BuildAnim();
|
||||
animationFile.Properties.SetProperty("ANIM", anim);
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
var texture = currentAnimation.BuildTexture();
|
||||
texture.Save(stream, ImageFormat.Png);
|
||||
animationFile.SetData(stream.ToArray());
|
||||
}
|
||||
animationFile.Filename = $"res/textures/{AnimationResources.GetAnimationSection(currentAnimation.Category)}/{TileName}.png";
|
||||
DialogResult = DialogResult.OK;
|
||||
return;
|
||||
}
|
||||
@@ -202,8 +223,8 @@ namespace PckStudio.Forms.Editor
|
||||
{
|
||||
int draggedIndex = draggedNode.Index;
|
||||
int targetIndex = targetNode.Index;
|
||||
currentAnimation.GetFrames().Swap(draggedIndex, targetIndex);
|
||||
LoadAnimationTreeView();
|
||||
_animation.SwapFrames(draggedIndex, targetIndex);
|
||||
UpdateTreeView();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -224,8 +245,8 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private void treeView1_doubleClick(object sender, EventArgs e)
|
||||
{
|
||||
var frame = currentAnimation.GetFrame(frameTreeView.SelectedNode.Index);
|
||||
using FrameEditor diag = new FrameEditor(frame.Ticks, currentAnimation.GetTextureIndex(frame.Texture), TextureIcons);
|
||||
var frame = _animation.GetFrame(frameTreeView.SelectedNode.Index);
|
||||
using FrameEditor diag = new FrameEditor(frame.Ticks, _animation.GetTextureIndex(frame.Texture), TextureIcons);
|
||||
if (diag.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
/* Found a bug here. When passing the frame variable,
|
||||
@@ -235,8 +256,8 @@ namespace PckStudio.Forms.Editor
|
||||
* - Matt
|
||||
*/
|
||||
|
||||
currentAnimation.SetFrame(frameTreeView.SelectedNode.Index, diag.FrameTextureIndex, diag.FrameTime);
|
||||
LoadAnimationTreeView();
|
||||
_animation.SetFrame(frameTreeView.SelectedNode.Index, diag.FrameTextureIndex, diag.FrameTime);
|
||||
UpdateTreeView();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -247,17 +268,17 @@ namespace PckStudio.Forms.Editor
|
||||
diag.SaveButton.Text = "Add";
|
||||
if (diag.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
currentAnimation.AddFrame(diag.FrameTextureIndex, TileName == "clock" || TileName == "compass" ? 1 : diag.FrameTime);
|
||||
LoadAnimationTreeView();
|
||||
_animation.AddFrame(diag.FrameTextureIndex, IsSpecialTile(_tileName) ? Animation.MinimumFrameTime : diag.FrameTime);
|
||||
UpdateTreeView();
|
||||
}
|
||||
}
|
||||
|
||||
private void removeFrameToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (frameTreeView.SelectedNode is TreeNode t &&
|
||||
currentAnimation.RemoveFrame(t.Index))
|
||||
if (frameTreeView.SelectedNode is TreeNode t && _animation.RemoveFrame(t.Index))
|
||||
{
|
||||
frameTreeView.SelectedNode.Remove();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void bulkAnimationSpeedToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
@@ -265,17 +286,23 @@ namespace PckStudio.Forms.Editor
|
||||
SetBulkSpeed diag = new SetBulkSpeed();
|
||||
if (diag.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
currentAnimation.GetFrames().ForEach(frame => frame.Ticks = diag.Ticks);
|
||||
LoadAnimationTreeView();
|
||||
if (animationPictureBox.IsPlaying)
|
||||
animationPictureBox.Stop();
|
||||
_animation.SetFrameTicks(diag.Ticks);
|
||||
UpdateTreeView();
|
||||
}
|
||||
diag.Dispose();
|
||||
}
|
||||
|
||||
// Reworked import tool with new Animation classes by Miku
|
||||
private void importJavaAnimationToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult query = MessageBox.Show("This feature will replace the existing animation data. It might fail if the selected animation script is invalid. Are you sure that you want to continue?", "Warning", MessageBoxButtons.YesNo);
|
||||
if (query == DialogResult.No) return;
|
||||
if (MessageBox.Show(
|
||||
"This feature will replace the existing animation data. " +
|
||||
"It might fail if the selected animation script is invalid. " +
|
||||
"Are you sure that you want to continue?",
|
||||
"Warning",
|
||||
MessageBoxButtons.YesNo) == DialogResult.No)
|
||||
return;
|
||||
|
||||
OpenFileDialog fileDialog = new OpenFileDialog
|
||||
{
|
||||
@@ -286,7 +313,7 @@ namespace PckStudio.Forms.Editor
|
||||
Filter = "Animation Scripts (*.mcmeta)|*.png.mcmeta"
|
||||
};
|
||||
if (fileDialog.ShowDialog(this) != DialogResult.OK) return;
|
||||
Console.WriteLine("Selected Animation Script: " + fileDialog.FileName);
|
||||
Debug.WriteLine("Selected Animation Script: " + fileDialog.FileName);
|
||||
|
||||
string textureFile = fileDialog.FileName.Substring(0, fileDialog.FileName.Length - ".mcmeta".Length);
|
||||
if (!File.Exists(textureFile))
|
||||
@@ -294,50 +321,13 @@ namespace PckStudio.Forms.Editor
|
||||
MessageBox.Show(textureFile + " was not found", "Texture not found");
|
||||
return;
|
||||
}
|
||||
var textures = Image.FromFile(textureFile).CreateImageList(ImageLayoutDirection.Horizontal);
|
||||
var new_animation = new Animation(textures);
|
||||
try
|
||||
try
|
||||
{
|
||||
var img = Image.FromFile(textureFile);
|
||||
JObject mcmeta = JObject.Parse(File.ReadAllText(fileDialog.FileName));
|
||||
if (mcmeta["animation"] is JToken animation)
|
||||
{
|
||||
int frameTime = Animation.MinimumFrameTime;
|
||||
// Some if statements to ensure that the animation is valid.
|
||||
if (animation["frametime"] is JToken frametime_token && frametime_token.Type == JTokenType.Integer)
|
||||
frameTime = (int)frametime_token;
|
||||
if (animation["interpolate"] is JToken interpolate_token && interpolate_token.Type == JTokenType.Boolean)
|
||||
new_animation.Interpolate = (bool)interpolate_token;
|
||||
if (animation["frames"] is JToken frames_token &&
|
||||
frames_token.Type == JTokenType.Array)
|
||||
{
|
||||
foreach (JToken frame in frames_token.Children())
|
||||
{
|
||||
if (frame.Type == JTokenType.Object)
|
||||
{
|
||||
if (frame["index"] is JToken frame_index && frame_index.Type == JTokenType.Integer &&
|
||||
frame["time"] is JToken frame_time && frame_time.Type == JTokenType.Integer)
|
||||
{
|
||||
Console.WriteLine("{0}*{1}", (int)frame["index"], (int)frame["time"]);
|
||||
new_animation.AddFrame((int)frame["index"], (int)frame["time"]);
|
||||
}
|
||||
}
|
||||
else if (frame.Type == JTokenType.Integer)
|
||||
{
|
||||
Console.WriteLine("{0}*{1}", (int)frame, frameTime);
|
||||
new_animation.AddFrame((int)frame, frameTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < new_animation.TextureCount; i++)
|
||||
{
|
||||
new_animation.AddFrame(i, frameTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
currentAnimation = new_animation;
|
||||
Animation javaAnimation = AnimationHelper.GetAnimationFromJavaAnimation(mcmeta, img);
|
||||
javaAnimation.Category = _animation.Category;
|
||||
_animation = javaAnimation;
|
||||
LoadAnimationTreeView();
|
||||
}
|
||||
catch (JsonException j_ex)
|
||||
@@ -350,45 +340,45 @@ namespace PckStudio.Forms.Editor
|
||||
private void changeTileToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (ChangeTile diag = new ChangeTile())
|
||||
if (diag.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
Console.WriteLine(diag.SelectedTile);
|
||||
currentAnimation.Category = diag.Category;
|
||||
TileName = diag.SelectedTile;
|
||||
{
|
||||
if (diag.ShowDialog(this) != DialogResult.OK)
|
||||
return;
|
||||
|
||||
Debug.WriteLine(diag.SelectedTile);
|
||||
_animation.Category = diag.Category;
|
||||
_tileName = diag.SelectedTile;
|
||||
|
||||
bulkAnimationSpeedToolStripMenuItem.Enabled =
|
||||
importToolStripMenuItem.Enabled =
|
||||
exportAsToolStripMenuItem.Enabled =
|
||||
InterpolationCheckbox.Visible = !IsSpecialTile(TileName);
|
||||
bulkAnimationSpeedToolStripMenuItem.Enabled =
|
||||
importToolStripMenuItem.Enabled =
|
||||
exportAsToolStripMenuItem.Enabled =
|
||||
InterpolationCheckbox.Visible = !IsSpecialTile(_tileName);
|
||||
|
||||
SetTileLabel();
|
||||
}
|
||||
SetTileLabel();
|
||||
}
|
||||
}
|
||||
|
||||
private void SetTileLabel()
|
||||
{
|
||||
foreach (JObject content in AnimationResources.JsonTileData[AnimationResources.GetAnimationSection(currentAnimation.Category)].Children())
|
||||
{
|
||||
var first = content.Properties().FirstOrDefault(p => p.Name == TileName);
|
||||
if (first is JProperty p)
|
||||
{
|
||||
tileLabel.Text = (string)p.Value;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
switch(MessageBox.Show(this,
|
||||
$"{TileName} is not a valid tile for animation, and will not play in game. Would you like to choose a new tile?",
|
||||
"Not a valid tile",
|
||||
MessageBoxButtons.YesNo))
|
||||
var textureInfos = _animation.Category switch
|
||||
{
|
||||
case DialogResult.Yes:
|
||||
changeTileToolStripMenuItem_Click(null, null);
|
||||
break;
|
||||
default:
|
||||
DialogResult = DialogResult.Abort;
|
||||
break;
|
||||
}
|
||||
AnimationCategory.Blocks => Tiles.BlockTileInfos,
|
||||
AnimationCategory.Items => Tiles.ItemTileInfos,
|
||||
_ => throw new ArgumentOutOfRangeException(_animation.Category.ToString())
|
||||
};
|
||||
tileLabel.Text = textureInfos.FirstOrDefault(p => p.InternalName == _tileName)?.DisplayName ?? _tileName;
|
||||
|
||||
//switch (MessageBox.Show(this,
|
||||
// $"{TileName} is not a valid tile for animation, and will not play in game. Would you like to choose a new tile?",
|
||||
// "Not a valid tile",
|
||||
// MessageBoxButtons.YesNo))
|
||||
//{
|
||||
// case DialogResult.Yes:
|
||||
// changeTileToolStripMenuItem_Click(null, EventArgs.Empty);
|
||||
// break;
|
||||
// default:
|
||||
// DialogResult = DialogResult.Abort;
|
||||
// break;
|
||||
//}
|
||||
}
|
||||
|
||||
private void exportJavaAnimationToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
@@ -398,13 +388,15 @@ namespace PckStudio.Forms.Editor
|
||||
fileDialog.Filter = "Animation Scripts (*.mcmeta)|*.png.mcmeta";
|
||||
if (fileDialog.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
JObject mcmeta = AnimationResources.ConvertAnimationToJson(currentAnimation, InterpolationCheckbox.Checked);
|
||||
JObject mcmeta = _animation.ConvertToJavaAnimation();
|
||||
string jsondata = JsonConvert.SerializeObject(mcmeta, Formatting.Indented);
|
||||
string filename = fileDialog.FileName;
|
||||
File.WriteAllText(filename, jsondata);
|
||||
var finalTexture = currentAnimation.BuildTexture();
|
||||
finalTexture.Save(Path.Combine(Path.GetDirectoryName(filename), Path.GetFileNameWithoutExtension(filename))); // removes ".mcmeta" from filename!
|
||||
MessageBox.Show("Animation was successfully exported to " + filename, "Export successful!");
|
||||
var finalTexture = _animation.BuildTexture();
|
||||
// removes ".mcmeta" from filename
|
||||
string texturePath = Path.Combine(Path.GetDirectoryName(filename), Path.GetFileNameWithoutExtension(filename));
|
||||
finalTexture.Save(texturePath);
|
||||
MessageBox.Show("Animation was successfully exported as " + Path.GetFileName(filename), "Export successful!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -432,8 +424,8 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private void InterpolationCheckbox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (currentAnimation is not null)
|
||||
currentAnimation.Interpolate = InterpolationCheckbox.Checked;
|
||||
if (_animation is not null)
|
||||
_animation.Interpolate = InterpolationCheckbox.Checked;
|
||||
}
|
||||
|
||||
private void AnimationEditor_FormClosing(object sender, FormClosingEventArgs e)
|
||||
@@ -474,7 +466,7 @@ namespace PckStudio.Forms.Editor
|
||||
gif.SelectActiveFrame(dimension, i);
|
||||
textures.Add(new Bitmap(gif));
|
||||
}
|
||||
currentAnimation = new Animation(textures);
|
||||
_animation = new Animation(textures, string.Empty);
|
||||
LoadAnimationTreeView();
|
||||
}
|
||||
|
||||
@@ -488,45 +480,28 @@ namespace PckStudio.Forms.Editor
|
||||
if (ofd.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
Image img = Image.FromFile(ofd.FileName);
|
||||
var textures = img.CreateImageList(ImageLayoutDirection.Vertical);
|
||||
currentAnimation = new Animation(textures);
|
||||
var textures = img.Split(ImageLayoutDirection.Vertical);
|
||||
_animation = new Animation(textures, string.Empty);
|
||||
LoadAnimationTreeView();
|
||||
}
|
||||
|
||||
//[System.Runtime.InteropServices.DllImport("gdi32.dll")]
|
||||
//public static extern bool DeleteObject(IntPtr hObject);
|
||||
|
||||
private void gifToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
private void gifToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
MessageBox.Show(this, "This feature is still under development", "Coming soon");
|
||||
return;
|
||||
var fileDialog = new SaveFileDialog()
|
||||
{
|
||||
FileName = _tileName,
|
||||
Filter = "GIF file|*.gif"
|
||||
};
|
||||
if (fileDialog.ShowDialog(this) != DialogResult.OK)
|
||||
return;
|
||||
|
||||
// TODO
|
||||
//var fileDialog = new SaveFileDialog()
|
||||
//{
|
||||
// Filter = "GIF file|*.gif"
|
||||
//};
|
||||
//if (fileDialog.ShowDialog(this) != DialogResult.OK)
|
||||
// return;
|
||||
|
||||
//GifBitmapEncoder gifBitmapEncoder = new GifBitmapEncoder();
|
||||
|
||||
//foreach (Bitmap texture in currentAnimation.GetTextures())
|
||||
//{
|
||||
// var bmp = texture.GetHbitmap();
|
||||
// var src = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(
|
||||
// bmp,
|
||||
// IntPtr.Zero,
|
||||
// System.Windows.Int32Rect.Empty,
|
||||
// BitmapSizeOptions.FromWidthAndHeight(texture.Width, texture.Height));
|
||||
// gifBitmapEncoder.Frames.Add(BitmapFrame.Create(src));
|
||||
// DeleteObject(bmp); // recommended, handle memory leak
|
||||
//}
|
||||
|
||||
//using (var fs = fileDialog.OpenFile())
|
||||
//{
|
||||
// gifBitmapEncoder.Save(fs);
|
||||
//}
|
||||
using (var gifWriter = AnimatedGif.AnimatedGif.Create(fileDialog.FileName, Animation.GameTickInMilliseconds, repeat: 0))
|
||||
{
|
||||
foreach (var frame in _animation.GetInterpolatedFrames())
|
||||
{
|
||||
gifWriter.AddFrame(frame.Texture, frame.Ticks * Animation.GameTickInMilliseconds, GifQuality.Bit8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void frameTimeandTicksToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
@@ -535,5 +510,5 @@ namespace PckStudio.Forms.Editor
|
||||
"All time related functions in Minecraft use ticks, notably redstone repeaters. There are 20 ticks in 1 second, so " +
|
||||
"1 tick is 1/20 of a second. To find how long your frame is, divide the frame time by 20", "Frame Time and Ticks");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Diagnostics;
|
||||
using System.Windows.Forms;
|
||||
using System.Threading.Tasks;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
using PckStudio.Extensions;
|
||||
|
||||
namespace PckStudio.Forms.Editor
|
||||
{
|
||||
internal class AnimationPictureBox : PictureBox
|
||||
{
|
||||
public bool IsPlaying => _isPlaying;
|
||||
|
||||
public void Start(Animation animation)
|
||||
{
|
||||
_animation = animation;
|
||||
cts = new CancellationTokenSource();
|
||||
Task.Run(DoAnimate, cts.Token);
|
||||
}
|
||||
|
||||
public void Stop([CallerMemberName] string callerName = default!)
|
||||
{
|
||||
Debug.WriteLine($"{nameof(AnimationPictureBox.Stop)} called from {callerName}!");
|
||||
cts.Cancel();
|
||||
}
|
||||
|
||||
public void SelectFrame(Animation animation, int index)
|
||||
{
|
||||
if (IsPlaying)
|
||||
Stop();
|
||||
_animation = animation;
|
||||
currentAnimationFrameIndex = index;
|
||||
currentFrame = SetAnimationFrame(index);
|
||||
}
|
||||
|
||||
private const int TickInMillisecond = 50; // 1 InGame tick
|
||||
|
||||
private bool _isPlaying = false;
|
||||
private int currentAnimationFrameIndex = 0;
|
||||
private Animation.Frame currentFrame;
|
||||
private Animation _animation;
|
||||
private CancellationTokenSource cts = new CancellationTokenSource();
|
||||
|
||||
protected override void OnPaint(PaintEventArgs pe)
|
||||
{
|
||||
pe.Graphics.InterpolationMode = InterpolationMode.NearestNeighbor;
|
||||
pe.Graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
|
||||
base.OnPaint(pe);
|
||||
}
|
||||
|
||||
private async void DoAnimate()
|
||||
{
|
||||
_ = _animation ?? throw new ArgumentNullException(nameof(_animation));
|
||||
_isPlaying = true;
|
||||
Animation.Frame nextFrame;
|
||||
while (!cts.IsCancellationRequested)
|
||||
{
|
||||
if (currentAnimationFrameIndex >= _animation.FrameCount)
|
||||
{
|
||||
currentAnimationFrameIndex = 0;
|
||||
}
|
||||
|
||||
if (currentAnimationFrameIndex + 1 >= _animation.FrameCount)
|
||||
{
|
||||
nextFrame = _animation.GetFrame(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
nextFrame = _animation.GetFrame(currentAnimationFrameIndex + 1);
|
||||
}
|
||||
|
||||
currentFrame = _animation.GetFrame(currentAnimationFrameIndex++);
|
||||
if (_animation.Interpolate)
|
||||
{
|
||||
await InterpolateFrame(currentFrame, nextFrame);
|
||||
continue;
|
||||
}
|
||||
SetAnimationFrame(currentFrame);
|
||||
await Task.Delay(TickInMillisecond * currentFrame.Ticks);
|
||||
}
|
||||
_isPlaying = false;
|
||||
}
|
||||
|
||||
private async Task InterpolateFrame(Animation.Frame currentFrame, Animation.Frame nextFrame)
|
||||
{
|
||||
for (int tick = 0; tick < currentFrame.Ticks && !cts.IsCancellationRequested; tick++)
|
||||
{
|
||||
double delta = 1.0f - tick / (double)currentFrame.Ticks;
|
||||
if (!IsDisposed)
|
||||
Invoke(() =>
|
||||
{
|
||||
if (!IsDisposed)
|
||||
Image = currentFrame.Texture.Interpolate(nextFrame.Texture, delta);
|
||||
});
|
||||
await Task.Delay(TickInMillisecond);
|
||||
}
|
||||
}
|
||||
|
||||
private Animation.Frame SetAnimationFrame(int frameIndex)
|
||||
{
|
||||
var frame = _animation.GetFrame(frameIndex);
|
||||
SetAnimationFrame(frame);
|
||||
return frame;
|
||||
}
|
||||
|
||||
private void SetAnimationFrame(Animation.Frame frame)
|
||||
{
|
||||
Invoke(() => Image = frame.Texture);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,11 +12,13 @@ using NAudio.Wave;
|
||||
|
||||
using OMI.Formats.Pck;
|
||||
|
||||
using PckStudio.Classes.FileTypes;
|
||||
using PckStudio.Classes.IO.PCK;
|
||||
using PckStudio.FileFormats;
|
||||
using PckStudio.IO.PckAudio;
|
||||
using PckStudio.Forms.Additional_Popups;
|
||||
using PckStudio.Properties;
|
||||
using PckStudio.API.Miles;
|
||||
using PckStudio.Internal;
|
||||
using PckStudio.Extensions;
|
||||
|
||||
// Audio Editor by MattNL and Miku-666
|
||||
|
||||
@@ -26,7 +28,7 @@ namespace PckStudio.Forms.Editor
|
||||
{
|
||||
public string defaultType = "yes";
|
||||
PckAudioFile audioFile = null;
|
||||
PckFile.FileData audioPCK;
|
||||
PckFileData audioPCK;
|
||||
bool _isLittleEndian = false;
|
||||
MainForm parent = null;
|
||||
|
||||
@@ -60,7 +62,7 @@ namespace PckStudio.Forms.Editor
|
||||
return (PckAudioFile.AudioCategory.EAudioType)Categories.IndexOf(category);
|
||||
}
|
||||
|
||||
public AudioEditor(PckFile.FileData file, bool isLittleEndian)
|
||||
public AudioEditor(PckFileData file, bool isLittleEndian)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
@@ -308,7 +310,7 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
await Task.Run(() =>
|
||||
{
|
||||
exitCode = Binka.FromWav(cacheSongFile, new_loc, (int)compressionUpDown.Value);
|
||||
exitCode = Binka.ToBinka(cacheSongFile, new_loc, (int)compressionUpDown.Value);
|
||||
});
|
||||
|
||||
if (!File.Exists(cacheSongFile)) MessageBox.Show(this, $"\"{songName}.wav\" failed to convert for some reason. Please report this on the communtiy Discord server, which can be found under \"More\" in the toolbar at the top of the program.", "Conversion failed");
|
||||
@@ -408,12 +410,7 @@ namespace PckStudio.Forms.Editor
|
||||
return;
|
||||
}
|
||||
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
var writer = new PckAudioFileWriter(audioFile, _isLittleEndian ? OMI.Endianness.LittleEndian : OMI.Endianness.BigEndian);
|
||||
writer.WriteToStream(stream);
|
||||
audioPCK.SetData(stream.ToArray());
|
||||
}
|
||||
audioPCK.SetData(new PckAudioFileWriter(audioFile, _isLittleEndian ? OMI.Endianness.LittleEndian : OMI.Endianness.BigEndian));
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
@@ -553,7 +550,7 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
await Task.Run(() =>
|
||||
{
|
||||
exitCode = Binka.FromWav(file, new_loc, (int)compressionUpDown.Value);
|
||||
exitCode = Binka.ToBinka(file, new_loc, (int)compressionUpDown.Value);
|
||||
});
|
||||
|
||||
waitDiag.Close();
|
||||
@@ -582,7 +579,7 @@ namespace PckStudio.Forms.Editor
|
||||
if (available.Length > 0)
|
||||
{
|
||||
using ItemSelectionPopUp add = new ItemSelectionPopUp(available);
|
||||
add.okBtn.Text = "Save";
|
||||
add.ButtonText = "Save";
|
||||
if (add.ShowDialog() != DialogResult.OK) return;
|
||||
|
||||
audioFile.RemoveCategory(category.audioType);
|
||||
|
||||
@@ -293,6 +293,7 @@
|
||||
this.Controls.Add(this.MobIsTamedCheckbox);
|
||||
this.Controls.Add(this.menuStrip);
|
||||
this.Controls.Add(this.treeView1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "BehaviourEditor";
|
||||
this.Resizable = false;
|
||||
this.Style = MetroFramework.MetroColorStyle.Silver;
|
||||
|
||||
@@ -12,13 +12,15 @@ using OMI.Formats.Behaviour;
|
||||
using OMI.Workers.Behaviour;
|
||||
using OMI.Formats.Pck;
|
||||
using PckStudio.Properties;
|
||||
using PckStudio.Internal;
|
||||
using PckStudio.Extensions;
|
||||
|
||||
namespace PckStudio.Forms.Editor
|
||||
{
|
||||
public partial class BehaviourEditor : MetroForm
|
||||
{
|
||||
// Behaviours File Format research by Miku and MattNL
|
||||
private readonly PckFile.FileData _file;
|
||||
private readonly PckFileData _file;
|
||||
BehaviourFile behaviourFile;
|
||||
|
||||
private readonly JObject EntityJSONData = JObject.Parse(Properties.Resources.entityData);
|
||||
@@ -59,7 +61,7 @@ namespace PckStudio.Forms.Editor
|
||||
treeView1.EndUpdate();
|
||||
}
|
||||
|
||||
public BehaviourEditor(PckFile.FileData file)
|
||||
public BehaviourEditor(PckFileData file)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
@@ -253,32 +255,27 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private void saveToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (var stream = new MemoryStream())
|
||||
behaviourFile = new BehaviourFile();
|
||||
foreach (TreeNode node in treeView1.Nodes)
|
||||
{
|
||||
behaviourFile = new BehaviourFile();
|
||||
|
||||
foreach (TreeNode node in treeView1.Nodes)
|
||||
if(node.Tag is BehaviourFile.RiderPositionOverride entry)
|
||||
{
|
||||
if(node.Tag is BehaviourFile.RiderPositionOverride entry)
|
||||
entry.overrides.Clear();
|
||||
Console.WriteLine();
|
||||
foreach (TreeNode overrideNode in node.Nodes)
|
||||
{
|
||||
entry.overrides.Clear();
|
||||
Console.WriteLine();
|
||||
foreach (TreeNode overrideNode in node.Nodes)
|
||||
if(overrideNode.Tag is BehaviourFile.RiderPositionOverride.PositionOverride overrideEntry)
|
||||
{
|
||||
if(overrideNode.Tag is BehaviourFile.RiderPositionOverride.PositionOverride overrideEntry)
|
||||
{
|
||||
entry.overrides.Add(overrideEntry);
|
||||
}
|
||||
entry.overrides.Add(overrideEntry);
|
||||
}
|
||||
|
||||
behaviourFile.entries.Add(entry);
|
||||
}
|
||||
}
|
||||
|
||||
var writer = new BehavioursWriter(behaviourFile);
|
||||
writer.WriteToStream(stream);
|
||||
_file.SetData(stream.ToArray());
|
||||
behaviourFile.entries.Add(entry);
|
||||
}
|
||||
}
|
||||
|
||||
_file.SetData(new BehavioursWriter(behaviourFile));
|
||||
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -8,6 +8,7 @@ using System.Windows.Forms;
|
||||
using OMI.Formats.Color;
|
||||
using OMI.Formats.Pck;
|
||||
using OMI.Workers.Color;
|
||||
using PckStudio.Extensions;
|
||||
using PckStudio.ToolboxItems;
|
||||
using PckStudio.Properties;
|
||||
|
||||
@@ -19,7 +20,7 @@ namespace PckStudio.Forms.Editor
|
||||
ColorContainer colourfile;
|
||||
ColorContainer.Color clipboard_color;
|
||||
|
||||
private readonly PckFile.FileData _file;
|
||||
private readonly PckFileData _file;
|
||||
|
||||
List<TreeNode> colorCache = new List<TreeNode>();
|
||||
List<TreeNode> waterCache = new List<TreeNode>();
|
||||
@@ -52,7 +53,7 @@ namespace PckStudio.Forms.Editor
|
||||
_1_91_,
|
||||
}
|
||||
|
||||
public COLEditor(PckFile.FileData file)
|
||||
public COLEditor(PckFileData file)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
@@ -287,14 +288,9 @@ namespace PckStudio.Forms.Editor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
var writer = new COLFileWriter(colourfile);
|
||||
writer.WriteToStream(stream);
|
||||
_file.SetData(stream.ToArray());
|
||||
}
|
||||
|
||||
|
||||
_file.SetData(new COLFileWriter(colourfile));
|
||||
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -377,7 +377,7 @@
|
||||
</value>
|
||||
</data>
|
||||
<data name="saveToolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>180, 22</value>
|
||||
<value>98, 22</value>
|
||||
</data>
|
||||
<data name="saveToolStripMenuItem1.Text" xml:space="preserve">
|
||||
<value>Save</value>
|
||||
|
||||
@@ -46,19 +46,19 @@
|
||||
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.compressionLvlToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.levelToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.noneToolStripMenuItem = new PckStudio.ToolStripRadioButtonMenuItem();
|
||||
this.compressedToolStripMenuItem = new PckStudio.ToolStripRadioButtonMenuItem();
|
||||
this.compressedRLEToolStripMenuItem = new PckStudio.ToolStripRadioButtonMenuItem();
|
||||
this.compressedRLECRCToolStripMenuItem = new PckStudio.ToolStripRadioButtonMenuItem();
|
||||
this.noneToolStripMenuItem = new PckStudio.ToolboxItems.ToolStripRadioButtonMenuItem();
|
||||
this.compressedToolStripMenuItem = new PckStudio.ToolboxItems.ToolStripRadioButtonMenuItem();
|
||||
this.compressedRLEToolStripMenuItem = new PckStudio.ToolboxItems.ToolStripRadioButtonMenuItem();
|
||||
this.compressedRLECRCToolStripMenuItem = new PckStudio.ToolboxItems.ToolStripRadioButtonMenuItem();
|
||||
this.typeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.wiiUPSVitaToolStripMenuItem = new PckStudio.ToolStripRadioButtonMenuItem();
|
||||
this.pS3ToolStripMenuItem = new PckStudio.ToolStripRadioButtonMenuItem();
|
||||
this.xbox360ToolStripMenuItem = new PckStudio.ToolStripRadioButtonMenuItem();
|
||||
this.metroPanel1 = new MetroFramework.Controls.MetroPanel();
|
||||
this.wiiUPSVitaToolStripMenuItem = new PckStudio.ToolboxItems.ToolStripRadioButtonMenuItem();
|
||||
this.pS3ToolStripMenuItem = new PckStudio.ToolboxItems.ToolStripRadioButtonMenuItem();
|
||||
this.xbox360ToolStripMenuItem = new PckStudio.ToolboxItems.ToolStripRadioButtonMenuItem();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.MessageContextMenu.SuspendLayout();
|
||||
this.DetailContextMenu.SuspendLayout();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.metroPanel1.SuspendLayout();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// GrfTreeView
|
||||
@@ -66,11 +66,11 @@
|
||||
this.GrfTreeView.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.GrfTreeView.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.GrfTreeView.ContextMenuStrip = this.MessageContextMenu;
|
||||
this.GrfTreeView.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.GrfTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.GrfTreeView.ForeColor = System.Drawing.SystemColors.MenuBar;
|
||||
this.GrfTreeView.Location = new System.Drawing.Point(0, 0);
|
||||
this.GrfTreeView.Location = new System.Drawing.Point(3, 23);
|
||||
this.GrfTreeView.Name = "GrfTreeView";
|
||||
this.GrfTreeView.Size = new System.Drawing.Size(223, 312);
|
||||
this.GrfTreeView.Size = new System.Drawing.Size(219, 312);
|
||||
this.GrfTreeView.TabIndex = 0;
|
||||
this.GrfTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.GrfTreeView_AfterSelect);
|
||||
this.GrfTreeView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.GrfTreeView_KeyDown);
|
||||
@@ -102,11 +102,11 @@
|
||||
this.GrfParametersTreeView.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.GrfParametersTreeView.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.GrfParametersTreeView.ContextMenuStrip = this.DetailContextMenu;
|
||||
this.GrfParametersTreeView.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.GrfParametersTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.GrfParametersTreeView.ForeColor = System.Drawing.SystemColors.MenuBar;
|
||||
this.GrfParametersTreeView.Location = new System.Drawing.Point(227, 0);
|
||||
this.GrfParametersTreeView.Location = new System.Drawing.Point(228, 23);
|
||||
this.GrfParametersTreeView.Name = "GrfParametersTreeView";
|
||||
this.GrfParametersTreeView.Size = new System.Drawing.Size(223, 312);
|
||||
this.GrfParametersTreeView.Size = new System.Drawing.Size(219, 312);
|
||||
this.GrfParametersTreeView.TabIndex = 1;
|
||||
this.GrfParametersTreeView.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.GrfDetailsTreeView_NodeMouseDoubleClick);
|
||||
this.GrfParametersTreeView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.GrfDetailsTreeView_KeyDown);
|
||||
@@ -136,7 +136,7 @@
|
||||
// metroLabel1
|
||||
//
|
||||
this.metroLabel1.AutoSize = true;
|
||||
this.metroLabel1.Location = new System.Drawing.Point(25, 88);
|
||||
this.metroLabel1.Location = new System.Drawing.Point(3, 0);
|
||||
this.metroLabel1.Name = "metroLabel1";
|
||||
this.metroLabel1.Size = new System.Drawing.Size(73, 19);
|
||||
this.metroLabel1.TabIndex = 2;
|
||||
@@ -146,9 +146,8 @@
|
||||
//
|
||||
// metroLabel2
|
||||
//
|
||||
this.metroLabel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.metroLabel2.AutoSize = true;
|
||||
this.metroLabel2.Location = new System.Drawing.Point(252, 88);
|
||||
this.metroLabel2.Location = new System.Drawing.Point(228, 0);
|
||||
this.metroLabel2.Name = "metroLabel2";
|
||||
this.metroLabel2.Size = new System.Drawing.Size(75, 19);
|
||||
this.metroLabel2.TabIndex = 0;
|
||||
@@ -292,35 +291,32 @@
|
||||
this.xbox360ToolStripMenuItem.Text = "Xbox 360";
|
||||
this.xbox360ToolStripMenuItem.CheckedChanged += new System.EventHandler(this.xbox360ToolStripMenuItem_CheckedChanged);
|
||||
//
|
||||
// metroPanel1
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.metroPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.metroPanel1.Controls.Add(this.GrfParametersTreeView);
|
||||
this.metroPanel1.Controls.Add(this.GrfTreeView);
|
||||
this.metroPanel1.HorizontalScrollbarBarColor = true;
|
||||
this.metroPanel1.HorizontalScrollbarHighlightOnWheel = false;
|
||||
this.metroPanel1.HorizontalScrollbarSize = 10;
|
||||
this.metroPanel1.Location = new System.Drawing.Point(25, 110);
|
||||
this.metroPanel1.Name = "metroPanel1";
|
||||
this.metroPanel1.Size = new System.Drawing.Size(450, 312);
|
||||
this.metroPanel1.TabIndex = 4;
|
||||
this.metroPanel1.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroPanel1.VerticalScrollbarBarColor = true;
|
||||
this.metroPanel1.VerticalScrollbarHighlightOnWheel = false;
|
||||
this.metroPanel1.VerticalScrollbarSize = 10;
|
||||
this.metroPanel1.Resize += new System.EventHandler(this.metroPanel1_Resize);
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.metroLabel1, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.GrfParametersTreeView, 1, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.GrfTreeView, 0, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.metroLabel2, 1, 0);
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(25, 110);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 2;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(450, 312);
|
||||
this.tableLayoutPanel1.TabIndex = 4;
|
||||
//
|
||||
// GameRuleFileEditor
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(500, 450);
|
||||
this.Controls.Add(this.metroPanel1);
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.Controls.Add(this.metroLabel2);
|
||||
this.Controls.Add(this.metroLabel1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.MaximizeBox = false;
|
||||
@@ -337,7 +333,8 @@
|
||||
this.DetailContextMenu.ResumeLayout(false);
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.metroPanel1.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@@ -359,19 +356,19 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem;
|
||||
private MetroFramework.Controls.MetroPanel metroPanel1;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.ToolStripMenuItem compressionLvlToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem levelToolStripMenuItem;
|
||||
|
||||
private PckStudio.ToolStripRadioButtonMenuItem noneToolStripMenuItem;
|
||||
private PckStudio.ToolStripRadioButtonMenuItem compressedToolStripMenuItem;
|
||||
private PckStudio.ToolStripRadioButtonMenuItem compressedRLEToolStripMenuItem;
|
||||
private PckStudio.ToolStripRadioButtonMenuItem compressedRLECRCToolStripMenuItem;
|
||||
private PckStudio.ToolboxItems.ToolStripRadioButtonMenuItem noneToolStripMenuItem;
|
||||
private PckStudio.ToolboxItems.ToolStripRadioButtonMenuItem compressedToolStripMenuItem;
|
||||
private PckStudio.ToolboxItems.ToolStripRadioButtonMenuItem compressedRLEToolStripMenuItem;
|
||||
private PckStudio.ToolboxItems.ToolStripRadioButtonMenuItem compressedRLECRCToolStripMenuItem;
|
||||
|
||||
private System.Windows.Forms.ToolStripMenuItem typeToolStripMenuItem;
|
||||
|
||||
private PckStudio.ToolStripRadioButtonMenuItem wiiUPSVitaToolStripMenuItem;
|
||||
private PckStudio.ToolStripRadioButtonMenuItem pS3ToolStripMenuItem;
|
||||
private PckStudio.ToolStripRadioButtonMenuItem xbox360ToolStripMenuItem;
|
||||
private PckStudio.ToolboxItems.ToolStripRadioButtonMenuItem wiiUPSVitaToolStripMenuItem;
|
||||
private PckStudio.ToolboxItems.ToolStripRadioButtonMenuItem pS3ToolStripMenuItem;
|
||||
private PckStudio.ToolboxItems.ToolStripRadioButtonMenuItem xbox360ToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,21 @@
|
||||
using System;
|
||||
/* Copyright (c) 2023-present miku-666
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
* warranty. In no event will the authors be held liable for any damages
|
||||
* arising from the use of this software.
|
||||
*
|
||||
* Permission is granted to anyone to use this software for any purpose,
|
||||
* including commercial applications, and to alter it and redistribute it
|
||||
* freely, subject to the following restrictions:
|
||||
*
|
||||
* 1.The origin of this software must not be misrepresented; you must not
|
||||
* claim that you wrote the original software. If you use this software
|
||||
* in a product, an acknowledgment in the product documentation would be
|
||||
* appreciated but is not required.
|
||||
* 2. Altered source versions must be plainly marked as such, and must not be
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
**/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
@@ -11,18 +28,23 @@ using OMI.Workers.GameRule;
|
||||
using System.Diagnostics;
|
||||
using OMI.Formats.Pck;
|
||||
using PckStudio.Forms.Additional_Popups;
|
||||
using PckStudio.ToolboxItems;
|
||||
using PckStudio.Models;
|
||||
using PckStudio.Properties;
|
||||
using PckStudio.ToolboxItems;
|
||||
using PckStudio.Extensions;
|
||||
|
||||
namespace PckStudio.Forms.Editor
|
||||
{
|
||||
public partial class GameRuleFileEditor : MetroFramework.Forms.MetroForm
|
||||
{
|
||||
private PckFile.FileData _pckfile;
|
||||
private PckFileData _pckfile;
|
||||
private GameRuleFile _file;
|
||||
private GameRuleFile.CompressionType compressionType;
|
||||
private GameRuleFile.CompressionLevel compressionLevel;
|
||||
|
||||
private const string use_zlib = "Wii U, PS Vita";
|
||||
private const string use_deflate = "PS3";
|
||||
private const string use_xmem = "Xbox 360";
|
||||
|
||||
public GameRuleFileEditor()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -32,35 +54,32 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private void PromptForCompressionType()
|
||||
{
|
||||
ItemSelectionPopUp dialog = new ItemSelectionPopUp("Wii U, PS Vita", "PS3", "Xbox 360");
|
||||
dialog.label2.Text = "Type";
|
||||
dialog.okBtn.Text = "Ok";
|
||||
ItemSelectionPopUp dialog = new ItemSelectionPopUp(use_zlib, use_deflate, use_xmem);
|
||||
dialog.LabelText = "Type";
|
||||
dialog.ButtonText = "Ok";
|
||||
if (dialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
switch(dialog.SelectedItem)
|
||||
{
|
||||
case "Wii U, PS Vita":
|
||||
case use_zlib:
|
||||
wiiUPSVitaToolStripMenuItem.Checked = true;
|
||||
break;
|
||||
case "PS3":
|
||||
case use_deflate:
|
||||
pS3ToolStripMenuItem.Checked = true;
|
||||
break;
|
||||
case "Xbox 360":
|
||||
case use_xmem:
|
||||
xbox360ToolStripMenuItem.Checked = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public GameRuleFileEditor(PckFile.FileData file) : this()
|
||||
public GameRuleFileEditor(PckFileData file) : this()
|
||||
{
|
||||
_pckfile = file;
|
||||
if (file.Size > 0)
|
||||
using (var stream = new MemoryStream(file.Data))
|
||||
{
|
||||
using (var stream = new MemoryStream(file.Data))
|
||||
{
|
||||
_file = OpenGameRuleFile(stream);
|
||||
}
|
||||
_file = OpenGameRuleFile(stream);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +132,7 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private void SetCompressionLevel()
|
||||
{
|
||||
switch (_file.FileHeader.CompressionLevel)
|
||||
switch (_file.Header.CompressionLevel)
|
||||
{
|
||||
case GameRuleFile.CompressionLevel.None:
|
||||
noneToolStripMenuItem.Checked = true;
|
||||
@@ -244,7 +263,7 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (_file.FileHeader.unknownData[3] != 0)
|
||||
if (_file.Header.unknownData[3] != 0)
|
||||
{
|
||||
MessageBox.Show("World grf saving is currently unsupported");
|
||||
return;
|
||||
@@ -253,12 +272,7 @@ namespace PckStudio.Forms.Editor
|
||||
{
|
||||
try
|
||||
{
|
||||
var writer = new GameRuleFileWriter(
|
||||
_file,
|
||||
compressionLevel,
|
||||
compressionType);
|
||||
writer.WriteToStream(stream);
|
||||
_pckfile?.SetData(stream.ToArray());
|
||||
_pckfile?.SetData(new GameRuleFileWriter(_file, compressionLevel, compressionType));
|
||||
DialogResult = DialogResult.OK;
|
||||
MessageBox.Show("Saved!");
|
||||
}
|
||||
@@ -270,15 +284,6 @@ namespace PckStudio.Forms.Editor
|
||||
}
|
||||
}
|
||||
|
||||
private void metroPanel1_Resize(object sender, EventArgs e)
|
||||
{
|
||||
int padding = 2;
|
||||
GrfTreeView.Size = new Size(metroPanel1.Size.Width / 2 - padding, metroPanel1.Size.Height);
|
||||
GrfParametersTreeView.Size = new Size(metroPanel1.Size.Width / 2 - padding, metroPanel1.Size.Height);
|
||||
// good enough
|
||||
metroLabel2.Location = new Point(metroPanel1.Size.Width / 2 + 25, metroLabel2.Location.Y);
|
||||
}
|
||||
|
||||
private void openToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog dialog = new OpenFileDialog();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -11,6 +11,7 @@ using OMI.Formats.Languages;
|
||||
using OMI.Workers.Language;
|
||||
using OMI.Formats.Pck;
|
||||
using PckStudio.Properties;
|
||||
using PckStudio.Extensions;
|
||||
|
||||
namespace PckStudio.Forms.Editor
|
||||
{
|
||||
@@ -18,9 +19,9 @@ namespace PckStudio.Forms.Editor
|
||||
{
|
||||
DataTable tbl;
|
||||
LOCFile currentLoc;
|
||||
PckFile.FileData _file;
|
||||
PckFileData _file;
|
||||
|
||||
public LOCEditor(PckFile.FileData file)
|
||||
public LOCEditor(PckFileData file)
|
||||
{
|
||||
InitializeComponent();
|
||||
_file = file;
|
||||
@@ -139,12 +140,7 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (var ms = new MemoryStream())
|
||||
{
|
||||
var writer = new LOCFileWriter(currentLoc, 2);
|
||||
writer.WriteToStream(ms);
|
||||
_file.SetData(ms.ToArray());
|
||||
}
|
||||
_file.SetData(new LOCFileWriter(currentLoc, 2));
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
255
PCK-Studio/Forms/Editor/MaterialsEditor.Designer.cs
generated
255
PCK-Studio/Forms/Editor/MaterialsEditor.Designer.cs
generated
@@ -28,145 +28,146 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MaterialsEditor));
|
||||
this.treeView1 = new System.Windows.Forms.TreeView();
|
||||
this.metroContextMenu1 = new MetroFramework.Controls.MetroContextMenu(this.components);
|
||||
this.addToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.removeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuStrip = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.xLabel = new MetroFramework.Controls.MetroLabel();
|
||||
this.materialComboBox = new MetroFramework.Controls.MetroComboBox();
|
||||
this.metroContextMenu1.SuspendLayout();
|
||||
this.menuStrip.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// treeView1
|
||||
//
|
||||
this.treeView1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MaterialsEditor));
|
||||
this.treeView1 = new System.Windows.Forms.TreeView();
|
||||
this.metroContextMenu1 = new MetroFramework.Controls.MetroContextMenu(this.components);
|
||||
this.addToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.removeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuStrip = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.xLabel = new MetroFramework.Controls.MetroLabel();
|
||||
this.materialComboBox = new MetroFramework.Controls.MetroComboBox();
|
||||
this.metroContextMenu1.SuspendLayout();
|
||||
this.menuStrip.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// treeView1
|
||||
//
|
||||
this.treeView1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.treeView1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.treeView1.ContextMenuStrip = this.metroContextMenu1;
|
||||
this.treeView1.ForeColor = System.Drawing.Color.White;
|
||||
this.treeView1.Location = new System.Drawing.Point(20, 84);
|
||||
this.treeView1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.treeView1.Name = "treeView1";
|
||||
this.treeView1.Size = new System.Drawing.Size(136, 176);
|
||||
this.treeView1.TabIndex = 13;
|
||||
this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect);
|
||||
this.treeView1.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseClick);
|
||||
this.treeView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView1_KeyDown);
|
||||
this.treeView1.MouseHover += new System.EventHandler(this.treeView1_MouseHover);
|
||||
//
|
||||
// metroContextMenu1
|
||||
//
|
||||
this.metroContextMenu1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.treeView1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.treeView1.ContextMenuStrip = this.metroContextMenu1;
|
||||
this.treeView1.ForeColor = System.Drawing.Color.White;
|
||||
this.treeView1.Location = new System.Drawing.Point(20, 84);
|
||||
this.treeView1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.treeView1.Name = "treeView1";
|
||||
this.treeView1.Size = new System.Drawing.Size(136, 176);
|
||||
this.treeView1.TabIndex = 13;
|
||||
this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect);
|
||||
this.treeView1.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseClick);
|
||||
this.treeView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView1_KeyDown);
|
||||
this.treeView1.MouseHover += new System.EventHandler(this.treeView1_MouseHover);
|
||||
//
|
||||
// metroContextMenu1
|
||||
//
|
||||
this.metroContextMenu1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.addToolStripMenuItem,
|
||||
this.removeToolStripMenuItem});
|
||||
this.metroContextMenu1.Name = "metroContextMenu1";
|
||||
this.metroContextMenu1.Size = new System.Drawing.Size(127, 48);
|
||||
//
|
||||
// addToolStripMenuItem
|
||||
//
|
||||
this.addToolStripMenuItem.Name = "addToolStripMenuItem";
|
||||
this.addToolStripMenuItem.Size = new System.Drawing.Size(126, 22);
|
||||
this.addToolStripMenuItem.Text = "Add Entry";
|
||||
this.addToolStripMenuItem.Click += new System.EventHandler(this.addToolStripMenuItem_Click);
|
||||
//
|
||||
// removeToolStripMenuItem
|
||||
//
|
||||
this.removeToolStripMenuItem.Name = "removeToolStripMenuItem";
|
||||
this.removeToolStripMenuItem.Size = new System.Drawing.Size(126, 22);
|
||||
this.removeToolStripMenuItem.Text = "Remove";
|
||||
this.removeToolStripMenuItem.Click += new System.EventHandler(this.removeToolStripMenuItem_Click);
|
||||
//
|
||||
// menuStrip
|
||||
//
|
||||
this.menuStrip.AutoSize = false;
|
||||
this.menuStrip.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.metroContextMenu1.Name = "metroContextMenu1";
|
||||
this.metroContextMenu1.Size = new System.Drawing.Size(127, 48);
|
||||
//
|
||||
// addToolStripMenuItem
|
||||
//
|
||||
this.addToolStripMenuItem.Name = "addToolStripMenuItem";
|
||||
this.addToolStripMenuItem.Size = new System.Drawing.Size(126, 22);
|
||||
this.addToolStripMenuItem.Text = "Add Entry";
|
||||
this.addToolStripMenuItem.Click += new System.EventHandler(this.addToolStripMenuItem_Click);
|
||||
//
|
||||
// removeToolStripMenuItem
|
||||
//
|
||||
this.removeToolStripMenuItem.Name = "removeToolStripMenuItem";
|
||||
this.removeToolStripMenuItem.Size = new System.Drawing.Size(126, 22);
|
||||
this.removeToolStripMenuItem.Text = "Remove";
|
||||
this.removeToolStripMenuItem.Click += new System.EventHandler(this.removeToolStripMenuItem_Click);
|
||||
//
|
||||
// menuStrip
|
||||
//
|
||||
this.menuStrip.AutoSize = false;
|
||||
this.menuStrip.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem,
|
||||
this.helpToolStripMenuItem});
|
||||
this.menuStrip.Location = new System.Drawing.Point(20, 60);
|
||||
this.menuStrip.Name = "menuStrip";
|
||||
this.menuStrip.Size = new System.Drawing.Size(348, 24);
|
||||
this.menuStrip.TabIndex = 14;
|
||||
this.menuStrip.Text = "menuStrip1";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.menuStrip.Location = new System.Drawing.Point(20, 60);
|
||||
this.menuStrip.Name = "menuStrip";
|
||||
this.menuStrip.Size = new System.Drawing.Size(348, 24);
|
||||
this.menuStrip.TabIndex = 14;
|
||||
this.menuStrip.Text = "menuStrip1";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.saveToolStripMenuItem1});
|
||||
this.fileToolStripMenuItem.ForeColor = System.Drawing.Color.White;
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||
this.fileToolStripMenuItem.Text = "File";
|
||||
//
|
||||
// saveToolStripMenuItem1
|
||||
//
|
||||
this.saveToolStripMenuItem1.Image = ((System.Drawing.Image)(resources.GetObject("saveToolStripMenuItem1.Image")));
|
||||
this.saveToolStripMenuItem1.Name = "saveToolStripMenuItem1";
|
||||
this.saveToolStripMenuItem1.Size = new System.Drawing.Size(98, 22);
|
||||
this.saveToolStripMenuItem1.Text = "Save";
|
||||
this.saveToolStripMenuItem1.Click += new System.EventHandler(this.saveToolStripMenuItem1_Click);
|
||||
//
|
||||
// helpToolStripMenuItem
|
||||
//
|
||||
this.helpToolStripMenuItem.ForeColor = System.Drawing.Color.White;
|
||||
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
|
||||
this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
|
||||
this.helpToolStripMenuItem.Text = "Help";
|
||||
//
|
||||
// xLabel
|
||||
//
|
||||
this.xLabel.AutoSize = true;
|
||||
this.xLabel.Location = new System.Drawing.Point(159, 147);
|
||||
this.xLabel.Name = "xLabel";
|
||||
this.xLabel.Size = new System.Drawing.Size(91, 19);
|
||||
this.xLabel.TabIndex = 30;
|
||||
this.xLabel.Text = "Material Type:";
|
||||
this.xLabel.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// materialComboBox
|
||||
//
|
||||
this.materialComboBox.FormattingEnabled = true;
|
||||
this.materialComboBox.ItemHeight = 23;
|
||||
this.materialComboBox.Items.AddRange(new object[] {
|
||||
this.fileToolStripMenuItem.ForeColor = System.Drawing.Color.White;
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||
this.fileToolStripMenuItem.Text = "File";
|
||||
//
|
||||
// saveToolStripMenuItem1
|
||||
//
|
||||
this.saveToolStripMenuItem1.Image = ((System.Drawing.Image)(resources.GetObject("saveToolStripMenuItem1.Image")));
|
||||
this.saveToolStripMenuItem1.Name = "saveToolStripMenuItem1";
|
||||
this.saveToolStripMenuItem1.Size = new System.Drawing.Size(98, 22);
|
||||
this.saveToolStripMenuItem1.Text = "Save";
|
||||
this.saveToolStripMenuItem1.Click += new System.EventHandler(this.saveToolStripMenuItem1_Click);
|
||||
//
|
||||
// helpToolStripMenuItem
|
||||
//
|
||||
this.helpToolStripMenuItem.ForeColor = System.Drawing.Color.White;
|
||||
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
|
||||
this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
|
||||
this.helpToolStripMenuItem.Text = "Help";
|
||||
//
|
||||
// xLabel
|
||||
//
|
||||
this.xLabel.AutoSize = true;
|
||||
this.xLabel.Location = new System.Drawing.Point(159, 147);
|
||||
this.xLabel.Name = "xLabel";
|
||||
this.xLabel.Size = new System.Drawing.Size(91, 19);
|
||||
this.xLabel.TabIndex = 30;
|
||||
this.xLabel.Text = "Material Type:";
|
||||
this.xLabel.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// materialComboBox
|
||||
//
|
||||
this.materialComboBox.FormattingEnabled = true;
|
||||
this.materialComboBox.ItemHeight = 23;
|
||||
this.materialComboBox.Items.AddRange(new object[] {
|
||||
"entity",
|
||||
"entity_alphatest",
|
||||
"entity_emissive_alpha",
|
||||
"entity_emissive_alpha_only",
|
||||
"entity_alphatest_change_color",
|
||||
"entity_change_color"});
|
||||
this.materialComboBox.Location = new System.Drawing.Point(159, 169);
|
||||
this.materialComboBox.Name = "materialComboBox";
|
||||
this.materialComboBox.Size = new System.Drawing.Size(209, 29);
|
||||
this.materialComboBox.TabIndex = 31;
|
||||
this.materialComboBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.materialComboBox.UseSelectable = true;
|
||||
this.materialComboBox.SelectedIndexChanged += new System.EventHandler(this.materialComboBox_SelectedIndexChanged);
|
||||
//
|
||||
// MaterialsEditor
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(388, 280);
|
||||
this.Controls.Add(this.materialComboBox);
|
||||
this.Controls.Add(this.xLabel);
|
||||
this.Controls.Add(this.menuStrip);
|
||||
this.Controls.Add(this.treeView1);
|
||||
this.Name = "MaterialsEditor";
|
||||
this.Style = MetroFramework.MetroColorStyle.Silver;
|
||||
this.Text = "Materials Editor";
|
||||
this.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroContextMenu1.ResumeLayout(false);
|
||||
this.menuStrip.ResumeLayout(false);
|
||||
this.menuStrip.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
this.materialComboBox.Location = new System.Drawing.Point(159, 169);
|
||||
this.materialComboBox.Name = "materialComboBox";
|
||||
this.materialComboBox.Size = new System.Drawing.Size(209, 29);
|
||||
this.materialComboBox.TabIndex = 31;
|
||||
this.materialComboBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.materialComboBox.UseSelectable = true;
|
||||
this.materialComboBox.SelectedIndexChanged += new System.EventHandler(this.materialComboBox_SelectedIndexChanged);
|
||||
//
|
||||
// MaterialsEditor
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(388, 280);
|
||||
this.Controls.Add(this.materialComboBox);
|
||||
this.Controls.Add(this.xLabel);
|
||||
this.Controls.Add(this.menuStrip);
|
||||
this.Controls.Add(this.treeView1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "MaterialsEditor";
|
||||
this.Style = MetroFramework.MetroColorStyle.Silver;
|
||||
this.Text = "Materials Editor";
|
||||
this.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroContextMenu1.ResumeLayout(false);
|
||||
this.menuStrip.ResumeLayout(false);
|
||||
this.menuStrip.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -10,13 +10,15 @@ using Newtonsoft.Json.Linq;
|
||||
using OMI.Formats.Pck;
|
||||
using OMI.Formats.Material;
|
||||
using OMI.Workers.Material;
|
||||
using PckStudio.Internal;
|
||||
using PckStudio.Extensions;
|
||||
|
||||
namespace PckStudio.Forms.Editor
|
||||
{
|
||||
public partial class MaterialsEditor : MetroForm
|
||||
{
|
||||
// Materials File Format research by PhoenixARC
|
||||
private readonly PckFile.FileData _file;
|
||||
private readonly PckFileData _file;
|
||||
MaterialContainer materialFile;
|
||||
|
||||
private readonly JObject EntityJSONData = JObject.Parse(Properties.Resources.entityData);
|
||||
@@ -48,7 +50,7 @@ namespace PckStudio.Forms.Editor
|
||||
treeView1.EndUpdate();
|
||||
}
|
||||
|
||||
public MaterialsEditor(PckFile.FileData file)
|
||||
public MaterialsEditor(PckFileData file)
|
||||
{
|
||||
InitializeComponent();
|
||||
_file = file;
|
||||
@@ -113,22 +115,18 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private void saveToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (var stream = new MemoryStream())
|
||||
materialFile = new MaterialContainer();
|
||||
|
||||
foreach (TreeNode node in treeView1.Nodes)
|
||||
{
|
||||
materialFile = new MaterialContainer();
|
||||
|
||||
foreach (TreeNode node in treeView1.Nodes)
|
||||
if(node.Tag is MaterialContainer.Material entry)
|
||||
{
|
||||
if(node.Tag is MaterialContainer.Material entry)
|
||||
{
|
||||
materialFile.Add(entry);
|
||||
}
|
||||
materialFile.Add(entry);
|
||||
}
|
||||
|
||||
var writer = new MaterialFileWriter(materialFile);
|
||||
writer.WriteToStream(stream);
|
||||
_file.SetData(stream.ToArray());
|
||||
}
|
||||
|
||||
_file.SetData(new MaterialFileWriter(materialFile));
|
||||
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
298
PCK-Studio/Forms/Editor/TextureAtlasEditor.Designer.cs
generated
Normal file
298
PCK-Studio/Forms/Editor/TextureAtlasEditor.Designer.cs
generated
Normal file
@@ -0,0 +1,298 @@
|
||||
namespace PckStudio.Forms.Editor
|
||||
{
|
||||
partial class TextureAtlasEditor
|
||||
{
|
||||
/// <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(TextureAtlasEditor));
|
||||
this.variantLabel = new MetroFramework.Controls.MetroLabel();
|
||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.extractTileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.applyColorMaskToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.playAnimationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.originalPictureBox = new PckStudio.ToolboxItems.InterpolationPictureBox();
|
||||
this.selectTilePictureBox = new PckStudio.ToolboxItems.AnimationPictureBox();
|
||||
this.replaceButton = new MetroFramework.Controls.MetroButton();
|
||||
this.animationButton = new MetroFramework.Controls.MetroButton();
|
||||
this.tileNameLabel = new MetroFramework.Controls.MetroLabel();
|
||||
this.variantComboBox = new MetroFramework.Controls.MetroComboBox();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.originalPictureBox)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.selectTilePictureBox)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// variantLabel
|
||||
//
|
||||
this.variantLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.variantLabel.AutoSize = true;
|
||||
this.variantLabel.Location = new System.Drawing.Point(3, 254);
|
||||
this.variantLabel.Name = "variantLabel";
|
||||
this.variantLabel.Size = new System.Drawing.Size(82, 28);
|
||||
this.variantLabel.TabIndex = 18;
|
||||
this.variantLabel.Text = "Variant:";
|
||||
this.variantLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.variantLabel.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// menuStrip1
|
||||
//
|
||||
this.menuStrip1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem,
|
||||
this.viewToolStripMenuItem});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(20, 60);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(590, 24);
|
||||
this.menuStrip1.TabIndex = 16;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.saveToolStripMenuItem,
|
||||
this.extractTileToolStripMenuItem});
|
||||
this.fileToolStripMenuItem.ForeColor = System.Drawing.SystemColors.Menu;
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||
this.fileToolStripMenuItem.Text = "File";
|
||||
//
|
||||
// saveToolStripMenuItem
|
||||
//
|
||||
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
|
||||
this.saveToolStripMenuItem.Size = new System.Drawing.Size(131, 22);
|
||||
this.saveToolStripMenuItem.Text = "Save";
|
||||
this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
|
||||
//
|
||||
// extractTileToolStripMenuItem
|
||||
//
|
||||
this.extractTileToolStripMenuItem.Name = "extractTileToolStripMenuItem";
|
||||
this.extractTileToolStripMenuItem.Size = new System.Drawing.Size(131, 22);
|
||||
this.extractTileToolStripMenuItem.Text = "Extract Tile";
|
||||
this.extractTileToolStripMenuItem.Click += new System.EventHandler(this.extractTileToolStripMenuItem_Click);
|
||||
//
|
||||
// viewToolStripMenuItem
|
||||
//
|
||||
this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.applyColorMaskToolStripMenuItem,
|
||||
this.playAnimationsToolStripMenuItem});
|
||||
this.viewToolStripMenuItem.ForeColor = System.Drawing.SystemColors.Control;
|
||||
this.viewToolStripMenuItem.Name = "viewToolStripMenuItem";
|
||||
this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
|
||||
this.viewToolStripMenuItem.Text = "View";
|
||||
//
|
||||
// applyColorMaskToolStripMenuItem
|
||||
//
|
||||
this.applyColorMaskToolStripMenuItem.Checked = true;
|
||||
this.applyColorMaskToolStripMenuItem.CheckOnClick = true;
|
||||
this.applyColorMaskToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.applyColorMaskToolStripMenuItem.Name = "applyColorMaskToolStripMenuItem";
|
||||
this.applyColorMaskToolStripMenuItem.Size = new System.Drawing.Size(168, 22);
|
||||
this.applyColorMaskToolStripMenuItem.Text = "Apply Color Mask";
|
||||
this.applyColorMaskToolStripMenuItem.CheckedChanged += new System.EventHandler(this.applyColorMaskToolStripMenuItem_CheckedChanged);
|
||||
//
|
||||
// playAnimationsToolStripMenuItem
|
||||
//
|
||||
this.playAnimationsToolStripMenuItem.Checked = true;
|
||||
this.playAnimationsToolStripMenuItem.CheckOnClick = true;
|
||||
this.playAnimationsToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.playAnimationsToolStripMenuItem.Name = "playAnimationsToolStripMenuItem";
|
||||
this.playAnimationsToolStripMenuItem.Size = new System.Drawing.Size(168, 22);
|
||||
this.playAnimationsToolStripMenuItem.Text = "Play Animations";
|
||||
this.playAnimationsToolStripMenuItem.CheckedChanged += new System.EventHandler(this.playAnimationsToolStripMenuItem_CheckedChanged);
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.AutoSize = true;
|
||||
this.tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.tableLayoutPanel1.ColumnCount = 3;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 15F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 60F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.originalPictureBox, 2, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.selectTilePictureBox, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.replaceButton, 0, 5);
|
||||
this.tableLayoutPanel1.Controls.Add(this.animationButton, 0, 4);
|
||||
this.tableLayoutPanel1.Controls.Add(this.tileNameLabel, 0, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.variantComboBox, 1, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.variantLabel, 0, 2);
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(20, 84);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 6;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 40F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 5F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 5F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 40F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 5F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 5F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(590, 565);
|
||||
this.tableLayoutPanel1.TabIndex = 17;
|
||||
//
|
||||
// originalPictureBox
|
||||
//
|
||||
this.originalPictureBox.BackColor = System.Drawing.Color.Transparent;
|
||||
this.originalPictureBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.originalPictureBox.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
|
||||
this.originalPictureBox.Location = new System.Drawing.Point(238, 3);
|
||||
this.originalPictureBox.Name = "originalPictureBox";
|
||||
this.tableLayoutPanel1.SetRowSpan(this.originalPictureBox, 6);
|
||||
this.originalPictureBox.Size = new System.Drawing.Size(349, 559);
|
||||
this.originalPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.originalPictureBox.TabIndex = 4;
|
||||
this.originalPictureBox.TabStop = false;
|
||||
this.originalPictureBox.MouseClick += new System.Windows.Forms.MouseEventHandler(this.originalPictureBox_MouseClick);
|
||||
//
|
||||
// selectTilePictureBox
|
||||
//
|
||||
this.selectTilePictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.selectTilePictureBox.BackColor = System.Drawing.Color.Transparent;
|
||||
this.selectTilePictureBox.BlendColor = System.Drawing.Color.White;
|
||||
this.selectTilePictureBox.BlendMode = PckStudio.Extensions.BlendMode.Multiply;
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.selectTilePictureBox, 2);
|
||||
this.selectTilePictureBox.Image = null;
|
||||
this.selectTilePictureBox.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
|
||||
this.selectTilePictureBox.Location = new System.Drawing.Point(3, 3);
|
||||
this.selectTilePictureBox.Name = "selectTilePictureBox";
|
||||
this.selectTilePictureBox.Size = new System.Drawing.Size(229, 220);
|
||||
this.selectTilePictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.selectTilePictureBox.TabIndex = 0;
|
||||
this.selectTilePictureBox.TabStop = false;
|
||||
this.selectTilePictureBox.UseBlendColor = true;
|
||||
//
|
||||
// replaceButton
|
||||
//
|
||||
this.replaceButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.replaceButton.AutoSize = true;
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.replaceButton, 2);
|
||||
this.replaceButton.Location = new System.Drawing.Point(3, 539);
|
||||
this.replaceButton.Name = "replaceButton";
|
||||
this.replaceButton.Size = new System.Drawing.Size(229, 23);
|
||||
this.replaceButton.TabIndex = 14;
|
||||
this.replaceButton.Text = "Replace";
|
||||
this.replaceButton.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.replaceButton.UseSelectable = true;
|
||||
this.replaceButton.Click += new System.EventHandler(this.replaceButton_Click);
|
||||
//
|
||||
// animationButton
|
||||
//
|
||||
this.animationButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.animationButton.AutoSize = true;
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.animationButton, 2);
|
||||
this.animationButton.Location = new System.Drawing.Point(3, 511);
|
||||
this.animationButton.Name = "animationButton";
|
||||
this.animationButton.Size = new System.Drawing.Size(229, 22);
|
||||
this.animationButton.TabIndex = 16;
|
||||
this.animationButton.Text = "Animation";
|
||||
this.animationButton.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.animationButton.UseSelectable = true;
|
||||
this.animationButton.Click += new System.EventHandler(this.animationButton_Click);
|
||||
//
|
||||
// tileNameLabel
|
||||
//
|
||||
this.tileNameLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tileNameLabel.AutoSize = true;
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.tileNameLabel, 2);
|
||||
this.tileNameLabel.Location = new System.Drawing.Point(3, 235);
|
||||
this.tileNameLabel.Name = "tileNameLabel";
|
||||
this.tileNameLabel.Size = new System.Drawing.Size(229, 19);
|
||||
this.tileNameLabel.TabIndex = 19;
|
||||
this.tileNameLabel.Text = "TileName";
|
||||
this.tileNameLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.tileNameLabel.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// variantComboBox
|
||||
//
|
||||
this.variantComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.variantComboBox.Enabled = false;
|
||||
this.variantComboBox.FormattingEnabled = true;
|
||||
this.variantComboBox.ItemHeight = 23;
|
||||
this.variantComboBox.Location = new System.Drawing.Point(91, 257);
|
||||
this.variantComboBox.Name = "variantComboBox";
|
||||
this.variantComboBox.Size = new System.Drawing.Size(141, 29);
|
||||
this.variantComboBox.TabIndex = 17;
|
||||
this.variantComboBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.variantComboBox.UseSelectable = true;
|
||||
this.variantComboBox.SelectedIndexChanged += new System.EventHandler(this.variantComboBox_SelectedIndexChanged);
|
||||
//
|
||||
// TextureAtlasEditor
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(630, 669);
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.MinimumSize = new System.Drawing.Size(630, 669);
|
||||
this.Name = "TextureAtlasEditor";
|
||||
this.ShadowType = MetroFramework.Forms.MetroFormShadowType.None;
|
||||
this.Style = MetroFramework.MetroColorStyle.Silver;
|
||||
this.Text = "Texture Atlas Editor";
|
||||
this.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.TextureAtlasEditor_FormClosing);
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.originalPictureBox)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.selectTilePictureBox)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private PckStudio.ToolboxItems.AnimationPictureBox selectTilePictureBox;
|
||||
private System.Windows.Forms.MenuStrip menuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private MetroFramework.Controls.MetroButton replaceButton;
|
||||
private PckStudio.ToolboxItems.InterpolationPictureBox originalPictureBox;
|
||||
private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;
|
||||
private MetroFramework.Controls.MetroButton animationButton;
|
||||
private System.Windows.Forms.ToolStripMenuItem extractTileToolStripMenuItem;
|
||||
private MetroFramework.Controls.MetroComboBox variantComboBox;
|
||||
private System.Windows.Forms.ToolStripMenuItem viewToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem applyColorMaskToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem playAnimationsToolStripMenuItem;
|
||||
private MetroFramework.Controls.MetroLabel tileNameLabel;
|
||||
private MetroFramework.Controls.MetroLabel variantLabel;
|
||||
}
|
||||
}
|
||||
453
PCK-Studio/Forms/Editor/TextureAtlasEditor.cs
Normal file
453
PCK-Studio/Forms/Editor/TextureAtlasEditor.cs
Normal file
@@ -0,0 +1,453 @@
|
||||
/* Copyright (c) 2023-present miku-666
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
* warranty. In no event will the authors be held liable for any damages
|
||||
* arising from the use of this software.
|
||||
*
|
||||
* Permission is granted to anyone to use this software for any purpose,
|
||||
* including commercial applications, and to alter it and redistribute it
|
||||
* freely, subject to the following restrictions:
|
||||
*
|
||||
* 1.The origin of this software must not be misrepresented; you must not
|
||||
* claim that you wrote the original software. If you use this software
|
||||
* in a product, an acknowledgment in the product documentation would be
|
||||
* appreciated but is not required.
|
||||
* 2. Altered source versions must be plainly marked as such, and must not be
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
**/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using MetroFramework.Forms;
|
||||
|
||||
using OMI.Formats.Color;
|
||||
using OMI.Formats.Pck;
|
||||
using OMI.Workers.Color;
|
||||
|
||||
using PckStudio.Extensions;
|
||||
using PckStudio.Helper;
|
||||
using PckStudio.Internal.Json;
|
||||
|
||||
namespace PckStudio.Forms.Editor
|
||||
{
|
||||
internal partial class TextureAtlasEditor : MetroForm
|
||||
{
|
||||
public Image FinalTexture
|
||||
{
|
||||
get
|
||||
{
|
||||
if (DialogResult != DialogResult.OK)
|
||||
return null;
|
||||
return (Image)originalPictureBox.Image.Clone();
|
||||
}
|
||||
}
|
||||
|
||||
private readonly PckFile _pckFile;
|
||||
private ColorContainer _colourTable;
|
||||
private readonly Size _areaSize;
|
||||
private readonly int _rowCount;
|
||||
private readonly int _columnCount;
|
||||
private readonly string _atlasType;
|
||||
private readonly List<AtlasTile> _tiles;
|
||||
|
||||
private AtlasTile _selectedTile;
|
||||
private sealed class AtlasTile
|
||||
{
|
||||
internal readonly int Index;
|
||||
internal readonly Rectangle Area;
|
||||
internal readonly JsonTileInfo Tile;
|
||||
internal readonly Image Texture;
|
||||
|
||||
public AtlasTile(int index, Rectangle area, JsonTileInfo tile, Image texture)
|
||||
{
|
||||
Index = index;
|
||||
Area = area;
|
||||
Tile = tile;
|
||||
Texture = texture;
|
||||
}
|
||||
}
|
||||
|
||||
private int SelectedIndex
|
||||
{
|
||||
set => SetImageDisplayed(value);
|
||||
}
|
||||
|
||||
private const ImageLayoutDirection _imageLayout = ImageLayoutDirection.Horizontal;
|
||||
|
||||
public TextureAtlasEditor(PckFile pckFile, string path, Image atlas, Size areaSize)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
AcquireColorTable(pckFile);
|
||||
_areaSize = areaSize;
|
||||
_pckFile = pckFile;
|
||||
_rowCount = atlas.Width / areaSize.Width;
|
||||
_columnCount = atlas.Height / areaSize.Height;
|
||||
(var tileInfos, _atlasType) = Path.GetFileNameWithoutExtension(path) switch
|
||||
{
|
||||
"terrain" => (Tiles.BlockTileInfos, "blocks"),
|
||||
"items" => (Tiles.ItemTileInfos, "items"),
|
||||
_ => (null, null),
|
||||
};
|
||||
originalPictureBox.Image = atlas;
|
||||
var images = atlas.Split(_areaSize, _imageLayout);
|
||||
|
||||
var tiles = images.enumerate().Select(
|
||||
p => new AtlasTile(p.index, GetAtlasArea(p.index, _rowCount, _columnCount, _areaSize, _imageLayout), tileInfos.IndexInRange(p.index) ? tileInfos[p.index] : null, p.value)
|
||||
);
|
||||
_tiles = new List<AtlasTile>(tiles);
|
||||
|
||||
SelectedIndex = 0;
|
||||
}
|
||||
|
||||
private bool AcquireColorTable(PckFile pckFile)
|
||||
{
|
||||
if (pckFile.TryGetFile("colours.col", PckFileType.ColourTableFile, out var colFile) &&
|
||||
colFile.Size > 0)
|
||||
{
|
||||
using var ms = new MemoryStream(colFile.Data);
|
||||
var reader = new COLFileReader();
|
||||
_colourTable = reader.FromStream(ms);
|
||||
return true;
|
||||
}
|
||||
_colourTable = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
private void SetImageDisplayed(int index)
|
||||
{
|
||||
tileNameLabel.Text = string.Empty;
|
||||
|
||||
variantLabel.Visible = false;
|
||||
variantComboBox.Visible = false;
|
||||
variantComboBox.Items.Clear();
|
||||
variantComboBox.SelectedItem = null;
|
||||
variantComboBox.Enabled = false;
|
||||
|
||||
if (selectTilePictureBox.IsPlaying)
|
||||
selectTilePictureBox.Stop();
|
||||
selectTilePictureBox.UseBlendColor = false;
|
||||
selectTilePictureBox.Image = null;
|
||||
|
||||
if (_tiles is null || !_tiles.IndexInRange(index) || (_selectedTile = _tiles[index]) is null)
|
||||
return;
|
||||
|
||||
if(string.IsNullOrEmpty(_selectedTile.Tile.DisplayName))
|
||||
{
|
||||
// changes the selected tile to the base flowing tile (carries all properties over) - Matt
|
||||
_selectedTile = _tiles.Find(t => t.Tile.InternalName == _selectedTile.Tile.InternalName);
|
||||
}
|
||||
|
||||
tileNameLabel.Text = $"{_selectedTile.Tile.DisplayName}";
|
||||
selectTilePictureBox.BlendColor = GetBlendColor();
|
||||
selectTilePictureBox.UseBlendColor = applyColorMaskToolStripMenuItem.Checked;
|
||||
|
||||
bool hasAnimation =
|
||||
_pckFile.TryGetValue($"res/textures/{_atlasType}/{_selectedTile.Tile.InternalName}.png", PckFileType.TextureFile, out var animationFile);
|
||||
animationButton.Text = hasAnimation ? "Edit Animation" : "Create Animation";
|
||||
replaceButton.Enabled = !hasAnimation;
|
||||
|
||||
if (playAnimationsToolStripMenuItem.Checked &&
|
||||
hasAnimation &&
|
||||
animationFile.Size > 0)
|
||||
{
|
||||
var animation = AnimationHelper.GetAnimationFromFile(animationFile);
|
||||
selectTilePictureBox.Start(animation);
|
||||
return;
|
||||
}
|
||||
|
||||
if (variantLabel.Visible = variantComboBox.Visible = _selectedTile.Tile.HasColourEntry && _selectedTile.Tile.ColourEntry.Variants.Length > 1)
|
||||
{
|
||||
variantComboBox.Items.AddRange(_selectedTile.Tile.ColourEntry.Variants);
|
||||
variantComboBox.SelectedItem = _selectedTile.Tile.ColourEntry.DefaultName;
|
||||
}
|
||||
|
||||
selectTilePictureBox.Image = _selectedTile.Texture;
|
||||
}
|
||||
|
||||
private static int GetSelectedImageIndex(
|
||||
Size pictureBoxSize,
|
||||
Size imageSize,
|
||||
Size areaSize,
|
||||
Point clickLocation,
|
||||
PictureBoxSizeMode sizeMode,
|
||||
ImageLayoutDirection imageLayout)
|
||||
{
|
||||
Point result = new Point();
|
||||
int rowCount = imageSize.Width / areaSize.Width;
|
||||
int columnCount = imageSize.Height / areaSize.Height;
|
||||
switch (sizeMode)
|
||||
{
|
||||
case PictureBoxSizeMode.Normal:
|
||||
case PictureBoxSizeMode.AutoSize:
|
||||
{
|
||||
var imageArea = new Rectangle(Point.Empty, imageSize);
|
||||
if (!imageArea.Contains(clickLocation))
|
||||
return -1;
|
||||
result.X = clickLocation.X / areaSize.Width;
|
||||
result.Y = clickLocation.Y / areaSize.Height;
|
||||
break;
|
||||
}
|
||||
case PictureBoxSizeMode.StretchImage:
|
||||
{
|
||||
float widthDiff = (float)pictureBoxSize.Width / imageSize.Width;
|
||||
float heightDiff = (float)pictureBoxSize.Height / imageSize.Height;
|
||||
Size scaledArea = Size.Round(new SizeF(areaSize.Width * widthDiff, areaSize.Height * heightDiff));
|
||||
|
||||
result.X = clickLocation.X / scaledArea.Width;
|
||||
result.Y = clickLocation.Y / scaledArea.Height;
|
||||
break;
|
||||
}
|
||||
case PictureBoxSizeMode.CenterImage:
|
||||
{
|
||||
Rectangle imageArea = new Rectangle(Point.Empty, imageSize);
|
||||
imageArea.X = (pictureBoxSize.Width - imageArea.Width) / 2;
|
||||
imageArea.Y = (pictureBoxSize.Height - imageArea.Height) / 2;
|
||||
|
||||
if (!imageArea.Contains(clickLocation))
|
||||
return -1;
|
||||
|
||||
result.X = (clickLocation.X - imageArea.X) / (clickLocation.X * areaSize.Width);
|
||||
result.Y = (clickLocation.Y - imageArea.Y) / (clickLocation.Y * areaSize.Height);
|
||||
break;
|
||||
}
|
||||
case PictureBoxSizeMode.Zoom:
|
||||
{
|
||||
Rectangle imageArea = new Rectangle();
|
||||
float widthDiff = (float)pictureBoxSize.Width / imageSize.Width;
|
||||
float heightDiff = (float)pictureBoxSize.Height / imageSize.Height;
|
||||
float scale = Math.Min(widthDiff, heightDiff);
|
||||
|
||||
imageArea.Width = (int)(imageSize.Width * scale);
|
||||
imageArea.Height = (int)(imageSize.Height * scale);
|
||||
imageArea.X = (pictureBoxSize.Width - imageArea.Width) / 2;
|
||||
imageArea.Y = (pictureBoxSize.Height - imageArea.Height) / 2;
|
||||
|
||||
if (!imageArea.Contains(clickLocation))
|
||||
return -1;
|
||||
|
||||
var scaledArea = new SizeF(areaSize.Width * scale, areaSize.Height * scale);
|
||||
result.X = (int)((clickLocation.X - imageArea.X) / scaledArea.Width);
|
||||
result.Y = (int)((clickLocation.Y - imageArea.Y) / scaledArea.Height);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
};
|
||||
return GetSelectedIndex(result.X, result.Y, rowCount, columnCount, imageLayout);
|
||||
}
|
||||
|
||||
private static int GetSelectedIndex(int x, int y, int rowCount, int columnCount, ImageLayoutDirection imageLayout)
|
||||
{
|
||||
return imageLayout switch
|
||||
{
|
||||
ImageLayoutDirection.Horizontal => x + y * rowCount,
|
||||
ImageLayoutDirection.Vertical => y + x * columnCount,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(imageLayout)),
|
||||
};
|
||||
}
|
||||
|
||||
private static Rectangle GetAtlasArea(int index, int rowCount, int columnCount, Size size, ImageLayoutDirection imageLayout)
|
||||
{
|
||||
var p = GetSelectedPoint(index, rowCount, columnCount, imageLayout);
|
||||
var ap = new Point(p.X * size.Width, p.Y * size.Height);
|
||||
return new Rectangle(ap, size);
|
||||
}
|
||||
|
||||
private static Point GetSelectedPoint(int index, int rowCount, int columnCount, ImageLayoutDirection imageLayout)
|
||||
{
|
||||
int y = Math.DivRem(index, rowCount, out int x);
|
||||
if (imageLayout == ImageLayoutDirection.Vertical)
|
||||
x = Math.DivRem(index, columnCount, out y);
|
||||
return new Point(x, y);
|
||||
}
|
||||
|
||||
private void SetTile(Image texture)
|
||||
{
|
||||
var graphicsConfig = new GraphicsConfig()
|
||||
{
|
||||
InterpolationMode = selectTilePictureBox.InterpolationMode,
|
||||
PixelOffsetMode = PixelOffsetMode.HighQuality
|
||||
};
|
||||
if (texture.Size != _areaSize)
|
||||
texture = texture.Resize(_areaSize, graphicsConfig);
|
||||
using (var g = Graphics.FromImage(originalPictureBox.Image))
|
||||
{
|
||||
g.ApplyConfig(graphicsConfig);
|
||||
g.Fill(_selectedTile.Area, Color.Transparent);
|
||||
g.DrawImage(texture, _selectedTile.Area);
|
||||
}
|
||||
|
||||
_tiles[_selectedTile.Index] = new AtlasTile(_selectedTile.Index, _selectedTile.Area, _selectedTile.Tile, texture);
|
||||
selectTilePictureBox.Image = texture;
|
||||
originalPictureBox.Invalidate();
|
||||
}
|
||||
|
||||
private Color GetBlendColor()
|
||||
{
|
||||
if (_selectedTile.Tile.HasColourEntry && _selectedTile.Tile.ColourEntry is not null)
|
||||
return FindBlendColorByKey(_selectedTile.Tile.ColourEntry.DefaultName);
|
||||
return Color.White;
|
||||
}
|
||||
|
||||
private Color FindBlendColorByKey(string colorKey)
|
||||
{
|
||||
if (_colourTable is not null &&
|
||||
_selectedTile.Tile.HasColourEntry &&
|
||||
_selectedTile.Tile.ColourEntry is not null)
|
||||
{
|
||||
if (_selectedTile.Tile.ColourEntry.IsWaterColour &&
|
||||
_colourTable.WaterColors.FirstOrDefault(entry => entry.Name == colorKey) is ColorContainer.WaterColor waterColor)
|
||||
{
|
||||
return waterColor.SurfaceColor;
|
||||
}
|
||||
else if (_colourTable.Colors.FirstOrDefault(entry => entry.Name == colorKey) is ColorContainer.Color color)
|
||||
{
|
||||
return color.ColorPallette;
|
||||
}
|
||||
}
|
||||
return Color.White;
|
||||
}
|
||||
|
||||
protected override bool ProcessDialogKey(Keys keyData)
|
||||
{
|
||||
switch (keyData)
|
||||
{
|
||||
case Keys.Left:
|
||||
if (_tiles.IndexInRange(_selectedTile.Index - 1))
|
||||
{
|
||||
SelectedIndex = _selectedTile.Index - 1;
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case Keys.Right:
|
||||
if (_tiles.IndexInRange(_selectedTile.Index + 1))
|
||||
{
|
||||
SelectedIndex = _selectedTile.Index + 1;
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case Keys.Up:
|
||||
if (_tiles.IndexInRange(_selectedTile.Index - _rowCount))
|
||||
{
|
||||
SelectedIndex = _selectedTile.Index - _rowCount;
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
||||
case Keys.Down:
|
||||
if (_tiles.IndexInRange(_selectedTile.Index + _rowCount))
|
||||
{
|
||||
SelectedIndex = _selectedTile.Index + _rowCount;
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private void originalPictureBox_MouseClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button != MouseButtons.Left)
|
||||
return;
|
||||
|
||||
int index = GetSelectedImageIndex(
|
||||
originalPictureBox.Size,
|
||||
originalPictureBox.Image.Size,
|
||||
_areaSize,
|
||||
e.Location,
|
||||
originalPictureBox.SizeMode,
|
||||
_imageLayout);
|
||||
|
||||
if (index != -1)
|
||||
{
|
||||
SelectedIndex = index;
|
||||
}
|
||||
}
|
||||
|
||||
private void replaceButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog fileDialog = new OpenFileDialog()
|
||||
{
|
||||
Filter = "PNG Image|*.png",
|
||||
Title = "Select Texture"
|
||||
};
|
||||
|
||||
if (fileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
var img = Image.FromFile(fileDialog.FileName);
|
||||
SetTile(img);
|
||||
}
|
||||
}
|
||||
|
||||
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
private void animationButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
var file = _pckFile.GetOrCreate(
|
||||
$"res/textures/{_atlasType}/{_selectedTile.Tile.InternalName}.png",
|
||||
PckFileType.TextureFile
|
||||
);
|
||||
|
||||
var animation = AnimationHelper.GetAnimationFromFile(file);
|
||||
|
||||
var animationEditor = new AnimationEditor(animation, _selectedTile.Tile.InternalName, GetBlendColor());
|
||||
if (animationEditor.ShowDialog() != DialogResult.OK)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
AnimationHelper.SaveAnimationToFile(file, animation);
|
||||
}
|
||||
|
||||
private void extractTileToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveFileDialog saveFileDialog = new SaveFileDialog()
|
||||
{
|
||||
Filter = "Tile Texture|*.png",
|
||||
FileName = _selectedTile.Tile.InternalName
|
||||
};
|
||||
if (saveFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
selectTilePictureBox.Image.Save(saveFileDialog.FileName, ImageFormat.Png);
|
||||
}
|
||||
}
|
||||
|
||||
private void variantComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (_selectedTile.Tile.ColourEntry is not null &&
|
||||
_selectedTile.Tile.ColourEntry.Variants.IndexInRange(variantComboBox.SelectedIndex))
|
||||
{
|
||||
string colorKey = _selectedTile.Tile.ColourEntry.Variants[variantComboBox.SelectedIndex];
|
||||
selectTilePictureBox.BlendColor = FindBlendColorByKey(colorKey);
|
||||
selectTilePictureBox.Image = _selectedTile.Texture;
|
||||
}
|
||||
}
|
||||
|
||||
private void applyColorMaskToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
SelectedIndex = _selectedTile.Index;
|
||||
}
|
||||
|
||||
private void playAnimationsToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
SelectedIndex = _selectedTile.Index;
|
||||
}
|
||||
|
||||
private void TextureAtlasEditor_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
if (selectTilePictureBox.IsPlaying)
|
||||
selectTilePictureBox.Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
2630
PCK-Studio/Forms/Editor/TextureAtlasEditor.resx
Normal file
2630
PCK-Studio/Forms/Editor/TextureAtlasEditor.resx
Normal file
File diff suppressed because it is too large
Load Diff
@@ -48,8 +48,8 @@
|
||||
this.textSkinName = new MetroFramework.Controls.MetroTextBox();
|
||||
this.textThemeName = new MetroFramework.Controls.MetroTextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.capePictureBox = new PckStudio.ToolboxItems.PictureBoxWithInterpolationMode();
|
||||
this.skinPictureBoxTexture = new PckStudio.ToolboxItems.PictureBoxWithInterpolationMode();
|
||||
this.capePictureBox = new PckStudio.ToolboxItems.InterpolationPictureBox();
|
||||
this.skinPictureBoxTexture = new PckStudio.ToolboxItems.InterpolationPictureBox();
|
||||
this.CreateSkinButton = new CBH.Ultimate.Controls.CrEaTiiOn_Ultimate_GradientButton();
|
||||
this.EditFlagsButton = new CBH.Ultimate.Controls.CrEaTiiOn_Ultimate_GradientButton();
|
||||
this.EditModelButton = new CBH.Ultimate.Controls.CrEaTiiOn_Ultimate_GradientButton();
|
||||
@@ -382,7 +382,7 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem replaceToolStripMenuItem1;
|
||||
private System.Windows.Forms.Button buttonCape;
|
||||
private System.Windows.Forms.Button buttonSkin;
|
||||
private PckStudio.ToolboxItems.PictureBoxWithInterpolationMode capePictureBox;
|
||||
private PckStudio.ToolboxItems.InterpolationPictureBox capePictureBox;
|
||||
private System.Windows.Forms.PictureBox displayBox;
|
||||
private System.Windows.Forms.RadioButton radioAUTO;
|
||||
private System.Windows.Forms.RadioButton radioLOCAL;
|
||||
@@ -391,7 +391,7 @@
|
||||
private MetroFramework.Controls.MetroTextBox textSkinName;
|
||||
private MetroFramework.Controls.MetroTextBox textThemeName;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private PckStudio.ToolboxItems.PictureBoxWithInterpolationMode skinPictureBoxTexture;
|
||||
private PckStudio.ToolboxItems.InterpolationPictureBox skinPictureBoxTexture;
|
||||
private CBH.Ultimate.Controls.CrEaTiiOn_Ultimate_GradientButton CreateSkinButton;
|
||||
private CBH.Ultimate.Controls.CrEaTiiOn_Ultimate_GradientButton EditFlagsButton;
|
||||
private CBH.Ultimate.Controls.CrEaTiiOn_Ultimate_GradientButton EditModelButton;
|
||||
@@ -8,24 +8,23 @@ using OMI.Formats.Languages;
|
||||
using OMI.Formats.Pck;
|
||||
using PckStudio.Internal;
|
||||
using PckStudio.Forms.Editor;
|
||||
using PckStudio.Classes.IO._3DST;
|
||||
using PckStudio.ToolboxItems;
|
||||
using PckStudio.IO._3DST;
|
||||
|
||||
namespace PckStudio
|
||||
{
|
||||
public partial class AddNewSkin : ThemeForm
|
||||
{
|
||||
public PckFile.FileData SkinFile => skin;
|
||||
public PckFile.FileData CapeFile => cape;
|
||||
public PckFileData SkinFile => skin;
|
||||
public PckFileData CapeFile => cape;
|
||||
public bool HasCape = false;
|
||||
|
||||
LOCFile currentLoc;
|
||||
PckFile.FileData skin = new PckFile.FileData("dlcskinXYXYXYXY", PckFile.FileData.FileType.SkinFile);
|
||||
PckFile.FileData cape = new PckFile.FileData("dlccapeXYXYXYXY", PckFile.FileData.FileType.CapeFile);
|
||||
PckFileData skin = new PckFileData("dlcskinXYXYXYXY", PckFileType.SkinFile);
|
||||
PckFileData cape = new PckFileData("dlccapeXYXYXYXY", PckFileType.CapeFile);
|
||||
SkinANIM anim = new SkinANIM();
|
||||
|
||||
eSkinType skinType;
|
||||
PckFile.PCKProperties generatedModel = new PckFile.PCKProperties();
|
||||
|
||||
enum eSkinType : int
|
||||
{
|
||||
@@ -49,7 +48,7 @@ namespace PckStudio
|
||||
switch (img.Height) // 64x64
|
||||
{
|
||||
case 64:
|
||||
anim.SetFlag(ANIM_EFFECTS.RESOLUTION_64x64, true);
|
||||
anim.SetFlag(SkinAnimFlag.RESOLUTION_64x64, true);
|
||||
MessageBox.Show("64x64 Skin Detected");
|
||||
skinPictureBoxTexture.Width = skinPictureBoxTexture.Height;
|
||||
if (skinType != eSkinType._64x64 && skinType != eSkinType._64x64HD)
|
||||
@@ -60,8 +59,8 @@ namespace PckStudio
|
||||
skinType = eSkinType._64x64;
|
||||
break;
|
||||
case 32:
|
||||
anim.SetFlag(ANIM_EFFECTS.RESOLUTION_64x64, false);
|
||||
anim.SetFlag(ANIM_EFFECTS.SLIM_MODEL, false);
|
||||
anim.SetFlag(SkinAnimFlag.RESOLUTION_64x64, false);
|
||||
anim.SetFlag(SkinAnimFlag.SLIM_MODEL, false);
|
||||
MessageBox.Show("64x32 Skin Detected");
|
||||
skinPictureBoxTexture.Width = skinPictureBoxTexture.Height * 2;
|
||||
if (skinType == eSkinType._64x64)
|
||||
@@ -78,7 +77,7 @@ namespace PckStudio
|
||||
default:
|
||||
if (img.Width == img.Height) // 64x64 HD
|
||||
{
|
||||
anim.SetFlag(ANIM_EFFECTS.RESOLUTION_64x64, true);
|
||||
anim.SetFlag(SkinAnimFlag.RESOLUTION_64x64, true);
|
||||
MessageBox.Show("64x64 HD Skin Detected");
|
||||
skinPictureBoxTexture.Width = skinPictureBoxTexture.Height;
|
||||
if (skinType != eSkinType._64x64 && skinType != eSkinType._64x64HD)
|
||||
@@ -90,8 +89,8 @@ namespace PckStudio
|
||||
}
|
||||
else if (img.Height == img.Width / 2) // 64x32 HD
|
||||
{
|
||||
anim.SetFlag(ANIM_EFFECTS.RESOLUTION_64x64, false);
|
||||
anim.SetFlag(ANIM_EFFECTS.SLIM_MODEL, false);
|
||||
anim.SetFlag(SkinAnimFlag.RESOLUTION_64x64, false);
|
||||
anim.SetFlag(SkinAnimFlag.SLIM_MODEL, false);
|
||||
MessageBox.Show("64x32 HD Skin Detected");
|
||||
skinPictureBoxTexture.Width = skinPictureBoxTexture.Height * 2;
|
||||
if (skinType == eSkinType._64x64)
|
||||
@@ -122,40 +121,40 @@ namespace PckStudio
|
||||
private void DrawModel()
|
||||
{
|
||||
Bitmap bmp = new Bitmap(displayBox.Width, displayBox.Height);
|
||||
bool isSlim = anim.GetFlag(ANIM_EFFECTS.SLIM_MODEL);
|
||||
bool isSlim = anim.GetFlag(SkinAnimFlag.SLIM_MODEL);
|
||||
using (Graphics g = Graphics.FromImage(bmp))
|
||||
{
|
||||
if(!anim.GetFlag(ANIM_EFFECTS.HEAD_DISABLED))
|
||||
if(!anim.GetFlag(SkinAnimFlag.HEAD_DISABLED))
|
||||
{
|
||||
//Head
|
||||
g.DrawRectangle(Pens.Black, 70, 15, 40, 40);
|
||||
g.FillRectangle(Brushes.Gray, 71, 16, 39, 39);
|
||||
}
|
||||
if (!anim.GetFlag(ANIM_EFFECTS.BODY_DISABLED))
|
||||
if (!anim.GetFlag(SkinAnimFlag.BODY_DISABLED))
|
||||
{
|
||||
//Body
|
||||
g.DrawRectangle(Pens.Black, 70, 55, 40, 60);
|
||||
g.FillRectangle(Brushes.Gray, 71, 56, 39, 59);
|
||||
}
|
||||
if (!anim.GetFlag(ANIM_EFFECTS.RIGHT_ARM_DISABLED))
|
||||
if (!anim.GetFlag(SkinAnimFlag.RIGHT_ARM_DISABLED))
|
||||
{
|
||||
//Arm0
|
||||
g.DrawRectangle(Pens.Black , isSlim ? 55 : 50, 55, isSlim ? 15 : 20, 60);
|
||||
g.FillRectangle(Brushes.Gray, isSlim ? 56 : 51, 56, isSlim ? 14 : 19, 59);
|
||||
}
|
||||
if (!anim.GetFlag(ANIM_EFFECTS.LEFT_ARM_DISABLED))
|
||||
if (!anim.GetFlag(SkinAnimFlag.LEFT_ARM_DISABLED))
|
||||
{
|
||||
//Arm1
|
||||
g.DrawRectangle(Pens.Black, 110, 55, isSlim ? 15 : 20, 60);
|
||||
g.FillRectangle(Brushes.Gray, 111, 56, isSlim ? 14 : 19, 59);
|
||||
}
|
||||
if (!anim.GetFlag(ANIM_EFFECTS.RIGHT_LEG_DISABLED))
|
||||
if (!anim.GetFlag(SkinAnimFlag.RIGHT_LEG_DISABLED))
|
||||
{
|
||||
//Leg0
|
||||
g.DrawRectangle(Pens.Black, 70, 115, 20, 60);
|
||||
g.FillRectangle(Brushes.Gray, 71, 116, 19, 59);
|
||||
}
|
||||
if (!anim.GetFlag(ANIM_EFFECTS.LEFT_LEG_DISABLED))
|
||||
if (!anim.GetFlag(SkinAnimFlag.LEFT_LEG_DISABLED))
|
||||
{
|
||||
//Leg1
|
||||
g.DrawRectangle(Pens.Black, 90, 115, 20, 60);
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace PckStudio
|
||||
namespace PckStudio.Popups
|
||||
{
|
||||
partial class AdvancedOptions
|
||||
{
|
||||
@@ -29,27 +29,27 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AdvancedOptions));
|
||||
this.treeMeta = new System.Windows.Forms.TreeView();
|
||||
this.comboBox1 = new MetroFramework.Controls.MetroComboBox();
|
||||
this.propertyTreeview = new System.Windows.Forms.TreeView();
|
||||
this.fileTypeComboBox = new MetroFramework.Controls.MetroComboBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.applyButton = new MetroFramework.Controls.MetroButton();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.entryDataTextBox = new MetroFramework.Controls.MetroTextBox();
|
||||
this.entryTypeTextBox = new MetroFramework.Controls.MetroTextBox();
|
||||
this.propertyKeyTextBox = new MetroFramework.Controls.MetroTextBox();
|
||||
this.propertyValueTextBox = new MetroFramework.Controls.MetroTextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// treeMeta
|
||||
//
|
||||
resources.ApplyResources(this.treeMeta, "treeMeta");
|
||||
this.treeMeta.Name = "treeMeta";
|
||||
this.treeMeta.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeMeta_AfterSelect);
|
||||
//
|
||||
// comboBox1
|
||||
//
|
||||
this.comboBox1.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.comboBox1, "comboBox1");
|
||||
this.comboBox1.Items.AddRange(new object[] {
|
||||
//
|
||||
// propertyTreeview
|
||||
//
|
||||
resources.ApplyResources(this.propertyTreeview, "propertyTreeview");
|
||||
this.propertyTreeview.Name = "propertyTreeview";
|
||||
this.propertyTreeview.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.propertyTreeview_AfterSelect);
|
||||
//
|
||||
// fileTypeComboBox
|
||||
//
|
||||
this.fileTypeComboBox.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.fileTypeComboBox, "fileTypeComboBox");
|
||||
this.fileTypeComboBox.Items.AddRange(new object[] {
|
||||
resources.GetString("comboBox1.Items"),
|
||||
resources.GetString("comboBox1.Items1"),
|
||||
resources.GetString("comboBox1.Items2"),
|
||||
@@ -64,10 +64,10 @@
|
||||
resources.GetString("comboBox1.Items11"),
|
||||
resources.GetString("comboBox1.Items12"),
|
||||
resources.GetString("comboBox1.Items13")});
|
||||
this.comboBox1.Name = "comboBox1";
|
||||
this.comboBox1.Style = MetroFramework.MetroColorStyle.Silver;
|
||||
this.comboBox1.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.comboBox1.UseSelectable = true;
|
||||
this.fileTypeComboBox.Name = "fileTypeComboBox";
|
||||
this.fileTypeComboBox.Style = MetroFramework.MetroColorStyle.Silver;
|
||||
this.fileTypeComboBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.fileTypeComboBox.UseSelectable = true;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
@@ -96,80 +96,74 @@
|
||||
resources.ApplyResources(this.label3, "label3");
|
||||
this.label3.ForeColor = System.Drawing.Color.White;
|
||||
this.label3.Name = "label3";
|
||||
//
|
||||
// entryDataTextBox
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.entryDataTextBox.CustomButton.Image = ((System.Drawing.Image)(resources.GetObject("resource.Image")));
|
||||
this.entryDataTextBox.CustomButton.Location = ((System.Drawing.Point)(resources.GetObject("resource.Location")));
|
||||
this.entryDataTextBox.CustomButton.Name = "";
|
||||
this.entryDataTextBox.CustomButton.Size = ((System.Drawing.Size)(resources.GetObject("resource.Size")));
|
||||
this.entryDataTextBox.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.entryDataTextBox.CustomButton.TabIndex = ((int)(resources.GetObject("resource.TabIndex")));
|
||||
this.entryDataTextBox.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.entryDataTextBox.CustomButton.UseSelectable = true;
|
||||
this.entryDataTextBox.CustomButton.Visible = ((bool)(resources.GetObject("resource.Visible")));
|
||||
this.entryDataTextBox.Lines = new string[0];
|
||||
resources.ApplyResources(this.entryDataTextBox, "entryDataTextBox");
|
||||
this.entryDataTextBox.MaxLength = 32767;
|
||||
this.entryDataTextBox.Name = "entryDataTextBox";
|
||||
this.entryDataTextBox.PasswordChar = '\0';
|
||||
this.entryDataTextBox.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.entryDataTextBox.SelectedText = "";
|
||||
this.entryDataTextBox.SelectionLength = 0;
|
||||
this.entryDataTextBox.SelectionStart = 0;
|
||||
this.entryDataTextBox.ShortcutsEnabled = true;
|
||||
this.entryDataTextBox.Style = MetroFramework.MetroColorStyle.Silver;
|
||||
this.entryDataTextBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.entryDataTextBox.UseSelectable = true;
|
||||
this.entryDataTextBox.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.entryDataTextBox.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// entryTypeTextBox
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.entryTypeTextBox.CustomButton.Image = ((System.Drawing.Image)(resources.GetObject("resource.Image1")));
|
||||
this.entryTypeTextBox.CustomButton.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("resource.ImeMode")));
|
||||
this.entryTypeTextBox.CustomButton.Location = ((System.Drawing.Point)(resources.GetObject("resource.Location1")));
|
||||
this.entryTypeTextBox.CustomButton.Name = "";
|
||||
this.entryTypeTextBox.CustomButton.Size = ((System.Drawing.Size)(resources.GetObject("resource.Size1")));
|
||||
this.entryTypeTextBox.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.entryTypeTextBox.CustomButton.TabIndex = ((int)(resources.GetObject("resource.TabIndex1")));
|
||||
this.entryTypeTextBox.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.entryTypeTextBox.CustomButton.UseSelectable = true;
|
||||
this.entryTypeTextBox.CustomButton.Visible = ((bool)(resources.GetObject("resource.Visible1")));
|
||||
this.entryTypeTextBox.Lines = new string[0];
|
||||
resources.ApplyResources(this.entryTypeTextBox, "entryTypeTextBox");
|
||||
this.entryTypeTextBox.MaxLength = 32767;
|
||||
this.entryTypeTextBox.Name = "entryTypeTextBox";
|
||||
this.entryTypeTextBox.PasswordChar = '\0';
|
||||
this.entryTypeTextBox.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.entryTypeTextBox.SelectedText = "";
|
||||
this.entryTypeTextBox.SelectionLength = 0;
|
||||
this.entryTypeTextBox.SelectionStart = 0;
|
||||
this.entryTypeTextBox.ShortcutsEnabled = true;
|
||||
this.entryTypeTextBox.Style = MetroFramework.MetroColorStyle.Silver;
|
||||
this.entryTypeTextBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.entryTypeTextBox.UseSelectable = true;
|
||||
this.entryTypeTextBox.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.entryTypeTextBox.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// propertyKeyTextBox
|
||||
//
|
||||
this.propertyKeyTextBox.CustomButton.Image = ((System.Drawing.Image)(resources.GetObject("resource.Image")));
|
||||
this.propertyKeyTextBox.CustomButton.Location = ((System.Drawing.Point)(resources.GetObject("resource.Location")));
|
||||
this.propertyKeyTextBox.CustomButton.Name = "";
|
||||
this.propertyKeyTextBox.CustomButton.Size = ((System.Drawing.Size)(resources.GetObject("resource.Size")));
|
||||
this.propertyKeyTextBox.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.propertyKeyTextBox.CustomButton.TabIndex = ((int)(resources.GetObject("resource.TabIndex")));
|
||||
this.propertyKeyTextBox.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.propertyKeyTextBox.CustomButton.UseSelectable = true;
|
||||
this.propertyKeyTextBox.CustomButton.Visible = ((bool)(resources.GetObject("resource.Visible")));
|
||||
this.propertyKeyTextBox.Lines = new string[0];
|
||||
resources.ApplyResources(this.propertyKeyTextBox, "propertyKeyTextBox");
|
||||
this.propertyKeyTextBox.MaxLength = 32767;
|
||||
this.propertyKeyTextBox.Name = "propertyKeyTextBox";
|
||||
this.propertyKeyTextBox.PasswordChar = '\0';
|
||||
this.propertyKeyTextBox.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.propertyKeyTextBox.SelectedText = "";
|
||||
this.propertyKeyTextBox.SelectionLength = 0;
|
||||
this.propertyKeyTextBox.SelectionStart = 0;
|
||||
this.propertyKeyTextBox.ShortcutsEnabled = true;
|
||||
this.propertyKeyTextBox.Style = MetroFramework.MetroColorStyle.Silver;
|
||||
this.propertyKeyTextBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.propertyKeyTextBox.UseSelectable = true;
|
||||
this.propertyKeyTextBox.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.propertyKeyTextBox.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// propertyValueTextBox
|
||||
//
|
||||
this.propertyValueTextBox.CustomButton.Image = ((System.Drawing.Image)(resources.GetObject("resource.Image1")));
|
||||
this.propertyValueTextBox.CustomButton.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("resource.ImeMode")));
|
||||
this.propertyValueTextBox.CustomButton.Location = ((System.Drawing.Point)(resources.GetObject("resource.Location1")));
|
||||
this.propertyValueTextBox.CustomButton.Name = "";
|
||||
this.propertyValueTextBox.CustomButton.Size = ((System.Drawing.Size)(resources.GetObject("resource.Size1")));
|
||||
this.propertyValueTextBox.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.propertyValueTextBox.CustomButton.TabIndex = ((int)(resources.GetObject("resource.TabIndex1")));
|
||||
this.propertyValueTextBox.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.propertyValueTextBox.CustomButton.UseSelectable = true;
|
||||
this.propertyValueTextBox.CustomButton.Visible = ((bool)(resources.GetObject("resource.Visible1")));
|
||||
this.propertyValueTextBox.Lines = new string[0];
|
||||
resources.ApplyResources(this.propertyValueTextBox, "propertyValueTextBox");
|
||||
this.propertyValueTextBox.MaxLength = 32767;
|
||||
this.propertyValueTextBox.Name = "propertyValueTextBox";
|
||||
this.propertyValueTextBox.PasswordChar = '\0';
|
||||
this.propertyValueTextBox.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.propertyValueTextBox.SelectedText = "";
|
||||
this.propertyValueTextBox.SelectionLength = 0;
|
||||
this.propertyValueTextBox.SelectionStart = 0;
|
||||
this.propertyValueTextBox.ShortcutsEnabled = true;
|
||||
this.propertyValueTextBox.Style = MetroFramework.MetroColorStyle.Silver;
|
||||
this.propertyValueTextBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.propertyValueTextBox.UseSelectable = true;
|
||||
this.propertyValueTextBox.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.propertyValueTextBox.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// AdvancedOptions
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.entryTypeTextBox);
|
||||
this.Controls.Add(this.propertyValueTextBox);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.entryDataTextBox);
|
||||
this.Controls.Add(this.propertyKeyTextBox);
|
||||
this.Controls.Add(this.applyButton);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.comboBox1);
|
||||
this.Controls.Add(this.treeMeta);
|
||||
this.Controls.Add(this.fileTypeComboBox);
|
||||
this.Controls.Add(this.propertyTreeview);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "AdvancedOptions";
|
||||
@@ -181,13 +175,13 @@
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TreeView treeMeta;
|
||||
private MetroFramework.Controls.MetroComboBox comboBox1;
|
||||
private System.Windows.Forms.TreeView propertyTreeview;
|
||||
private MetroFramework.Controls.MetroComboBox fileTypeComboBox;
|
||||
private MetroFramework.Controls.MetroButton applyButton;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private MetroFramework.Controls.MetroTextBox entryDataTextBox;
|
||||
private MetroFramework.Controls.MetroTextBox entryTypeTextBox;
|
||||
private MetroFramework.Controls.MetroTextBox propertyKeyTextBox;
|
||||
private MetroFramework.Controls.MetroTextBox propertyValueTextBox;
|
||||
}
|
||||
}
|
||||
@@ -1,132 +1,88 @@
|
||||
using OMI.Formats.Pck;
|
||||
using PckStudio.Classes.FileTypes;
|
||||
using OMI;
|
||||
using OMI.Formats.Pck;
|
||||
using PckStudio.ToolboxItems;
|
||||
using OMI.Workers.Pck;
|
||||
using PckStudio.Extensions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PckStudio
|
||||
namespace PckStudio.Popups
|
||||
{
|
||||
public partial class AdvancedOptions : ThemeForm
|
||||
{
|
||||
PckFile currentPCK;
|
||||
public bool littleEndian;
|
||||
public bool IsLittleEndian
|
||||
{
|
||||
set
|
||||
{
|
||||
_endianness = value ? Endianness.LittleEndian : Endianness.BigEndian;
|
||||
}
|
||||
}
|
||||
private PckFile _pckFile;
|
||||
private Endianness _endianness;
|
||||
|
||||
public AdvancedOptions(PckFile currentPCKIn)
|
||||
public AdvancedOptions(PckFile pckFile)
|
||||
{
|
||||
InitializeComponent();
|
||||
currentPCK = currentPCKIn;
|
||||
treeMeta.Nodes.Clear();
|
||||
treeMeta.Nodes.AddRange(currentPCK.GetPropertyList().Select((s) => new TreeNode(s)).ToArray());
|
||||
_pckFile = pckFile;
|
||||
propertyTreeview.Nodes.Clear();
|
||||
propertyTreeview.Nodes.AddRange(_pckFile.GetPropertyList().Select(s => new TreeNode(s)).ToArray());
|
||||
}
|
||||
|
||||
private void applyButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
switch (comboBox1.SelectedIndex)
|
||||
if (fileTypeComboBox.SelectedIndex >= 0 && fileTypeComboBox.SelectedIndex <= 13)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
applyBulkProperties();
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
break;
|
||||
case > 0 and <= 13:
|
||||
{
|
||||
applyBulkProperties((PckFile.FileData.FileType)(comboBox1.SelectedIndex - 1));
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
MessageBox.Show("Please select a filetype before applying");
|
||||
break;
|
||||
applyBulkProperties(_pckFile.GetFiles(), fileTypeComboBox.SelectedIndex - 1);
|
||||
DialogResult = DialogResult.OK;
|
||||
return;
|
||||
}
|
||||
MessageBox.Show("Please select a filetype before applying");
|
||||
}
|
||||
|
||||
private void applyBulkProperties()
|
||||
private void applyBulkProperties(IReadOnlyCollection<PckFileData> files, int index)
|
||||
{
|
||||
foreach (PckFile.FileData file in currentPCK.Files)
|
||||
foreach (PckFileData file in files)
|
||||
{
|
||||
if (file.Filetype == PckFile.FileData.FileType.TexturePackInfoFile ||
|
||||
file.Filetype == PckFile.FileData.FileType.SkinDataFile)
|
||||
if (file.Filetype == PckFileType.TexturePackInfoFile ||
|
||||
file.Filetype == PckFileType.SkinDataFile)
|
||||
{
|
||||
try
|
||||
{
|
||||
var reader = new PckFileReader(littleEndian
|
||||
? OMI.Endianness.LittleEndian
|
||||
: OMI.Endianness.BigEndian);
|
||||
PckFile SubPCK = reader.FromStream(new MemoryStream(file.Data));
|
||||
foreach (PckFile.FileData SubFile in SubPCK.Files)
|
||||
{
|
||||
SubFile.Properties.Add(entryTypeTextBox.Text, entryDataTextBox.Text);
|
||||
}
|
||||
var writer = new PckFileWriter(SubPCK, littleEndian
|
||||
? OMI.Endianness.LittleEndian
|
||||
: OMI.Endianness.BigEndian);
|
||||
var stream = new MemoryStream();
|
||||
writer.WriteToStream(stream);
|
||||
file.SetData(stream.ToArray());
|
||||
stream.Dispose();
|
||||
var reader = new PckFileReader(_endianness);
|
||||
using var ms = new MemoryStream(file.Data);
|
||||
PckFile subPCK = reader.FromStream(ms);
|
||||
applyBulkProperties(subPCK.GetFiles(), index);
|
||||
file.SetData(new PckFileWriter(subPCK, _endianness));
|
||||
}
|
||||
catch (OverflowException ex)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine(ex.Message);
|
||||
Debug.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
file.Properties.Add(entryTypeTextBox.Text, entryDataTextBox.Text);
|
||||
if (index == -1 || (Enum.IsDefined(typeof(PckFileType), index) && (int)file.Filetype == index))
|
||||
{
|
||||
file.Properties.Add(propertyKeyTextBox.Text, propertyValueTextBox.Text);
|
||||
}
|
||||
}
|
||||
|
||||
if (Enum.IsDefined(typeof(PckFileType), index))
|
||||
{
|
||||
MessageBox.Show($"Data added to {(PckFileType)index} entries");
|
||||
return;
|
||||
}
|
||||
MessageBox.Show("Data added to all entries");
|
||||
}
|
||||
|
||||
private void applyBulkProperties(PckFile.FileData.FileType filetype)
|
||||
{
|
||||
foreach (PckFile.FileData file in currentPCK.Files)
|
||||
{
|
||||
if (file.Filetype == PckFile.FileData.FileType.TexturePackInfoFile ||
|
||||
file.Filetype == PckFile.FileData.FileType.SkinDataFile)
|
||||
{
|
||||
try
|
||||
{
|
||||
var reader = new PckFileReader(littleEndian
|
||||
? OMI.Endianness.LittleEndian
|
||||
: OMI.Endianness.BigEndian);
|
||||
PckFile SubPCK = reader.FromStream(new MemoryStream(file.Data));
|
||||
foreach (PckFile.FileData SubFile in SubPCK.Files)
|
||||
{
|
||||
if (SubFile.Filetype == filetype)
|
||||
{
|
||||
SubFile.Properties.Add(entryTypeTextBox.Text, entryDataTextBox.Text);
|
||||
}
|
||||
}
|
||||
var writer = new PckFileWriter(SubPCK, littleEndian
|
||||
? OMI.Endianness.LittleEndian
|
||||
: OMI.Endianness.BigEndian);
|
||||
var stream = new MemoryStream();
|
||||
writer.WriteToStream(stream);
|
||||
file.SetData(stream.ToArray());
|
||||
stream.Dispose();
|
||||
}
|
||||
catch (OverflowException ex)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
if (file.Filetype == filetype)
|
||||
{
|
||||
file.Properties.Add(entryTypeTextBox.Text, entryDataTextBox.Text);
|
||||
}
|
||||
}
|
||||
MessageBox.Show($"Data Added to {filetype} File Entries");
|
||||
}
|
||||
|
||||
private void treeMeta_AfterSelect(object sender, TreeViewEventArgs e)
|
||||
private void propertyTreeview_AfterSelect(object sender, TreeViewEventArgs e)
|
||||
{
|
||||
entryTypeTextBox.Text = treeMeta.SelectedNode.Text;
|
||||
propertyKeyTextBox.Text = propertyTreeview.SelectedNode.Text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
namespace PckStudio
|
||||
namespace PckStudio.Forms
|
||||
{
|
||||
partial class GenerateModel
|
||||
{
|
||||
@@ -382,7 +382,7 @@
|
||||
this.checkGuide.Name = "checkGuide";
|
||||
this.checkGuide.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.checkGuide.UseSelectable = true;
|
||||
this.checkGuide.CheckedChanged += new System.EventHandler(this.render);
|
||||
this.checkGuide.CheckedChanged += new System.EventHandler(this.Render);
|
||||
//
|
||||
// checkBoxArmor
|
||||
//
|
||||
@@ -390,7 +390,7 @@
|
||||
this.checkBoxArmor.Name = "checkBoxArmor";
|
||||
this.checkBoxArmor.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.checkBoxArmor.UseSelectable = true;
|
||||
this.checkBoxArmor.CheckedChanged += new System.EventHandler(this.render);
|
||||
this.checkBoxArmor.CheckedChanged += new System.EventHandler(this.Render);
|
||||
//
|
||||
// SizeXUpDown
|
||||
//
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,87 +0,0 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
using PckStudio.Properties;
|
||||
using PckStudio.Extensions;
|
||||
using PckStudio.Forms.Editor;
|
||||
|
||||
namespace PckStudio.Forms.Utilities
|
||||
{
|
||||
public static class AnimationResources
|
||||
{
|
||||
private const string __blocks = "blocks";
|
||||
private const string __items = "items";
|
||||
|
||||
internal static string GetAnimationSection(Animation.AnimationCategory category)
|
||||
{
|
||||
return category switch
|
||||
{
|
||||
Animation.AnimationCategory.Items => __items,
|
||||
Animation.AnimationCategory.Blocks => __blocks,
|
||||
_ => throw new ArgumentOutOfRangeException(category.ToString())
|
||||
};
|
||||
}
|
||||
|
||||
private static JObject _jsonData = JObject.Parse(Resources.tileData);
|
||||
public static JObject JsonTileData => _jsonData ??= JObject.Parse(Resources.tileData);
|
||||
|
||||
private static Image[] _itemImages;
|
||||
public static Image[] ItemImages => _itemImages ??= Resources.items_sheet.CreateImageList(16).ToArray();
|
||||
|
||||
private static Image[] _blockImages;
|
||||
public static Image[] BlockImages => _blockImages ??= Resources.terrain_sheet.CreateImageList(16).ToArray();
|
||||
|
||||
private static ImageList _itemList;
|
||||
public static ImageList ItemList
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_itemList is null)
|
||||
{
|
||||
_itemList = new ImageList();
|
||||
_itemList.ColorDepth = ColorDepth.Depth32Bit;
|
||||
_itemList.Images.AddRange(ItemImages);
|
||||
}
|
||||
return _itemList;
|
||||
}
|
||||
}
|
||||
|
||||
private static ImageList _blockList;
|
||||
public static ImageList BlockList
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_blockList is null)
|
||||
{
|
||||
_blockList = new ImageList();
|
||||
_blockList.ColorDepth = ColorDepth.Depth32Bit;
|
||||
_blockList.Images.AddRange(BlockImages);
|
||||
}
|
||||
return _blockList;
|
||||
}
|
||||
}
|
||||
|
||||
internal static JObject ConvertAnimationToJson(Animation animation, bool interpolation)
|
||||
{
|
||||
JObject janimation = new JObject();
|
||||
JObject mcmeta = new JObject();
|
||||
mcmeta["comment"] = $"Animation converted by {Application.ProductName}";
|
||||
mcmeta["animation"] = janimation;
|
||||
JArray jframes = new JArray();
|
||||
foreach (var frame in animation.GetFrames())
|
||||
{
|
||||
JObject jframe = new JObject();
|
||||
jframe["index"] = animation.GetTextureIndex(frame.Texture);
|
||||
jframe["time"] = frame.Ticks;
|
||||
jframes.Add(jframe);
|
||||
};
|
||||
janimation["interpolation"] = interpolation;
|
||||
janimation["frames"] = jframes;
|
||||
return mcmeta;
|
||||
}
|
||||
}
|
||||
}
|
||||
195
PCK-Studio/Forms/Utilities/AppSettingsForm.Designer.cs
generated
195
PCK-Studio/Forms/Utilities/AppSettingsForm.Designer.cs
generated
@@ -1,195 +0,0 @@
|
||||
namespace PckStudio.Forms.Utilities
|
||||
{
|
||||
partial class AppSettingsForm
|
||||
{
|
||||
/// <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(AppSettingsForm));
|
||||
this.SettingToolTip = new MetroFramework.Components.MetroToolTip();
|
||||
this.autoSaveCheckBox = new CBH.Controls.CrEaTiiOn_CustomCheckBox();
|
||||
this.endianCheckBox = new CBH.Controls.CrEaTiiOn_CustomCheckBox();
|
||||
this.autoUpdateCheckBox = new CBH.Controls.CrEaTiiOn_CustomCheckBox();
|
||||
this.autoLoadPckCheckBox = new CBH.Controls.CrEaTiiOn_CustomCheckBox();
|
||||
this.showPresenceCheckBox = new CBH.Controls.CrEaTiiOn_CustomCheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// SettingToolTip
|
||||
//
|
||||
this.SettingToolTip.Style = MetroFramework.MetroColorStyle.White;
|
||||
this.SettingToolTip.StyleManager = null;
|
||||
this.SettingToolTip.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// autoSaveCheckBox
|
||||
//
|
||||
this.autoSaveCheckBox.BadgeColor = System.Drawing.Color.FromArgb(((int)(((byte)(10)))), ((int)(((byte)(10)))), ((int)(((byte)(10)))));
|
||||
this.autoSaveCheckBox.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.autoSaveCheckBox.CheckboxCheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(44)))), ((int)(((byte)(166)))));
|
||||
this.autoSaveCheckBox.CheckboxColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(15)))), ((int)(((byte)(15)))));
|
||||
this.autoSaveCheckBox.CheckboxHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(34)))), ((int)(((byte)(156)))));
|
||||
this.autoSaveCheckBox.CheckboxStyle = CBH.Controls.CrEaTiiOn_CustomCheckBox.Style.Material;
|
||||
this.autoSaveCheckBox.Checked = false;
|
||||
this.autoSaveCheckBox.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.autoSaveCheckBox.ForeColor = System.Drawing.Color.White;
|
||||
this.autoSaveCheckBox.Location = new System.Drawing.Point(12, 16);
|
||||
this.autoSaveCheckBox.Name = "autoSaveCheckBox";
|
||||
this.autoSaveCheckBox.PixelOffsetType = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality;
|
||||
this.autoSaveCheckBox.Size = new System.Drawing.Size(76, 15);
|
||||
this.autoSaveCheckBox.SmoothingType = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
|
||||
this.autoSaveCheckBox.TabIndex = 0;
|
||||
this.autoSaveCheckBox.Text = "Auto Save";
|
||||
this.autoSaveCheckBox.TextRenderingType = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
|
||||
this.autoSaveCheckBox.TickThickness = 2;
|
||||
this.SettingToolTip.SetToolTip(this.autoSaveCheckBox, "Whether to automatically save changes inside of file editor such as the loc edito" +
|
||||
"r");
|
||||
this.autoSaveCheckBox.CheckedStateChanged += new System.EventHandler(this.autoSaveCheckBox_CheckedChanged);
|
||||
//
|
||||
// endianCheckBox
|
||||
//
|
||||
this.endianCheckBox.BadgeColor = System.Drawing.Color.FromArgb(((int)(((byte)(10)))), ((int)(((byte)(10)))), ((int)(((byte)(10)))));
|
||||
this.endianCheckBox.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.endianCheckBox.CheckboxCheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(44)))), ((int)(((byte)(166)))));
|
||||
this.endianCheckBox.CheckboxColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(15)))), ((int)(((byte)(15)))));
|
||||
this.endianCheckBox.CheckboxHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(34)))), ((int)(((byte)(156)))));
|
||||
this.endianCheckBox.CheckboxStyle = CBH.Controls.CrEaTiiOn_CustomCheckBox.Style.Material;
|
||||
this.endianCheckBox.Checked = false;
|
||||
this.endianCheckBox.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.endianCheckBox.ForeColor = System.Drawing.Color.White;
|
||||
this.endianCheckBox.Location = new System.Drawing.Point(12, 37);
|
||||
this.endianCheckBox.Name = "endianCheckBox";
|
||||
this.endianCheckBox.PixelOffsetType = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality;
|
||||
this.endianCheckBox.Size = new System.Drawing.Size(75, 15);
|
||||
this.endianCheckBox.SmoothingType = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
|
||||
this.endianCheckBox.TabIndex = 1;
|
||||
this.endianCheckBox.Text = "Open Vita";
|
||||
this.endianCheckBox.TextRenderingType = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
|
||||
this.endianCheckBox.TickThickness = 2;
|
||||
this.SettingToolTip.SetToolTip(this.endianCheckBox, "Whether to automatically set the \'Open as Switch/Vita pck\' checkbox");
|
||||
this.endianCheckBox.CheckedStateChanged += new System.EventHandler(this.endianCheckBox_CheckedChanged);
|
||||
//
|
||||
// autoUpdateCheckBox
|
||||
//
|
||||
this.autoUpdateCheckBox.BadgeColor = System.Drawing.Color.FromArgb(((int)(((byte)(10)))), ((int)(((byte)(10)))), ((int)(((byte)(10)))));
|
||||
this.autoUpdateCheckBox.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.autoUpdateCheckBox.CheckboxCheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(44)))), ((int)(((byte)(166)))));
|
||||
this.autoUpdateCheckBox.CheckboxColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(15)))), ((int)(((byte)(15)))));
|
||||
this.autoUpdateCheckBox.CheckboxHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(34)))), ((int)(((byte)(156)))));
|
||||
this.autoUpdateCheckBox.CheckboxStyle = CBH.Controls.CrEaTiiOn_CustomCheckBox.Style.Material;
|
||||
this.autoUpdateCheckBox.Checked = false;
|
||||
this.autoUpdateCheckBox.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.autoUpdateCheckBox.Enabled = false;
|
||||
this.autoUpdateCheckBox.ForeColor = System.Drawing.Color.White;
|
||||
this.autoUpdateCheckBox.Location = new System.Drawing.Point(12, 58);
|
||||
this.autoUpdateCheckBox.Name = "autoUpdateCheckBox";
|
||||
this.autoUpdateCheckBox.PixelOffsetType = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality;
|
||||
this.autoUpdateCheckBox.Size = new System.Drawing.Size(90, 15);
|
||||
this.autoUpdateCheckBox.SmoothingType = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
|
||||
this.autoUpdateCheckBox.TabIndex = 2;
|
||||
this.autoUpdateCheckBox.Text = "Auto Update";
|
||||
this.autoUpdateCheckBox.TextRenderingType = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
|
||||
this.autoUpdateCheckBox.TickThickness = 2;
|
||||
this.SettingToolTip.SetToolTip(this.autoUpdateCheckBox, "Whether to automatically check for updates");
|
||||
//
|
||||
// autoLoadPckCheckBox
|
||||
//
|
||||
this.autoLoadPckCheckBox.BadgeColor = System.Drawing.Color.FromArgb(((int)(((byte)(10)))), ((int)(((byte)(10)))), ((int)(((byte)(10)))));
|
||||
this.autoLoadPckCheckBox.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.autoLoadPckCheckBox.CheckboxCheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(44)))), ((int)(((byte)(166)))));
|
||||
this.autoLoadPckCheckBox.CheckboxColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(15)))), ((int)(((byte)(15)))));
|
||||
this.autoLoadPckCheckBox.CheckboxHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(34)))), ((int)(((byte)(156)))));
|
||||
this.autoLoadPckCheckBox.CheckboxStyle = CBH.Controls.CrEaTiiOn_CustomCheckBox.Style.Material;
|
||||
this.autoLoadPckCheckBox.Checked = false;
|
||||
this.autoLoadPckCheckBox.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.autoLoadPckCheckBox.ForeColor = System.Drawing.Color.White;
|
||||
this.autoLoadPckCheckBox.Location = new System.Drawing.Point(12, 79);
|
||||
this.autoLoadPckCheckBox.Name = "autoLoadPckCheckBox";
|
||||
this.autoLoadPckCheckBox.PixelOffsetType = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality;
|
||||
this.autoLoadPckCheckBox.Size = new System.Drawing.Size(331, 15);
|
||||
this.autoLoadPckCheckBox.SmoothingType = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
|
||||
this.autoLoadPckCheckBox.TabIndex = 3;
|
||||
this.autoLoadPckCheckBox.Text = "Auto load additional pck files (also known as SubPCK files)";
|
||||
this.autoLoadPckCheckBox.TextRenderingType = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
|
||||
this.autoLoadPckCheckBox.TickThickness = 2;
|
||||
this.SettingToolTip.SetToolTip(this.autoLoadPckCheckBox, "Whether to automatically load files inside that end in .pck");
|
||||
this.autoLoadPckCheckBox.CheckedStateChanged += new System.EventHandler(this.autoLoadPckCheckBox_CheckedChanged);
|
||||
//
|
||||
// showPresenceCheckBox
|
||||
//
|
||||
this.showPresenceCheckBox.BadgeColor = System.Drawing.Color.FromArgb(((int)(((byte)(10)))), ((int)(((byte)(10)))), ((int)(((byte)(10)))));
|
||||
this.showPresenceCheckBox.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.showPresenceCheckBox.CheckboxCheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(44)))), ((int)(((byte)(166)))));
|
||||
this.showPresenceCheckBox.CheckboxColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(15)))), ((int)(((byte)(15)))));
|
||||
this.showPresenceCheckBox.CheckboxHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(34)))), ((int)(((byte)(156)))));
|
||||
this.showPresenceCheckBox.CheckboxStyle = CBH.Controls.CrEaTiiOn_CustomCheckBox.Style.Material;
|
||||
this.showPresenceCheckBox.Checked = false;
|
||||
this.showPresenceCheckBox.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.showPresenceCheckBox.ForeColor = System.Drawing.Color.White;
|
||||
this.showPresenceCheckBox.Location = new System.Drawing.Point(12, 100);
|
||||
this.showPresenceCheckBox.Name = "showPresenceCheckBox";
|
||||
this.showPresenceCheckBox.PixelOffsetType = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality;
|
||||
this.showPresenceCheckBox.Size = new System.Drawing.Size(171, 15);
|
||||
this.showPresenceCheckBox.SmoothingType = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
|
||||
this.showPresenceCheckBox.TabIndex = 4;
|
||||
this.showPresenceCheckBox.Text = "Show Discord Rich Presence";
|
||||
this.showPresenceCheckBox.TextRenderingType = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
|
||||
this.showPresenceCheckBox.TickThickness = 2;
|
||||
this.SettingToolTip.SetToolTip(this.showPresenceCheckBox, "Whether to show a rich presence on discord");
|
||||
this.showPresenceCheckBox.CheckedStateChanged += new System.EventHandler(this.showPresenceCheckBox_CheckedChanged);
|
||||
//
|
||||
// AppSettingsForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
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.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Location = new System.Drawing.Point(0, 0);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "AppSettingsForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Application Settings";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.AppBehaviorSettingsForm_FormClosing);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private MetroFramework.Components.MetroToolTip SettingToolTip;
|
||||
private CBH.Controls.CrEaTiiOn_CustomCheckBox autoSaveCheckBox;
|
||||
private CBH.Controls.CrEaTiiOn_CustomCheckBox endianCheckBox;
|
||||
private CBH.Controls.CrEaTiiOn_CustomCheckBox autoUpdateCheckBox;
|
||||
private CBH.Controls.CrEaTiiOn_CustomCheckBox autoLoadPckCheckBox;
|
||||
private CBH.Controls.CrEaTiiOn_CustomCheckBox showPresenceCheckBox;
|
||||
}
|
||||
}
|
||||
516
PCK-Studio/Forms/Utilities/PCK Manager.Designer.cs
generated
516
PCK-Studio/Forms/Utilities/PCK Manager.Designer.cs
generated
@@ -1,516 +0,0 @@
|
||||
namespace PckStudio.Forms
|
||||
{
|
||||
partial class PCK_Manager
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PCK_Manager));
|
||||
this.metroButton1 = new MetroFramework.Controls.MetroButton();
|
||||
this.metroTextBox1 = new MetroFramework.Controls.MetroTextBox();
|
||||
this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroButton2 = new MetroFramework.Controls.MetroButton();
|
||||
this.metroPanel1 = new MetroFramework.Controls.MetroPanel();
|
||||
this.metroLabel7 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroTextBox7 = new MetroFramework.Controls.MetroTextBox();
|
||||
this.metroLabel6 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroTextBox6 = new MetroFramework.Controls.MetroTextBox();
|
||||
this.metroButton5 = new MetroFramework.Controls.MetroButton();
|
||||
this.metroLabel5 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroLabel4 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroLabel3 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroLabel2 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroButton4 = new MetroFramework.Controls.MetroButton();
|
||||
this.metroButton3 = new MetroFramework.Controls.MetroButton();
|
||||
this.metroTextBox5 = new MetroFramework.Controls.MetroTextBox();
|
||||
this.metroTextBox4 = new MetroFramework.Controls.MetroTextBox();
|
||||
this.metroTextBox3 = new MetroFramework.Controls.MetroTextBox();
|
||||
this.metroTextBox2 = new MetroFramework.Controls.MetroTextBox();
|
||||
this.dataGridView1 = new System.Windows.Forms.DataGridView();
|
||||
this.FileName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.DownloadUrl = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.Author = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.Desc = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.removeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.metroComboBox1 = new MetroFramework.Controls.MetroComboBox();
|
||||
this.metroButton6 = new MetroFramework.Controls.MetroButton();
|
||||
this.metroPanel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
|
||||
this.contextMenuStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// metroButton1
|
||||
//
|
||||
resources.ApplyResources(this.metroButton1, "metroButton1");
|
||||
this.metroButton1.Name = "metroButton1";
|
||||
this.metroButton1.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroButton1.UseSelectable = true;
|
||||
this.metroButton1.Click += new System.EventHandler(this.metroButton1_Click);
|
||||
//
|
||||
// metroTextBox1
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.metroTextBox1.CustomButton.Image = ((System.Drawing.Image)(resources.GetObject("resource.Image")));
|
||||
this.metroTextBox1.CustomButton.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("resource.ImeMode")));
|
||||
this.metroTextBox1.CustomButton.Location = ((System.Drawing.Point)(resources.GetObject("resource.Location")));
|
||||
this.metroTextBox1.CustomButton.Name = "";
|
||||
this.metroTextBox1.CustomButton.Size = ((System.Drawing.Size)(resources.GetObject("resource.Size")));
|
||||
this.metroTextBox1.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.metroTextBox1.CustomButton.TabIndex = ((int)(resources.GetObject("resource.TabIndex")));
|
||||
this.metroTextBox1.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.metroTextBox1.CustomButton.UseSelectable = true;
|
||||
this.metroTextBox1.CustomButton.Visible = ((bool)(resources.GetObject("resource.Visible")));
|
||||
this.metroTextBox1.Lines = new string[0];
|
||||
resources.ApplyResources(this.metroTextBox1, "metroTextBox1");
|
||||
this.metroTextBox1.MaxLength = 32767;
|
||||
this.metroTextBox1.Name = "metroTextBox1";
|
||||
this.metroTextBox1.PasswordChar = '\0';
|
||||
this.metroTextBox1.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.metroTextBox1.SelectedText = "";
|
||||
this.metroTextBox1.SelectionLength = 0;
|
||||
this.metroTextBox1.SelectionStart = 0;
|
||||
this.metroTextBox1.ShortcutsEnabled = true;
|
||||
this.metroTextBox1.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroTextBox1.UseSelectable = true;
|
||||
this.metroTextBox1.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.metroTextBox1.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// metroLabel1
|
||||
//
|
||||
resources.ApplyResources(this.metroLabel1, "metroLabel1");
|
||||
this.metroLabel1.Name = "metroLabel1";
|
||||
this.metroLabel1.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// metroButton2
|
||||
//
|
||||
resources.ApplyResources(this.metroButton2, "metroButton2");
|
||||
this.metroButton2.Name = "metroButton2";
|
||||
this.metroButton2.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroButton2.UseSelectable = true;
|
||||
this.metroButton2.Click += new System.EventHandler(this.metroButton2_Click);
|
||||
//
|
||||
// metroPanel1
|
||||
//
|
||||
this.metroPanel1.Controls.Add(this.metroLabel7);
|
||||
this.metroPanel1.Controls.Add(this.metroTextBox7);
|
||||
this.metroPanel1.Controls.Add(this.metroLabel6);
|
||||
this.metroPanel1.Controls.Add(this.metroTextBox6);
|
||||
this.metroPanel1.Controls.Add(this.metroButton5);
|
||||
this.metroPanel1.Controls.Add(this.metroLabel5);
|
||||
this.metroPanel1.Controls.Add(this.metroLabel4);
|
||||
this.metroPanel1.Controls.Add(this.metroLabel3);
|
||||
this.metroPanel1.Controls.Add(this.metroLabel2);
|
||||
this.metroPanel1.Controls.Add(this.metroButton4);
|
||||
this.metroPanel1.Controls.Add(this.metroButton3);
|
||||
this.metroPanel1.Controls.Add(this.metroTextBox5);
|
||||
this.metroPanel1.Controls.Add(this.metroTextBox4);
|
||||
this.metroPanel1.Controls.Add(this.metroTextBox3);
|
||||
this.metroPanel1.Controls.Add(this.metroTextBox2);
|
||||
this.metroPanel1.Controls.Add(this.dataGridView1);
|
||||
resources.ApplyResources(this.metroPanel1, "metroPanel1");
|
||||
this.metroPanel1.HorizontalScrollbarBarColor = true;
|
||||
this.metroPanel1.HorizontalScrollbarHighlightOnWheel = false;
|
||||
this.metroPanel1.HorizontalScrollbarSize = 10;
|
||||
this.metroPanel1.Name = "metroPanel1";
|
||||
this.metroPanel1.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroPanel1.VerticalScrollbarBarColor = true;
|
||||
this.metroPanel1.VerticalScrollbarHighlightOnWheel = false;
|
||||
this.metroPanel1.VerticalScrollbarSize = 10;
|
||||
//
|
||||
// metroLabel7
|
||||
//
|
||||
resources.ApplyResources(this.metroLabel7, "metroLabel7");
|
||||
this.metroLabel7.Name = "metroLabel7";
|
||||
this.metroLabel7.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// metroTextBox7
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.metroTextBox7.CustomButton.Image = ((System.Drawing.Image)(resources.GetObject("resource.Image1")));
|
||||
this.metroTextBox7.CustomButton.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("resource.ImeMode1")));
|
||||
this.metroTextBox7.CustomButton.Location = ((System.Drawing.Point)(resources.GetObject("resource.Location1")));
|
||||
this.metroTextBox7.CustomButton.Name = "";
|
||||
this.metroTextBox7.CustomButton.Size = ((System.Drawing.Size)(resources.GetObject("resource.Size1")));
|
||||
this.metroTextBox7.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.metroTextBox7.CustomButton.TabIndex = ((int)(resources.GetObject("resource.TabIndex1")));
|
||||
this.metroTextBox7.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.metroTextBox7.CustomButton.UseSelectable = true;
|
||||
this.metroTextBox7.CustomButton.Visible = ((bool)(resources.GetObject("resource.Visible1")));
|
||||
this.metroTextBox7.Lines = new string[0];
|
||||
resources.ApplyResources(this.metroTextBox7, "metroTextBox7");
|
||||
this.metroTextBox7.MaxLength = 32767;
|
||||
this.metroTextBox7.Multiline = true;
|
||||
this.metroTextBox7.Name = "metroTextBox7";
|
||||
this.metroTextBox7.PasswordChar = '\0';
|
||||
this.metroTextBox7.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.metroTextBox7.SelectedText = "";
|
||||
this.metroTextBox7.SelectionLength = 0;
|
||||
this.metroTextBox7.SelectionStart = 0;
|
||||
this.metroTextBox7.ShortcutsEnabled = true;
|
||||
this.metroTextBox7.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroTextBox7.UseSelectable = true;
|
||||
this.metroTextBox7.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.metroTextBox7.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// metroLabel6
|
||||
//
|
||||
resources.ApplyResources(this.metroLabel6, "metroLabel6");
|
||||
this.metroLabel6.Name = "metroLabel6";
|
||||
this.metroLabel6.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// metroTextBox6
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.metroTextBox6.CustomButton.Image = ((System.Drawing.Image)(resources.GetObject("resource.Image2")));
|
||||
this.metroTextBox6.CustomButton.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("resource.ImeMode2")));
|
||||
this.metroTextBox6.CustomButton.Location = ((System.Drawing.Point)(resources.GetObject("resource.Location2")));
|
||||
this.metroTextBox6.CustomButton.Name = "";
|
||||
this.metroTextBox6.CustomButton.Size = ((System.Drawing.Size)(resources.GetObject("resource.Size2")));
|
||||
this.metroTextBox6.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.metroTextBox6.CustomButton.TabIndex = ((int)(resources.GetObject("resource.TabIndex2")));
|
||||
this.metroTextBox6.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.metroTextBox6.CustomButton.UseSelectable = true;
|
||||
this.metroTextBox6.CustomButton.Visible = ((bool)(resources.GetObject("resource.Visible2")));
|
||||
this.metroTextBox6.Lines = new string[0];
|
||||
resources.ApplyResources(this.metroTextBox6, "metroTextBox6");
|
||||
this.metroTextBox6.MaxLength = 32767;
|
||||
this.metroTextBox6.Name = "metroTextBox6";
|
||||
this.metroTextBox6.PasswordChar = '\0';
|
||||
this.metroTextBox6.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.metroTextBox6.SelectedText = "";
|
||||
this.metroTextBox6.SelectionLength = 0;
|
||||
this.metroTextBox6.SelectionStart = 0;
|
||||
this.metroTextBox6.ShortcutsEnabled = true;
|
||||
this.metroTextBox6.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroTextBox6.UseSelectable = true;
|
||||
this.metroTextBox6.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.metroTextBox6.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// metroButton5
|
||||
//
|
||||
resources.ApplyResources(this.metroButton5, "metroButton5");
|
||||
this.metroButton5.Name = "metroButton5";
|
||||
this.metroButton5.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroButton5.UseSelectable = true;
|
||||
this.metroButton5.Click += new System.EventHandler(this.metroButton5_Click);
|
||||
//
|
||||
// metroLabel5
|
||||
//
|
||||
resources.ApplyResources(this.metroLabel5, "metroLabel5");
|
||||
this.metroLabel5.Name = "metroLabel5";
|
||||
this.metroLabel5.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// metroLabel4
|
||||
//
|
||||
resources.ApplyResources(this.metroLabel4, "metroLabel4");
|
||||
this.metroLabel4.Name = "metroLabel4";
|
||||
this.metroLabel4.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// metroLabel3
|
||||
//
|
||||
resources.ApplyResources(this.metroLabel3, "metroLabel3");
|
||||
this.metroLabel3.Name = "metroLabel3";
|
||||
this.metroLabel3.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// metroLabel2
|
||||
//
|
||||
resources.ApplyResources(this.metroLabel2, "metroLabel2");
|
||||
this.metroLabel2.Name = "metroLabel2";
|
||||
this.metroLabel2.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// metroButton4
|
||||
//
|
||||
resources.ApplyResources(this.metroButton4, "metroButton4");
|
||||
this.metroButton4.Name = "metroButton4";
|
||||
this.metroButton4.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroButton4.UseSelectable = true;
|
||||
this.metroButton4.Click += new System.EventHandler(this.metroButton4_Click);
|
||||
//
|
||||
// metroButton3
|
||||
//
|
||||
resources.ApplyResources(this.metroButton3, "metroButton3");
|
||||
this.metroButton3.Name = "metroButton3";
|
||||
this.metroButton3.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroButton3.UseSelectable = true;
|
||||
this.metroButton3.Click += new System.EventHandler(this.metroButton3_Click);
|
||||
//
|
||||
// metroTextBox5
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.metroTextBox5.CustomButton.Image = ((System.Drawing.Image)(resources.GetObject("resource.Image3")));
|
||||
this.metroTextBox5.CustomButton.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("resource.ImeMode3")));
|
||||
this.metroTextBox5.CustomButton.Location = ((System.Drawing.Point)(resources.GetObject("resource.Location3")));
|
||||
this.metroTextBox5.CustomButton.Name = "";
|
||||
this.metroTextBox5.CustomButton.Size = ((System.Drawing.Size)(resources.GetObject("resource.Size3")));
|
||||
this.metroTextBox5.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.metroTextBox5.CustomButton.TabIndex = ((int)(resources.GetObject("resource.TabIndex3")));
|
||||
this.metroTextBox5.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.metroTextBox5.CustomButton.UseSelectable = true;
|
||||
this.metroTextBox5.CustomButton.Visible = ((bool)(resources.GetObject("resource.Visible3")));
|
||||
this.metroTextBox5.Lines = new string[0];
|
||||
resources.ApplyResources(this.metroTextBox5, "metroTextBox5");
|
||||
this.metroTextBox5.MaxLength = 32767;
|
||||
this.metroTextBox5.Name = "metroTextBox5";
|
||||
this.metroTextBox5.PasswordChar = '\0';
|
||||
this.metroTextBox5.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.metroTextBox5.SelectedText = "";
|
||||
this.metroTextBox5.SelectionLength = 0;
|
||||
this.metroTextBox5.SelectionStart = 0;
|
||||
this.metroTextBox5.ShortcutsEnabled = true;
|
||||
this.metroTextBox5.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroTextBox5.UseSelectable = true;
|
||||
this.metroTextBox5.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.metroTextBox5.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// metroTextBox4
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.metroTextBox4.CustomButton.Image = ((System.Drawing.Image)(resources.GetObject("resource.Image4")));
|
||||
this.metroTextBox4.CustomButton.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("resource.ImeMode4")));
|
||||
this.metroTextBox4.CustomButton.Location = ((System.Drawing.Point)(resources.GetObject("resource.Location4")));
|
||||
this.metroTextBox4.CustomButton.Name = "";
|
||||
this.metroTextBox4.CustomButton.Size = ((System.Drawing.Size)(resources.GetObject("resource.Size4")));
|
||||
this.metroTextBox4.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.metroTextBox4.CustomButton.TabIndex = ((int)(resources.GetObject("resource.TabIndex4")));
|
||||
this.metroTextBox4.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.metroTextBox4.CustomButton.UseSelectable = true;
|
||||
this.metroTextBox4.CustomButton.Visible = ((bool)(resources.GetObject("resource.Visible4")));
|
||||
this.metroTextBox4.Lines = new string[0];
|
||||
resources.ApplyResources(this.metroTextBox4, "metroTextBox4");
|
||||
this.metroTextBox4.MaxLength = 32767;
|
||||
this.metroTextBox4.Name = "metroTextBox4";
|
||||
this.metroTextBox4.PasswordChar = '\0';
|
||||
this.metroTextBox4.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.metroTextBox4.SelectedText = "";
|
||||
this.metroTextBox4.SelectionLength = 0;
|
||||
this.metroTextBox4.SelectionStart = 0;
|
||||
this.metroTextBox4.ShortcutsEnabled = true;
|
||||
this.metroTextBox4.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroTextBox4.UseSelectable = true;
|
||||
this.metroTextBox4.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.metroTextBox4.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// metroTextBox3
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.metroTextBox3.CustomButton.Image = ((System.Drawing.Image)(resources.GetObject("resource.Image5")));
|
||||
this.metroTextBox3.CustomButton.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("resource.ImeMode5")));
|
||||
this.metroTextBox3.CustomButton.Location = ((System.Drawing.Point)(resources.GetObject("resource.Location5")));
|
||||
this.metroTextBox3.CustomButton.Name = "";
|
||||
this.metroTextBox3.CustomButton.Size = ((System.Drawing.Size)(resources.GetObject("resource.Size5")));
|
||||
this.metroTextBox3.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.metroTextBox3.CustomButton.TabIndex = ((int)(resources.GetObject("resource.TabIndex5")));
|
||||
this.metroTextBox3.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.metroTextBox3.CustomButton.UseSelectable = true;
|
||||
this.metroTextBox3.CustomButton.Visible = ((bool)(resources.GetObject("resource.Visible5")));
|
||||
this.metroTextBox3.Lines = new string[0];
|
||||
resources.ApplyResources(this.metroTextBox3, "metroTextBox3");
|
||||
this.metroTextBox3.MaxLength = 32767;
|
||||
this.metroTextBox3.Name = "metroTextBox3";
|
||||
this.metroTextBox3.PasswordChar = '\0';
|
||||
this.metroTextBox3.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.metroTextBox3.SelectedText = "";
|
||||
this.metroTextBox3.SelectionLength = 0;
|
||||
this.metroTextBox3.SelectionStart = 0;
|
||||
this.metroTextBox3.ShortcutsEnabled = true;
|
||||
this.metroTextBox3.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroTextBox3.UseSelectable = true;
|
||||
this.metroTextBox3.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.metroTextBox3.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// metroTextBox2
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.metroTextBox2.CustomButton.Image = ((System.Drawing.Image)(resources.GetObject("resource.Image6")));
|
||||
this.metroTextBox2.CustomButton.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("resource.ImeMode6")));
|
||||
this.metroTextBox2.CustomButton.Location = ((System.Drawing.Point)(resources.GetObject("resource.Location6")));
|
||||
this.metroTextBox2.CustomButton.Name = "";
|
||||
this.metroTextBox2.CustomButton.Size = ((System.Drawing.Size)(resources.GetObject("resource.Size6")));
|
||||
this.metroTextBox2.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.metroTextBox2.CustomButton.TabIndex = ((int)(resources.GetObject("resource.TabIndex6")));
|
||||
this.metroTextBox2.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.metroTextBox2.CustomButton.UseSelectable = true;
|
||||
this.metroTextBox2.CustomButton.Visible = ((bool)(resources.GetObject("resource.Visible6")));
|
||||
this.metroTextBox2.Lines = new string[0];
|
||||
resources.ApplyResources(this.metroTextBox2, "metroTextBox2");
|
||||
this.metroTextBox2.MaxLength = 32767;
|
||||
this.metroTextBox2.Name = "metroTextBox2";
|
||||
this.metroTextBox2.PasswordChar = '\0';
|
||||
this.metroTextBox2.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.metroTextBox2.SelectedText = "";
|
||||
this.metroTextBox2.SelectionLength = 0;
|
||||
this.metroTextBox2.SelectionStart = 0;
|
||||
this.metroTextBox2.ShortcutsEnabled = true;
|
||||
this.metroTextBox2.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroTextBox2.UseSelectable = true;
|
||||
this.metroTextBox2.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.metroTextBox2.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// dataGridView1
|
||||
//
|
||||
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.FileName,
|
||||
this.DownloadUrl,
|
||||
this.Author,
|
||||
this.Desc});
|
||||
this.dataGridView1.ContextMenuStrip = this.contextMenuStrip1;
|
||||
resources.ApplyResources(this.dataGridView1, "dataGridView1");
|
||||
this.dataGridView1.Name = "dataGridView1";
|
||||
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||
//
|
||||
// FileName
|
||||
//
|
||||
resources.ApplyResources(this.FileName, "FileName");
|
||||
this.FileName.Name = "FileName";
|
||||
this.FileName.ReadOnly = true;
|
||||
//
|
||||
// DownloadUrl
|
||||
//
|
||||
resources.ApplyResources(this.DownloadUrl, "DownloadUrl");
|
||||
this.DownloadUrl.Name = "DownloadUrl";
|
||||
this.DownloadUrl.ReadOnly = true;
|
||||
//
|
||||
// Author
|
||||
//
|
||||
resources.ApplyResources(this.Author, "Author");
|
||||
this.Author.Name = "Author";
|
||||
this.Author.ReadOnly = true;
|
||||
//
|
||||
// Desc
|
||||
//
|
||||
resources.ApplyResources(this.Desc, "Desc");
|
||||
this.Desc.Name = "Desc";
|
||||
this.Desc.ReadOnly = true;
|
||||
//
|
||||
// contextMenuStrip1
|
||||
//
|
||||
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.removeToolStripMenuItem});
|
||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||
resources.ApplyResources(this.contextMenuStrip1, "contextMenuStrip1");
|
||||
//
|
||||
// removeToolStripMenuItem
|
||||
//
|
||||
this.removeToolStripMenuItem.Name = "removeToolStripMenuItem";
|
||||
resources.ApplyResources(this.removeToolStripMenuItem, "removeToolStripMenuItem");
|
||||
this.removeToolStripMenuItem.Click += new System.EventHandler(this.removeToolStripMenuItem_Click);
|
||||
//
|
||||
// metroComboBox1
|
||||
//
|
||||
this.metroComboBox1.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.metroComboBox1, "metroComboBox1");
|
||||
this.metroComboBox1.Items.AddRange(new object[] {
|
||||
resources.GetString("metroComboBox1.Items"),
|
||||
resources.GetString("metroComboBox1.Items1"),
|
||||
resources.GetString("metroComboBox1.Items2"),
|
||||
resources.GetString("metroComboBox1.Items3"),
|
||||
resources.GetString("metroComboBox1.Items4")});
|
||||
this.metroComboBox1.Name = "metroComboBox1";
|
||||
this.metroComboBox1.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroComboBox1.UseSelectable = true;
|
||||
this.metroComboBox1.SelectedIndexChanged += new System.EventHandler(this.metroComboBox1_SelectedIndexChanged);
|
||||
//
|
||||
// metroButton6
|
||||
//
|
||||
resources.ApplyResources(this.metroButton6, "metroButton6");
|
||||
this.metroButton6.Name = "metroButton6";
|
||||
this.metroButton6.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroButton6.UseSelectable = true;
|
||||
this.metroButton6.Click += new System.EventHandler(this.metroButton6_Click);
|
||||
//
|
||||
// PCK_Manager
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.Controls.Add(this.metroButton6);
|
||||
this.Controls.Add(this.metroComboBox1);
|
||||
this.Controls.Add(this.metroPanel1);
|
||||
this.Controls.Add(this.metroButton2);
|
||||
this.Controls.Add(this.metroLabel1);
|
||||
this.Controls.Add(this.metroTextBox1);
|
||||
this.Controls.Add(this.metroButton1);
|
||||
this.ForeColor = System.Drawing.Color.White;
|
||||
this.Name = "PCK_Manager";
|
||||
this.metroPanel1.ResumeLayout(false);
|
||||
this.metroPanel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
|
||||
this.contextMenuStrip1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private MetroFramework.Controls.MetroButton metroButton1;
|
||||
private MetroFramework.Controls.MetroTextBox metroTextBox1;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel1;
|
||||
private MetroFramework.Controls.MetroButton metroButton2;
|
||||
private MetroFramework.Controls.MetroPanel metroPanel1;
|
||||
private System.Windows.Forms.DataGridView dataGridView1;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel5;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel4;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel3;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel2;
|
||||
private MetroFramework.Controls.MetroButton metroButton4;
|
||||
private MetroFramework.Controls.MetroButton metroButton3;
|
||||
private MetroFramework.Controls.MetroTextBox metroTextBox5;
|
||||
private MetroFramework.Controls.MetroTextBox metroTextBox4;
|
||||
private MetroFramework.Controls.MetroTextBox metroTextBox3;
|
||||
private MetroFramework.Controls.MetroTextBox metroTextBox2;
|
||||
private MetroFramework.Controls.MetroButton metroButton5;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem removeToolStripMenuItem;
|
||||
private MetroFramework.Controls.MetroComboBox metroComboBox1;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel7;
|
||||
private MetroFramework.Controls.MetroTextBox metroTextBox7;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel6;
|
||||
private MetroFramework.Controls.MetroTextBox metroTextBox6;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn FileName;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn DownloadUrl;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn Author;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn Desc;
|
||||
private MetroFramework.Controls.MetroButton metroButton6;
|
||||
}
|
||||
}
|
||||
@@ -1,156 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using PckStudio.ToolboxItems;
|
||||
|
||||
namespace PckStudio.Forms
|
||||
{
|
||||
[Obsolete("For what is this thing used?")]
|
||||
public partial class PCK_Manager : ThemeForm
|
||||
{
|
||||
public PCK_Manager()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void metroButton5_Click(object sender, EventArgs e)
|
||||
{
|
||||
string nom = metroTextBox2.Text;
|
||||
string pckurl = metroTextBox3.Text;
|
||||
string pckimg = metroTextBox4.Text;
|
||||
string DLUrl = metroTextBox5.Text;
|
||||
string auth = metroTextBox6.Text;
|
||||
string desc = metroTextBox7.Text.Replace("\n","\\n");
|
||||
|
||||
dataGridView1.Rows.Add(nom, DLUrl, auth, desc);
|
||||
}
|
||||
|
||||
private void removeToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (DataGridViewRow dr = dataGridView1.SelectedRows[0])
|
||||
{
|
||||
if (dr.Cells[0].Value != null && dr.Cells[1].Value != null)
|
||||
{
|
||||
dataGridView1.Rows.Remove(dr);
|
||||
string filenom = (dr.Cells[0].Value.ToString()).Replace(" ", "");
|
||||
File.Delete(metroTextBox1.Text + "\\mod\\pcks\\" + filenom + ".pck");
|
||||
File.Delete(metroTextBox1.Text + "\\mod\\pcks\\" + filenom + ".png");
|
||||
File.Delete(metroTextBox1.Text + "\\mod\\pcks\\" + filenom + ".desc");
|
||||
File.WriteAllText(metroTextBox1.Text + "\\" + metroComboBox1.SelectedItem.ToString() + ".txt", File.ReadAllText(metroTextBox1.Text + "\\" + metroComboBox1.SelectedItem.ToString() + ".txt").Replace("\n" + filenom, ""));
|
||||
File.WriteAllText(metroTextBox1.Text + "\\" + metroComboBox1.SelectedItem.ToString() + ".txt", File.ReadAllText(metroTextBox1.Text + "\\" + metroComboBox1.SelectedItem.ToString() + ".txt").Replace(filenom, ""));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void metroButton2_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!File.Exists(metroTextBox1.Text + "\\" + metroComboBox1.Text + ".txt"))
|
||||
{
|
||||
File.Create(metroTextBox1.Text + "\\" + metroComboBox1.Text + ".txt");
|
||||
Directory.CreateDirectory(metroTextBox1.Text + "\\mod\\pcks");
|
||||
}
|
||||
|
||||
Console.WriteLine(metroTextBox1.Text + "\\" + metroComboBox1.SelectedItem.ToString() + ".txt");
|
||||
Console.WriteLine(metroTextBox1.Text + "\\" + metroComboBox1.Text + ".txt");
|
||||
string data = File.ReadAllText(metroTextBox1.Text + "\\" + metroComboBox1.SelectedItem.ToString() + ".txt");
|
||||
foreach(string pack in data.Split(new[] { "\n", "\r\n"}, StringSplitOptions.None))
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(pack))
|
||||
{
|
||||
string loaded = File.ReadAllText(metroTextBox1.Text + "\\mod\\pcks\\" + pack + ".desc");
|
||||
string[] loadedx = loaded.Split(new[] { "\n", "\r\n" }, StringSplitOptions.None);
|
||||
|
||||
string nom = loadedx[0];
|
||||
string auth = loadedx[1];
|
||||
string desc = loadedx[2];
|
||||
string dlurl = loadedx[3];
|
||||
dataGridView1.Rows.Add(nom, dlurl, auth, desc);
|
||||
}
|
||||
}
|
||||
metroPanel1.Enabled = true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void metroButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
FolderBrowserDialog fbd = new FolderBrowserDialog();
|
||||
if(fbd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
dataGridView1.Rows.Clear();
|
||||
metroTextBox1.Text = fbd.SelectedPath;
|
||||
}
|
||||
}
|
||||
|
||||
private void metroButton3_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog opd = new OpenFileDialog();
|
||||
opd.Filter = "PCK Files | *.pck";
|
||||
if (opd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
metroTextBox5.Text = File.ReadAllText(Environment.CurrentDirectory + "\\settings.ini").Split(new[] { "\r\n", "\n" }, StringSplitOptions.None)[1] + "mod/pcks/" + metroTextBox2.Text.Replace(" ", "") + ".pck";
|
||||
metroTextBox3.Text = opd.FileName;
|
||||
File.Copy(opd.FileName, metroTextBox1.Text + "\\mod\\pcks\\" + metroTextBox2.Text.Replace(" ", "") + ".pck", true);
|
||||
}
|
||||
}
|
||||
|
||||
private void metroComboBox1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
dataGridView1.Rows.Clear();
|
||||
}
|
||||
|
||||
private void metroButton6_Click(object sender, EventArgs e)
|
||||
{
|
||||
string listdata = "";
|
||||
foreach (DataGridViewRow dr in dataGridView1.Rows)
|
||||
{
|
||||
string descdat = "";
|
||||
try
|
||||
{
|
||||
if (dr.Cells[0] != null)
|
||||
//listdata += dr.Cells[0] + "\n";
|
||||
|
||||
if (dr.Cells[0].Value != null && dr.Cells[1].Value != null)
|
||||
{
|
||||
string contentValue1 = dr.Cells[0].Value.ToString();
|
||||
string contentValue2 = dr.Cells[1].Value.ToString();
|
||||
string contentValue3 = dr.Cells[2].Value.ToString();
|
||||
string contentValue4 = dr.Cells[3].Value.ToString();
|
||||
listdata += contentValue1.Replace(" ","");
|
||||
descdat = contentValue1 + "\n" + contentValue3 + "\n" + contentValue4 + "\n" + contentValue2 + "\nadline";
|
||||
File.WriteAllText((metroTextBox1.Text + "\\mod\\pcks\\" + contentValue1.Replace(" ", "") + ".desc"), descdat);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
File.WriteAllText((metroTextBox1.Text + "\\" + metroComboBox1.SelectedItem.ToString() + ".txt"), listdata);
|
||||
}
|
||||
|
||||
private void metroButton4_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
OpenFileDialog opd = new OpenFileDialog();
|
||||
opd.Filter = "PNG Files | *.png";
|
||||
if (opd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
metroTextBox4.Text = opd.FileName;
|
||||
File.Copy(opd.FileName, metroTextBox1.Text + "\\mod\\pcks\\" + metroTextBox2.Text.Replace(" ", "") + ".png", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,227 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="metroButton1.Text" xml:space="preserve">
|
||||
<value>ブラウズ</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="resource.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="metroLabel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>130, 19</value>
|
||||
</data>
|
||||
<data name="metroLabel1.Text" xml:space="preserve">
|
||||
<value>ディレクトリの読み込み</value>
|
||||
</data>
|
||||
<data name="metroButton2.Text" xml:space="preserve">
|
||||
<value>負荷</value>
|
||||
</data>
|
||||
<data name="metroLabel7.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>78, 19</value>
|
||||
</data>
|
||||
<data name="metroLabel7.Text" xml:space="preserve">
|
||||
<value>パックの説明</value>
|
||||
</data>
|
||||
<data name="resource.ImeMode1" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="metroLabel6.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>81, 19</value>
|
||||
</data>
|
||||
<data name="metroLabel6.Text" xml:space="preserve">
|
||||
<value>パック作成者</value>
|
||||
</data>
|
||||
<data name="resource.ImeMode2" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="metroButton5.Text" xml:space="preserve">
|
||||
<value>追加</value>
|
||||
</data>
|
||||
<data name="metroLabel5.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>93, 19</value>
|
||||
</data>
|
||||
<data name="metroLabel5.Text" xml:space="preserve">
|
||||
<value>ダウンロードURL</value>
|
||||
</data>
|
||||
<data name="metroLabel4.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>61, 19</value>
|
||||
</data>
|
||||
<data name="metroLabel4.Text" xml:space="preserve">
|
||||
<value>PCK画像</value>
|
||||
</data>
|
||||
<data name="metroLabel3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>71, 19</value>
|
||||
</data>
|
||||
<data name="metroLabel3.Text" xml:space="preserve">
|
||||
<value>PCKファイル</value>
|
||||
</data>
|
||||
<data name="metroLabel2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>53, 19</value>
|
||||
</data>
|
||||
<data name="metroLabel2.Text" xml:space="preserve">
|
||||
<value>パック名</value>
|
||||
</data>
|
||||
<data name="metroButton4.Text" xml:space="preserve">
|
||||
<value>ブラウズ</value>
|
||||
</data>
|
||||
<data name="metroButton3.Text" xml:space="preserve">
|
||||
<value>ブラウズ</value>
|
||||
</data>
|
||||
<data name="resource.ImeMode3" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="resource.ImeMode4" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="resource.ImeMode5" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="resource.ImeMode6" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="FileName.HeaderText" xml:space="preserve">
|
||||
<value>パック名</value>
|
||||
</data>
|
||||
<data name="DownloadUrl.HeaderText" xml:space="preserve">
|
||||
<value>ダウンロードURL</value>
|
||||
</data>
|
||||
<data name="Author.HeaderText" xml:space="preserve">
|
||||
<value>著者</value>
|
||||
</data>
|
||||
<data name="Desc.HeaderText" xml:space="preserve">
|
||||
<value>説明</value>
|
||||
</data>
|
||||
<data name="removeToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>121, 22</value>
|
||||
</data>
|
||||
<data name="removeToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>削除する</value>
|
||||
</data>
|
||||
<data name="contextMenuStrip1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>122, 26</value>
|
||||
</data>
|
||||
<data name="metroButton6.Text" xml:space="preserve">
|
||||
<value>セーブ</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>PCKマネージャー</value>
|
||||
</data>
|
||||
</root>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user