Added specialized icons for slim and classic skins

This commit is contained in:
MayNL
2026-04-11 23:12:14 -04:00
parent 3c142ec7df
commit 4f2f13a21d
9 changed files with 71 additions and 22 deletions

View File

@@ -522,7 +522,7 @@ namespace PckStudio.Controls
//
// skinToolStripMenuItem1
//
this.skinToolStripMenuItem1.Image = global::PckStudio.Properties.Resources.SKIN_ICON;
this.skinToolStripMenuItem1.Image = global::PckStudio.Properties.Resources.CLASSIC_SKIN_ICON;
this.skinToolStripMenuItem1.Name = "skinToolStripMenuItem1";
resources.ApplyResources(this.skinToolStripMenuItem1, "skinToolStripMenuItem1");
//

View File

@@ -109,11 +109,13 @@ namespace PckStudio.Controls
imageList.Images.Add(Resources.GRF_ICON); // Icon for Game Rule files (*.grf)
imageList.Images.Add(Resources.GRH_ICON); // Icon for Game Rule Header files (*.grh)
imageList.Images.Add(Resources.INFO_ICON); // Icon for Info files (0)
imageList.Images.Add(Resources.SKIN_ICON); // Icon for Skin files (*.png)
imageList.Images.Add(Resources.CLASSIC_SKIN_ICON); // Icon for Skin files (*.png)
imageList.Images.Add(Resources.CAPE_ICON); // Icon for Cape files (*.png)
imageList.Images.Add(Resources.TEXTURE_ICON); // Icon for Texture files (*.png;*.tga)
imageList.Images.Add(Resources.BEHAVIOURS_ICON); // Icon for Behaviour files (behaviours.bin)
imageList.Images.Add(Resources.ENTITY_MATERIALS_ICON); // Icon for Entity Material files (entityMaterials.bin)
imageList.Images.Add(Resources.MODERN_SKIN_ICON); // Icon for Skin files with Modern ANIM flag (*.png)
imageList.Images.Add(Resources.SLIM_SKIN_ICON); // Icon for Skin files with Slim ANIM flag (*.png)
_pckAssetTypeHandler = new Dictionary<PckAssetType, Action<PckAsset>>(15)
{
@@ -459,6 +461,7 @@ namespace PckStudio.Controls
parameterValueTextBox.Text = ParameterTypeTextBox.Text = string.Empty;
_wasModified = true;
ReloadParameterTreeView();
SetFileType(PckAssetType.SkinFile); // just a dirty way to get the right icon in case the anim was changed
}
}
@@ -582,7 +585,7 @@ namespace PckStudio.Controls
{
TreeNode node = BuildNodeTreeBySeperator(root, asset.Filename, '/');
node.Tag = asset;
int nodeIconId = GetNodeIconId(asset.Type);
int nodeIconId = GetNodeIconId(asset);
node.ImageIndex = nodeIconId;
node.SelectedImageIndex = nodeIconId;
}
@@ -605,9 +608,26 @@ namespace PckStudio.Controls
}
}
private int GetNodeIconId(PckAssetType type)
private int GetSkinNodeIconId(int animValue)
{
return type switch
SkinANIM anim = SkinANIM.FromValue(animValue);
if (anim.GetFlag(SkinAnimFlag.SLIM_MODEL))
return 18; // slim model icon
else if (anim.GetFlag(SkinAnimFlag.MODERN_WIDE_MODEL))
return 17; // modern model; slim gets priority just like in game
return 12; // classic skin model icon
}
private int GetNodeIconId(PckAsset asset)
{
int anim = 0;
if (asset.Type == PckAssetType.SkinFile)
anim = asset.GetSkin().Anim.ToValue();
return asset.Type switch
{
PckAssetType.AudioFile => 1,
PckAssetType.LocalisationFile => 3,
@@ -618,7 +638,7 @@ namespace PckStudio.Controls
PckAssetType.GameRulesFile => 9,
PckAssetType.GameRulesHeader => 10,
PckAssetType.InfoFile => 11,
PckAssetType.SkinFile => 12,
PckAssetType.SkinFile => GetSkinNodeIconId(anim),
PckAssetType.CapeFile => 13,
PckAssetType.TextureFile => 14,
PckAssetType.BehavioursFile => 15,
@@ -874,7 +894,7 @@ namespace PckStudio.Controls
{
Debug.WriteLine($"Setting {asset.Type} to {type}");
asset.Type = type;
int nodeIconId = GetNodeIconId(type);
int nodeIconId = GetNodeIconId(asset);
treeViewMain.SelectedNode.ImageIndex = nodeIconId;
treeViewMain.SelectedNode.SelectedImageIndex = nodeIconId;
}
@@ -1867,6 +1887,7 @@ namespace PckStudio.Controls
asset.AddParameter(new KeyValuePair<string, string>("ANIM", gameFlags.ToString()));
ReloadParameterTreeView();
SetFileType(PckAssetType.SkinFile); // just a dirty way to get the right icon in case the anim was changed
_wasModified = true;
}

View File

@@ -44,7 +44,7 @@ namespace PckStudio.Forms.Features
var imgList = new ImageList();
imgList.ColorDepth = ColorDepth.Depth32Bit;
imgList.ImageSize = new System.Drawing.Size(28, 28);
imgList.Images.Add(Resources.SKIN_ICON);
imgList.Images.Add(Resources.CLASSIC_SKIN_ICON);
imgList.Images.Add(Resources.TEXTURE_ICON);
DLCTreeView.ImageList = imgList;
if (!TryApplyPermanentCemuConfig() &&

View File

@@ -647,7 +647,7 @@
<None Include="Resources\iconImageList\GRH ICON.png" />
<None Include="Resources\iconImageList\INFO ICON.png" />
<None Include="Resources\iconImageList\CAPE ICON.png" />
<None Include="Resources\iconImageList\SKIN ICON.png" />
<None Include="Resources\iconImageList\CLASSIC SKIN ICON.png" />
<None Include="Resources\iconImageList\TEXTURE ICON.png" />
<None Include="Resources\AddTexture.png" />
<None Include="Resources\iconImageList\BEHAVIOURS ICON.png" />
@@ -687,6 +687,8 @@
<None Include="Resources\armor.png" />
<None Include="Resources\external\trello.png" />
<None Include="Resources\icons\file_copy.png" />
<Content Include="Resources\iconImageList\MODERN SKIN ICON.png" />
<Content Include="Resources\iconImageList\SLIM SKIN ICON.png" />
<Content Include="Resources\icons\file_delete.png" />
<Content Include="Resources\icons\file_empty.png" />
<None Include="Resources\icons\file_export.png" />

View File

@@ -192,6 +192,16 @@ namespace PckStudio.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap CLASSIC_SKIN_ICON {
get {
object obj = ResourceManager.GetObject("CLASSIC_SKIN_ICON", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@@ -563,6 +573,16 @@ namespace PckStudio.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap MODERN_SKIN_ICON {
get {
object obj = ResourceManager.GetObject("MODERN SKIN ICON", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
@@ -737,16 +757,6 @@ namespace PckStudio.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap SKIN_ICON {
get {
object obj = ResourceManager.GetObject("SKIN_ICON", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@@ -980,6 +990,16 @@ namespace PckStudio.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap SLIM_SKIN_ICON {
get {
object obj = ResourceManager.GetObject("SLIM SKIN ICON", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>

View File

@@ -190,9 +190,6 @@
<data name="tu13colours" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\fileTemplates\tu13colours.col;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="SKIN_ICON" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\iconImageList\SKIN ICON.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="pckClosed" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\pckClosed.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@@ -415,4 +412,13 @@
<data name="skinAdjustments_wide_right_arm" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\anim_editor\wide_right_arm.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="CLASSIC_SKIN_ICON" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\iconImageList\CLASSIC SKIN ICON.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="MODERN SKIN ICON" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\iconImageList\MODERN SKIN ICON.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="SLIM SKIN ICON" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\iconImageList\SLIM SKIN ICON.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB