Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions CreateLinks.bat
Original file line number Diff line number Diff line change
@@ -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
22 changes: 22 additions & 0 deletions ImproveGame.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
<None Include=".gitignore;.gitattributes;./LICENSE">
<Visible>false</Visible>
</None>
<None Remove="SilkyUIFramework\**" />
<None Remove="SilkyUIAnalyzer\**" />
</ItemGroup>

<ItemGroup>
Expand All @@ -43,5 +45,25 @@

<ItemGroup>
<AdditionalFiles Include="**/*.xml" Exclude="bin/**/*;obj/**/*" Pack="true" ModPath="%(Identity)" />
<AdditionalFiles Remove="SilkyUIFramework\**" />
<AdditionalFiles Remove="SilkyUIAnalyzer\**" />
</ItemGroup>

<ItemGroup>
<Compile Remove="SilkyUIFramework\**" />
<Compile Remove="SilkyUIAnalyzer\**" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Remove="SilkyUIFramework\**" />
<EmbeddedResource Remove="SilkyUIAnalyzer\**" />
</ItemGroup>

<ItemGroup>
<UpToDateCheckInput Remove="SilkyUIFramework\Assets\Shader\BlurEffect.fx" />
<UpToDateCheckInput Remove="SilkyUIFramework\Graphics2D\ColorBlock.fx" />
<UpToDateCheckInput Remove="SilkyUIFramework\Graphics2D\Mask.fx" />
<UpToDateCheckInput Remove="SilkyUIFramework\Graphics2D\SDFGraphics.fx" />
<UpToDateCheckInput Remove="SilkyUIFramework\Graphics2D\SDFRectangle.fx" />
</ItemGroup>
</Project>
14 changes: 14 additions & 0 deletions README-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,20 @@ You can subscribe and download it via steam workshop: <https://steamcommunity.co

This mod contains Nuget package, which means you should not use the compilation of tModLoader, but you should use the compilation function of the code IDE (such as Visual Studio, Rider) to compile this mod

### 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`).

Run the following command in Git Bash or a terminal:

```cmd
git clone --recurse-submodules https://github.com/ForOne-Club/ImproveGame.git
cd ImproveGame
.\CreateLinks.bat
```

### Compile

1. Open project with your IDE
2. If you have enabled this mod in tModLoader, disable it and reload first
3. Compile the project with IDE
Expand Down
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,20 @@

> 鎺ㄨ崘 **IDE**锛歊ider銆乂isual Studio 2022銆乂isual Studio Code

### 鍏嬮殕椤圭洰

鐢变簬鏈」鐩娇鐢ㄤ簡 **Git 瀛愭ā鍧�**锛屽洜姝ら渶瑕佷娇鐢� `--recurse-submodules` 鍙傛暟鍏嬮殕椤圭洰銆備笖鐢变簬瑙e喅鏂规寮曠敤鐨勯」鐩簲涓嶪mproveGame鏂囦欢澶瑰钩琛岋紝鍏嬮殕鍚庨渶瑕佽繍琛� `CreateLinks.bat` 鑴氭湰鍒涘缓绗﹀彿閾炬帴銆傦紙鎴栨墜鍔ㄥ湪ImproveGame鐖剁洰褰曚笅鍒嗗埆鍏嬮殕杩欎袱涓粨搴擄級

鍦℅it Bash鎴栫粓绔腑杩愯浠ヤ笅鍛戒护锛�

```cmd
git clone --recurse-submodules https://github.com/ForOne-Club/ImproveGame.git
cd ImproveGame
.\CreateLinks.bat
```

### 缂栬瘧椤圭洰

1. 浣跨敤 **IDE** 鎵撳紑椤圭洰
2. 浣跨敤 **IDE** 缂栬瘧椤圭洰锛堥�氬父浣跨敤蹇嵎閿� `F5` 鍙揩閫熷惎鍔級

Expand All @@ -80,4 +94,4 @@ WMITF寮�婧愰摼鎺�: <https://github.com/gardenappl/WMITF>\
ChevyRay鐨勫崗绋嬬被: <https://github.com/ChevyRay/Coroutines>\
ProjectStarlight.Interchange: <https://github.com/ProjectStarlight/ProjectStarlight.Interchange>\
Auto Piggy Bank寮�婧愰摼鎺�: <https://github.com/diniamo/auto-piggy-bank>\
Magic Storage寮�婧愰摼鎺�: <https://github.com/blushiemagic/MagicStorage>
Magic Storage寮�婧愰摼鎺�: <https://github.com/blushiemagic/MagicStorage>
1 change: 1 addition & 0 deletions SilkyUIAnalyzer
Submodule SilkyUIAnalyzer added at 660ac5
1 change: 1 addition & 0 deletions SilkyUIFramework
Submodule SilkyUIFramework added at d35a64
6 changes: 3 additions & 3 deletions UIFramework/BlurHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);

Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion UIFramework/Graphics2D/SDFGraphics.Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion UIFramework/Graphics2D/SDFRectangle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading