您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
35 行
1.2 KiB
35 行
1.2 KiB
using Unity.UIWidgets.ui;
|
|
|
|
namespace Unity.UIWidgets.rendering {
|
|
public class RenderErrorBox : RenderBox {
|
|
const string _kLine = "\n\n────────────────────\n\n";
|
|
|
|
public RenderErrorBox(string message = "") {
|
|
this.message = message;
|
|
if (message == "") {
|
|
return;
|
|
}
|
|
|
|
ParagraphBuilder builder = new ParagraphBuilder(paragraphStyle);
|
|
builder.pushStyle(textStyle);
|
|
builder.addText(
|
|
$"{message}{_kLine}{message}{_kLine}{message}{_kLine}{message}{_kLine}{message}{_kLine}{message}{_kLine}{message}{_kLine}{message}{_kLine}{message}{_kLine}{message}{_kLine}{message}{_kLine}{message}{_kLine}"
|
|
);
|
|
this._paragraph = builder.build();
|
|
}
|
|
|
|
string message;
|
|
Paragraph _paragraph;
|
|
|
|
static TextStyle textStyle = new TextStyle(
|
|
color: new Color(0xFFFFFF66),
|
|
fontFamily: "monospace",
|
|
fontSize: 14.0,
|
|
fontWeight: FontWeight.w700
|
|
);
|
|
|
|
static ParagraphStyle paragraphStyle = new ParagraphStyle(
|
|
lineHeight: 1.0
|
|
);
|
|
}
|
|
}
|