From 587ec681ac33b6d66c6d61dad64a6e07509a551a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=89=E5=B3=B0?= Date: Wed, 15 Oct 2025 16:31:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=BB=84=E4=BB=B6=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Script/SDKManager/RushSDKManager.cs | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/Assets/Script/SDKManager/RushSDKManager.cs b/Assets/Script/SDKManager/RushSDKManager.cs index bbb4525..855c692 100644 --- a/Assets/Script/SDKManager/RushSDKManager.cs +++ b/Assets/Script/SDKManager/RushSDKManager.cs @@ -966,6 +966,51 @@ public class RushSDKManager : D_MonoSingleton EFSdk.get().SetPersistentStyleV2Text(text1, text2, text3, text4); } + /// + /// 获取指定类型的小组件是否已添加到桌面 + /// + /// + /// + public bool IsWidgetAdded(EFSdk.WidgetType type) + { + return EFSdk.get().IsWidgetAdded(type); + } + + /// + /// 将指定类型的小组件添加到桌面 + /// + /// + /// 添加结果 + /// + public void RequestAddWidget(EFSdk.WidgetType type, Action action) + { + EFSdk.get().RequestAddWidget(type, action); + } + + /// + /// 请求将Widget3X2添加到桌面,并自定义文案 + /// + /// 标题1文案 + /// 标题2文案 + /// 进度条上的文案 + /// 按钮的文案 + /// 小组件添加结果回调 + public void RequestAddWidget3x2(string title1, string title2, string progressStr, string buttonStr, Action action) + { + EFSdk.get().RequestAddWidget3x2(title1, title2, progressStr, buttonStr, action); + } + + /// + /// 请求将 Widget5X1 添加到桌面,并自定义文案 + /// + /// 内容文案 + /// 小组件添加结果回调 + /// 文案文字十六进制颜色值,如: #FFFFFF + public void RequestAddWidget5x1(string content, Action action, string contentTextColor = "#FFFFFF") + { + EFSdk.get().RequestAddWidget5x1(content, action, contentTextColor); + } + #endregion /// @@ -1081,4 +1126,6 @@ public class RushSDKManager : D_MonoSingleton { Application.OpenURL(StaticValue.PrivacyUrl); } + + }