Skip to content

Commit 3798de9

Browse files
committed
修改排版
1 parent 9a8ef78 commit 3798de9

File tree

2 files changed

+25
-23
lines changed

2 files changed

+25
-23
lines changed

Demo/API_V2/Assets/API/Render/ToTempFilePath/ToTempFilePath.cs

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public class ToTempFilePath : Details
88
{
99
protected override void TestAPI(string[] args)
1010
{
11-
if (args[8] == "同步执行")
11+
if (args[0] == "同步执行")
1212
{
1313
LoadCanvasToTempFilePathSync();
1414
}
@@ -21,14 +21,14 @@ protected override void TestAPI(string[] args)
2121
// 异步
2222
private void LoadCanvasToTempFilePath()
2323
{// 根据options数组的索引获取值
24-
float x = GetOptionValue(0);
25-
float y = GetOptionValue(1);
26-
float width = GetOptionValue(2);
27-
float height = GetOptionValue(3);
28-
float destWidth = GetOptionValue(4);
29-
float destHeight = GetOptionValue(5);
30-
string fileType = GetOptionString(6, "png");
31-
float quality = GetOptionValue(7);
24+
float x = GetOptionValue(1);
25+
float y = GetOptionValue(2);
26+
float width = GetOptionValue(3);
27+
float height = GetOptionValue(4);
28+
float destWidth = GetOptionValue(5);
29+
float destHeight = GetOptionValue(6);
30+
string fileType = GetOptionString(7, "png");
31+
float quality = GetOptionValue(8);
3232

3333
string optionsInfo = $"当前参数值:\nx={x}\ny={y}\nwidth={width}\nheight={height}\ndestWidth={destWidth}\ndestHeight={destHeight}\nfileType={fileType}\nquality={quality}";
3434

@@ -48,8 +48,9 @@ private void LoadCanvasToTempFilePath()
4848
WX.ShowModal(new ShowModalOption()
4949
{
5050
title = "截图成功(异步)",
51-
content = $"{optionsInfo}\n\n临时文件路径:{result.tempFilePath}",
51+
content = $"{optionsInfo}\n\n临时文件路径:\n{result.tempFilePath}",
5252
showCancel = false,
53+
confirmText = "展示截图",
5354
success = (res) =>
5455
{
5556
WX.PreviewMedia(new PreviewMediaOption()
@@ -89,14 +90,14 @@ private void LoadCanvasToTempFilePathSync()
8990
{
9091

9192
// 根据options数组的索引获取值
92-
float x = GetOptionValue(0);
93-
float y = GetOptionValue(1);
94-
float width = GetOptionValue(2);
95-
float height = GetOptionValue(3);
96-
float destWidth = GetOptionValue(4);
97-
float destHeight = GetOptionValue(5);
98-
string fileType = GetOptionString(6, "png");
99-
float quality = GetOptionValue(7);
93+
float x = GetOptionValue(1);
94+
float y = GetOptionValue(2);
95+
float width = GetOptionValue(3);
96+
float height = GetOptionValue(4);
97+
float destWidth = GetOptionValue(5);
98+
float destHeight = GetOptionValue(6);
99+
string fileType = GetOptionString(7, "png");
100+
float quality = GetOptionValue(8);
100101

101102
string optionsInfo = $"当前参数值:\nx={x}\ny={y}\nwidth={width}\nheight={height}\ndestWidth={destWidth}\ndestHeight={destHeight}\nfileType={fileType}\nquality={quality}";
102103

@@ -115,8 +116,9 @@ private void LoadCanvasToTempFilePathSync()
115116
WX.ShowModal(new ShowModalOption()
116117
{
117118
title = "截图成功(同步)",
118-
content = $"{optionsInfo}\n\n临时文件路径:{tempFilePath}",
119+
content = $"{optionsInfo}\n\n临时文件路径:\n{tempFilePath}",
119120
showCancel = false,
121+
confirmText = "展示截图",
120122
success = (res) =>
121123
{
122124
WX.PreviewMedia(new PreviewMediaOption()

Demo/API_V2/Assets/API/Render/ToTempFilePath/ToTempFilePathSO.asset

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ MonoBehaviour:
1717
entryAPI: Canvas.toTempFilePath
1818
entryDescription: "\u5C06\u5F53\u524D Canvas \u4FDD\u5B58\u4E3A\u4E00\u4E2A\u4E34\u65F6\u6587\u4EF6\u3002"
1919
optionList:
20+
- optionName: "\u6267\u884C\u65B9\u5F0F"
21+
availableOptions:
22+
- "\u540C\u6B65\u6267\u884C"
23+
- "\u5F02\u6B65\u6267\u884C"
2024
- optionName: x
2125
availableOptions:
2226
- 0
@@ -48,10 +52,6 @@ MonoBehaviour:
4852
- optionName: quality
4953
availableOptions:
5054
- 1.0
51-
- optionName: "\u6267\u884C\u65B9\u5F0F"
52-
availableOptions:
53-
- "\u540C\u6B65\u6267\u884C"
54-
- "\u5F02\u6B65\u6267\u884C"
5555
initialButtonText: "\u8FD0\u884C\u622A\u56FE"
5656
extraButtonList: []
5757
initialResultList: []

0 commit comments

Comments
 (0)