Skip to content

Commit f606596

Browse files
committed
Update Menu.cs
1 parent 5d3d9ea commit f606596

File tree

1 file changed

+3
-16
lines changed
  • Demo/API_V2/Assets/API/GUI/Menu

1 file changed

+3
-16
lines changed

Demo/API_V2/Assets/API/GUI/Menu/Menu.cs

+3-16
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Diagnostics.Tracing;
41
using LitJson;
52
using UnityEngine;
63
using WeChatWASM;
@@ -24,12 +21,12 @@ protected override void TestAPI(string[] args)
2421
{
2522
setMenuStyle();
2623
}
27-
24+
2825
public void setMenuStyle()
2926
{
3027
string style = isMenuStyleDark ? "light" : "dark";
3128
string toastMessage = $"设置{(isMenuStyleDark ? "浅色" : "深色")}菜单样式完成";
32-
29+
3330
WX.SetMenuStyle(
3431
new SetMenuStyleOption
3532
{
@@ -61,7 +58,7 @@ public void getMenuButtonBoundingClientRect()
6158

6259
// 访问成功,显示结果
6360
WX.ShowModal(
64-
new ShowModalOption() { content = "GetMenuButtonBoundingClientRect, Result: " + JsonMapper.ToJson(res) }
61+
new ShowModalOption() { content = "GetMenuButtonBoundingClientRect Success, Result: " + JsonMapper.ToJson(res) }
6562
);
6663
}
6764

@@ -94,14 +91,4 @@ public void setStatusBarStyle()
9491
!isStatusBarStyleBlack ? "设置状态栏深色" : "设置状态栏白色" // 修改逻辑
9592
);
9693
}
97-
98-
private void OnDestroy()
99-
{
100-
WX.SetStatusBarStyle(
101-
new SetStatusBarStyleOption
102-
{
103-
style = "white",
104-
}
105-
);
106-
}
10794
}

0 commit comments

Comments
 (0)