From 4f2f13a21d56dba06023a691cce3386470bdf27a Mon Sep 17 00:00:00 2001 From: MayNL Date: Sat, 11 Apr 2026 23:12:14 -0400 Subject: [PATCH] Added specialized icons for slim and classic skins --- .../Controls/Editor/PckEditor.Designer.cs | 2 +- PCK-Studio/Controls/Editor/PckEditor.cs | 33 ++++++++++++--- PCK-Studio/Forms/Features/CemuPanel.cs | 2 +- PCK-Studio/PckStudio.csproj | 4 +- PCK-Studio/Properties/Resources.Designer.cs | 40 +++++++++++++----- PCK-Studio/Properties/Resources.resx | 12 ++++-- .../iconImageList/CLASSIC SKIN ICON.png | Bin 0 -> 1546 bytes .../{SKIN ICON.png => MODERN SKIN ICON.png} | Bin .../iconImageList/SLIM SKIN ICON.png | Bin 0 -> 1423 bytes 9 files changed, 71 insertions(+), 22 deletions(-) create mode 100644 PCK-Studio/Resources/iconImageList/CLASSIC SKIN ICON.png rename PCK-Studio/Resources/iconImageList/{SKIN ICON.png => MODERN SKIN ICON.png} (100%) create mode 100644 PCK-Studio/Resources/iconImageList/SLIM SKIN ICON.png diff --git a/PCK-Studio/Controls/Editor/PckEditor.Designer.cs b/PCK-Studio/Controls/Editor/PckEditor.Designer.cs index 71e9eef4..d3298fb7 100644 --- a/PCK-Studio/Controls/Editor/PckEditor.Designer.cs +++ b/PCK-Studio/Controls/Editor/PckEditor.Designer.cs @@ -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"); // diff --git a/PCK-Studio/Controls/Editor/PckEditor.cs b/PCK-Studio/Controls/Editor/PckEditor.cs index 9efbfb15..0e9bc8d1 100644 --- a/PCK-Studio/Controls/Editor/PckEditor.cs +++ b/PCK-Studio/Controls/Editor/PckEditor.cs @@ -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>(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("ANIM", gameFlags.ToString())); ReloadParameterTreeView(); + SetFileType(PckAssetType.SkinFile); // just a dirty way to get the right icon in case the anim was changed _wasModified = true; } diff --git a/PCK-Studio/Forms/Features/CemuPanel.cs b/PCK-Studio/Forms/Features/CemuPanel.cs index de85ef9b..261bc7ab 100644 --- a/PCK-Studio/Forms/Features/CemuPanel.cs +++ b/PCK-Studio/Forms/Features/CemuPanel.cs @@ -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() && diff --git a/PCK-Studio/PckStudio.csproj b/PCK-Studio/PckStudio.csproj index db6d44d2..014aec0f 100644 --- a/PCK-Studio/PckStudio.csproj +++ b/PCK-Studio/PckStudio.csproj @@ -647,7 +647,7 @@ - + @@ -687,6 +687,8 @@ + + diff --git a/PCK-Studio/Properties/Resources.Designer.cs b/PCK-Studio/Properties/Resources.Designer.cs index 606924a2..2d31c501 100644 --- a/PCK-Studio/Properties/Resources.Designer.cs +++ b/PCK-Studio/Properties/Resources.Designer.cs @@ -192,6 +192,16 @@ namespace PckStudio.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap CLASSIC_SKIN_ICON { + get { + object obj = ResourceManager.GetObject("CLASSIC_SKIN_ICON", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -563,6 +573,16 @@ namespace PckStudio.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap MODERN_SKIN_ICON { + get { + object obj = ResourceManager.GetObject("MODERN SKIN ICON", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Byte[]. /// @@ -737,16 +757,6 @@ namespace PckStudio.Properties { } } - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap SKIN_ICON { - get { - object obj = ResourceManager.GetObject("SKIN_ICON", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -980,6 +990,16 @@ namespace PckStudio.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap SLIM_SKIN_ICON { + get { + object obj = ResourceManager.GetObject("SLIM SKIN ICON", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/PCK-Studio/Properties/Resources.resx b/PCK-Studio/Properties/Resources.resx index f6598817..ce81f2a6 100644 --- a/PCK-Studio/Properties/Resources.resx +++ b/PCK-Studio/Properties/Resources.resx @@ -190,9 +190,6 @@ ..\Resources\fileTemplates\tu13colours.col;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ..\Resources\iconImageList\SKIN ICON.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\pckClosed.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -415,4 +412,13 @@ ..\Resources\anim_editor\wide_right_arm.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\iconImageList\CLASSIC SKIN ICON.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\iconImageList\MODERN SKIN ICON.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\iconImageList\SLIM SKIN ICON.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/PCK-Studio/Resources/iconImageList/CLASSIC SKIN ICON.png b/PCK-Studio/Resources/iconImageList/CLASSIC SKIN ICON.png new file mode 100644 index 0000000000000000000000000000000000000000..280f77a68394b2ce2a5ca17e2ab96bcc5adf35d0 GIT binary patch literal 1546 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G!U;i$lZxy-8q?;Kn_c~qpu?a z!^VE@KZ&eBK4*bPWHAE+-+mBgv|tTZVPIgL@9E+gQW5v|u6@V#Qkml)-@pI&=NwOn z)FsDBD-^qxEN>l=GG4jVAtN&*BSYWdg}h>5w0Cy4he<>Ni<6#ipvuI+%uFG(j?yJ% z-**4ry5&dQlh40j*8cohWpnI$(f)_!=O0(!d0*T7vEmNn%xA9{o(M2-s4)omFeuDm za4=wONMK?($imRX$-p8^rbNz#@Bi6k=Gt9-&%NW^j@P>!Wgkw9+>u_sK7YqO<`4hN zWtY4%WsqaUYu|>Mzk?r4e!jl6J~nc_@t3^U&vw3BIQOvCeUJ6^TsFmw7JpuPeLvh< z|C(p-?)>9PCA6$cmKJiUpi}sJ43=U4idcl@jJu5y5e2c47ImSVparCUVHeZUEjWI zzTYeVb=R-I2DGVmS2bJzp1N&*!o~ayGc-vF)oO;|d(0Kzk3N5OB_*>kV!7J(+^m0p zewMC_i(45y`{&ELwwPTXs^`wy^Y`OME7O~QKlKBBP|a|_N05XVd-R^srt(|B+*vts zQLBO{Yp-5inq_2ffA{+SEk!H+e9Ln8Z}#&&_pj=+UB7*&{xtg)myg_GW=QKIA(4pH z^FMgdYX0iVlLOlCfuVo-_q~T+pJ72tNv8XHM?Tm{~jp*`FS1C4&(ZmHNlfF|L(t< zne>j4!Pu3ARNuXyeM8Nogt@bL*t1Ksik=(^FU{KYztOhzR>1uF|G9H#*=+p&(8@G& zr_J5!htL1Izcw-a&d@MZiG;j$^gi>B$A^ytqrJ9vub=Ne>*95OzHEzM?)&%WkrU7> z`<}7`1MSr-`_imWw}a=C=LrV$(>nK|3mU?^L>8a2i;CGkCiCxvXC>+56 literal 0 HcmV?d00001 diff --git a/PCK-Studio/Resources/iconImageList/SKIN ICON.png b/PCK-Studio/Resources/iconImageList/MODERN SKIN ICON.png similarity index 100% rename from PCK-Studio/Resources/iconImageList/SKIN ICON.png rename to PCK-Studio/Resources/iconImageList/MODERN SKIN ICON.png diff --git a/PCK-Studio/Resources/iconImageList/SLIM SKIN ICON.png b/PCK-Studio/Resources/iconImageList/SLIM SKIN ICON.png new file mode 100644 index 0000000000000000000000000000000000000000..f7adff6c9a15e619e200283922ac571408f6dd31 GIT binary patch literal 1423 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G!U;i$lZxy-8q?;Kn_c~qpu?a z!^VE@KZ&eBK4*bPWHAE+-+mBgv|tTZVPIfY@pN$vsfc@fS2riNROa}@>g&08*%B=T zSXerE8F|>7CMX!PJdt5DY+slVuqQ%D;ot+cgNla2Dhg%?a?+TZ7+9kd^q0mOO8o11 z`o+mV&+feP{$<GSQP{QP`I6Im(t1I5hF*wX15>+$oPCpJa^55k1`wjir zvwpAU2Z`1Hd&kHS$;6OIB>Gv+kbl1>bI!F>tKNUk&&%t(ta5$*Un`)2l^-t`&PvIC z{Kw+$>}rMsQGyH{!o;D|_n9l+pVU8|If;EDuwfCTEXrES&k| zjP-h;Md5ZkZTu$x`SkYrW0RA!@9#D6`~6IgVM7?62u73o^qs-3;@fPXJ9ieQ%u%}; z;rHv?|JfFUGr zTV6P4+037{f9}cyL#Xjq#giWvvMX+H&+osivcCTB8Ipsjm_OlaHN)yzKj$4d754Yf z>Zp&u?aLp&EWBm@oq?3(HElmT!~dzJd)POWG4A;C_}ioH(&fh_)5`yMI(HlM%ga9B zE!a@lFaelx?o%(TQZd&