From 97bca06682a1c45656ded9155ce18773072f9e29 Mon Sep 17 00:00:00 2001 From: Cyrilly <59193481@qq.com> Date: Sun, 2 Nov 2025 15:37:29 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BD=BF=E7=94=A8Submodule=E5=92=8C?= =?UTF-8?q?=E7=AC=A6=E5=8F=B7=E9=93=BE=E6=8E=A5=EF=BC=8C=E4=BD=BF=E5=85=8B?= =?UTF-8?q?=E9=9A=86=E6=9B=B4=E6=96=B9=E4=BE=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitmodules | 7 +++++++ CreateLinks.bat | 16 ++++++++++++++++ README-en.md | 11 +++++++++++ README.md | 11 +++++++++++ SilkyUIAnalyzer | 1 + SilkyUIFramework | 1 + 6 files changed, 47 insertions(+) create mode 100644 .gitmodules create mode 100644 CreateLinks.bat create mode 160000 SilkyUIAnalyzer create mode 160000 SilkyUIFramework diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..5741bae3 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,7 @@ +[submodule "SilkyUIFramework"] + path = SilkyUIFramework + url = https://github.com/487666123/SilkyUIFramework.git + branch = preview +[submodule "SilkyUIAnalyzer"] + path = SilkyUIAnalyzer + url = https://github.com/487666123/SilkyUIAnalyzer.git diff --git a/CreateLinks.bat b/CreateLinks.bat new file mode 100644 index 00000000..617b0243 --- /dev/null +++ b/CreateLinks.bat @@ -0,0 +1,16 @@ +@echo off +REM 获取当前脚本所在目录 +set "CURRENT_DIR=%~dp0" + +REM 获取ImproveGame的父目录 +for %%I in ("%CURRENT_DIR%..") do set "PARENT_DIR=%%~fI" + +REM 创建符号链接 +echo 创建 SilkyUIAnalyzer 符号链接... +mklink /D "%PARENT_DIR%\SilkyUIAnalyzer" "%CURRENT_DIR%SilkyUIAnalyzer" + +echo 创建 SilkyUIFramework 符号链接... +mklink /D "%PARENT_DIR%\SilkyUIFramework" "%CURRENT_DIR%SilkyUIFramework" + +echo 符号链接创建完成 +pause diff --git a/README-en.md b/README-en.md index 549f356a..30aa96ef 100644 --- a/README-en.md +++ b/README-en.md @@ -57,6 +57,17 @@ You can subscribe and download it via steam workshop: 鎺ㄨ崘 **IDE**锛歊ider銆乂isual Studio 2022銆乂isual Studio Code +### 鍏嬮殕椤圭洰 + +鐢变簬鏈」鐩娇鐢ㄤ簡 **Git 瀛愭ā鍧**锛屽洜姝ら渶瑕佷娇鐢 `--recurse-submodules` 鍙傛暟鍏嬮殕椤圭洰銆備笖鐢变簬瑙e喅鏂规寮曠敤鐨勯」鐩簲涓嶪mproveGame鏂囦欢澶瑰钩琛岋紝鍏嬮殕鍚庨渶瑕佽繍琛 `CreateLinks.bat` 鑴氭湰鍒涘缓绗﹀彿閾炬帴銆傦紙鎴栨墜鍔ㄥ湪ImproveGame鐖剁洰褰曚笅鍒嗗埆鍏嬮殕杩欎袱涓粨搴擄級 +鍦℅it Bash鎴栫粓绔腑杩愯浠ヤ笅鍛戒护锛 + +1.$ git clone --recurse-submodules https://github.com/ForOne-Club/ImproveGame.git +2.$ cd ImproveGame +3.$ .\CreateLinks.bat + +### 缂栬瘧椤圭洰 + 1. 浣跨敤 **IDE** 鎵撳紑椤圭洰 2. 浣跨敤 **IDE** 缂栬瘧椤圭洰锛堥氬父浣跨敤蹇嵎閿 `F5` 鍙揩閫熷惎鍔級 diff --git a/SilkyUIAnalyzer b/SilkyUIAnalyzer new file mode 160000 index 00000000..660ac5bc --- /dev/null +++ b/SilkyUIAnalyzer @@ -0,0 +1 @@ +Subproject commit 660ac5bcee47c8b2120c97f8be50856fbdc1d927 diff --git a/SilkyUIFramework b/SilkyUIFramework new file mode 160000 index 00000000..d35a648d --- /dev/null +++ b/SilkyUIFramework @@ -0,0 +1 @@ +Subproject commit d35a648d8553f0e4fd2e1af0a630589a5db411e9 From b3f573b94909827a01057a7bd0c5e34e24f35c32 Mon Sep 17 00:00:00 2001 From: Cyrilly <35227653+Cyrillya@users.noreply.github.com> Date: Sun, 2 Nov 2025 15:40:06 +0800 Subject: [PATCH 2/4] Improve README formatting for clone instructions Format the Git clone commands in code block for better readability. --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fea96e71..81c81c17 100644 --- a/README.md +++ b/README.md @@ -64,9 +64,11 @@ 鐢变簬鏈」鐩娇鐢ㄤ簡 **Git 瀛愭ā鍧**锛屽洜姝ら渶瑕佷娇鐢 `--recurse-submodules` 鍙傛暟鍏嬮殕椤圭洰銆備笖鐢变簬瑙e喅鏂规寮曠敤鐨勯」鐩簲涓嶪mproveGame鏂囦欢澶瑰钩琛岋紝鍏嬮殕鍚庨渶瑕佽繍琛 `CreateLinks.bat` 鑴氭湰鍒涘缓绗﹀彿閾炬帴銆傦紙鎴栨墜鍔ㄥ湪ImproveGame鐖剁洰褰曚笅鍒嗗埆鍏嬮殕杩欎袱涓粨搴擄級 鍦℅it Bash鎴栫粓绔腑杩愯浠ヤ笅鍛戒护锛 -1.$ git clone --recurse-submodules https://github.com/ForOne-Club/ImproveGame.git -2.$ cd ImproveGame -3.$ .\CreateLinks.bat +```cmd +git clone --recurse-submodules https://github.com/ForOne-Club/ImproveGame.git +cd ImproveGame +.\CreateLinks.bat +``` ### 缂栬瘧椤圭洰 @@ -91,4 +93,4 @@ WMITF寮婧愰摼鎺: \ ChevyRay鐨勫崗绋嬬被: \ ProjectStarlight.Interchange: \ Auto Piggy Bank寮婧愰摼鎺: \ -Magic Storage寮婧愰摼鎺: \ No newline at end of file +Magic Storage寮婧愰摼鎺: From 87f5cd9a7958199d780dcf8ba7eba3e521b12833 Mon Sep 17 00:00:00 2001 From: Cyrilly <59193481@qq.com> Date: Sun, 2 Nov 2025 15:43:25 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=86=8D=E6=AC=A1=E5=AE=8C=E5=96=84README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README-en.md | 11 +++++++---- README.md | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README-en.md b/README-en.md index 30aa96ef..4d368486 100644 --- a/README-en.md +++ b/README-en.md @@ -59,12 +59,15 @@ This mod contains Nuget package, which means you should not use the compilation ### Clone -Since this project uses **Git submodules**, you need to clone the repository with the `--recurse-submodules` option. Also, because the projects referenced by the solution should be parallel to the `ImproveGame` folder, you need to run the `CreateLinks.bat` script after cloning to create the symbolic links (or manually clone these two repositories in the parent directory of `ImproveGame`). +Since this project uses **Git submodules**, you need to clone the repository with the `--recurse-submodules` option. Also, because the projects referenced by the solution should be parallel to the `ImproveGame` folder, you need to run the `CreateLinks.bat` script after cloning to create the symbolic links (or manually clone these two repositories in the parent directory of `ImproveGame`). + Run the following command in Git Bash or a terminal: -1.$ git clone --recurse-submodules https://github.com/ForOne-Club/ImproveGame.git -2.$ cd ImproveGame -3.$ .\CreateLinks.bat +```cmd +git clone --recurse-submodules https://github.com/ForOne-Club/ImproveGame.git +cd ImproveGame +.\CreateLinks.bat +``` ### Compile diff --git a/README.md b/README.md index 81c81c17..1afe6ed7 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,7 @@ ### 鍏嬮殕椤圭洰 鐢变簬鏈」鐩娇鐢ㄤ簡 **Git 瀛愭ā鍧**锛屽洜姝ら渶瑕佷娇鐢 `--recurse-submodules` 鍙傛暟鍏嬮殕椤圭洰銆備笖鐢变簬瑙e喅鏂规寮曠敤鐨勯」鐩簲涓嶪mproveGame鏂囦欢澶瑰钩琛岋紝鍏嬮殕鍚庨渶瑕佽繍琛 `CreateLinks.bat` 鑴氭湰鍒涘缓绗﹀彿閾炬帴銆傦紙鎴栨墜鍔ㄥ湪ImproveGame鐖剁洰褰曚笅鍒嗗埆鍏嬮殕杩欎袱涓粨搴擄級 + 鍦℅it Bash鎴栫粓绔腑杩愯浠ヤ笅鍛戒护锛 ```cmd From 0bd89b085a8220678f0f64ef267218287fcc0fca Mon Sep 17 00:00:00 2001 From: Cyrilly <59193481@qq.com> Date: Sun, 2 Nov 2025 16:10:49 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20=E8=AE=A9=E4=BB=96?= =?UTF-8?q?=E8=83=BD=E8=BF=87=E7=BC=96=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ImproveGame.csproj | 22 +++++++++++++++++++++ UIFramework/BlurHelper.cs | 6 +++--- UIFramework/Graphics2D/SDFGraphics.Utils.cs | 2 +- UIFramework/Graphics2D/SDFRectangle.cs | 2 +- 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/ImproveGame.csproj b/ImproveGame.csproj index afffdc17..5f5402c9 100644 --- a/ImproveGame.csproj +++ b/ImproveGame.csproj @@ -31,6 +31,8 @@ false + + @@ -43,5 +45,25 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/UIFramework/BlurHelper.cs b/UIFramework/BlurHelper.cs index 5d43cb33..9528b5e1 100644 --- a/UIFramework/BlurHelper.cs +++ b/UIFramework/BlurHelper.cs @@ -51,7 +51,7 @@ public static void KawaseBlur(RenderTarget2D renderTarget, { if (offsets.Length == 0) return; - var effect = ModAsset.BlurEffect.Value; + var effect = ModAsset.Effect_BlurEffect.Value; if (effect == null) return; var device = Main.graphics.GraphicsDevice; @@ -61,7 +61,7 @@ public static void KawaseBlur(RenderTarget2D renderTarget, var renderTargetSwap = RenderTargetPool.Instance.Rent(renderTarget.Width, renderTarget.Height); - ModAsset.BlurEffect.Value.Parameters["uPixelSize"].SetValue(Vector2.One / new Vector2(renderTarget.Width, renderTarget.Height)); + ModAsset.Effect_BlurEffect.Value.Parameters["uPixelSize"].SetValue(Vector2.One / new Vector2(renderTarget.Width, renderTarget.Height)); SelectBlurEffectPasses(blurType, out var blurX, out var blurY); @@ -89,7 +89,7 @@ public static void KawaseBlur(RenderTarget2D renderTarget, public static void SelectBlurEffectPasses(BlurMixingNumber blurType, out EffectPass blurX, out EffectPass blurY) { - var effect = ModAsset.BlurEffect.Value; + var effect = ModAsset.Effect_BlurEffect.Value; switch (blurType) { default: diff --git a/UIFramework/Graphics2D/SDFGraphics.Utils.cs b/UIFramework/Graphics2D/SDFGraphics.Utils.cs index 543e0d1e..83923b9f 100644 --- a/UIFramework/Graphics2D/SDFGraphics.Utils.cs +++ b/UIFramework/Graphics2D/SDFGraphics.Utils.cs @@ -4,7 +4,7 @@ namespace ImproveGame.UIFramework.Graphics2D; partial class SDFGraphics { const float root2Over2 = 1.414213562373f / 2f; - static Effect SDF_Effect => ModAsset.SDFGraphics.Value; + static Effect SDF_Effect => ModAsset.UIFramework_SDFRectangle.Value; static bool DrawFrame => false; private struct VertexPosCoord(Vector2 pos, Vector2 coord) : IVertexType diff --git a/UIFramework/Graphics2D/SDFRectangle.cs b/UIFramework/Graphics2D/SDFRectangle.cs index 496e8f25..f4dfca76 100644 --- a/UIFramework/Graphics2D/SDFRectangle.cs +++ b/UIFramework/Graphics2D/SDFRectangle.cs @@ -5,7 +5,7 @@ public static class SDFRectangle public static bool DontDrawShadow { get; set; } public static EffectPass SpriteEffectPass => Main.spriteBatch.spriteEffectPass; public static GraphicsDevice GraphicsDevice => Main.graphics.GraphicsDevice; - private static Effect Effect => ModAsset.SDFRectangle.Value; + private static Effect Effect => ModAsset.UIFramework_SDFRectangle.Value; private static void Transform2SDFMatrix(ref Matrix matrix) { var device = Main.graphics.GraphicsDevice;