Survivalcraft API 1.8.2.3
v1.8.2.3
Survivalcraft 2.4
载入中...
搜索中...
未找到
LabelWidget.cs
浏览该文件的文档.
1
using
Engine.Media
;
2
3
namespace
Game
{
4
public
class
LabelWidget
:
FontTextWidget
{
5
public
static
BitmapFont
m_bitmapFont
;
6
7
public
static
BitmapFont
BitmapFont
{
8
get
=>
m_bitmapFont
??=
ContentManager
.
Get
<
BitmapFont
>(
"Fonts/Pericles"
);
9
set
=>
m_bitmapFont
= value;
10
}
11
12
public
override
string
Text
{
13
get
=>
m_text
;
14
set
{
15
if
(
m_text
!= value
16
&& value !=
null
) {
17
if
(value.StartsWith(
'['
)
18
&& value.EndsWith(
']'
)) {
19
string
[] xp = value.Substring(1, value.Length - 2).Split(
':'
);
20
m_text
= xp.Length == 2 ?
LanguageControl
.
GetContentWidgets
(xp[0], xp[1]) :
LanguageControl
.
Get
(
"Usual"
, value);
21
}
22
else
{
23
m_text
= value;
24
}
25
m_linesSize
=
null
;
26
}
27
}
28
}
29
30
public
LabelWidget
() =>
Font
=
BitmapFont
;
31
}
32
}
Game.ContentManager
定义
ContentManager.cs:50
Game.ContentManager.Get
static object Get(Type type, string name)
定义
ContentManager.cs:70
Game.FontTextWidget.Font
BitmapFont Font
定义
FontTextWidget.cs:56
Game.FontTextWidget.m_text
string m_text
定义
FontTextWidget.cs:7
Game.FontTextWidget.FontTextWidget
FontTextWidget()
定义
FontTextWidget.cs:123
Game.FontTextWidget.m_linesSize
Vector2? m_linesSize
定义
FontTextWidget.cs:25
Game.LabelWidget.m_bitmapFont
static BitmapFont m_bitmapFont
定义
LabelWidget.cs:5
Game.LabelWidget.Text
override string Text
定义
LabelWidget.cs:12
Game.LabelWidget.LabelWidget
LabelWidget()
定义
LabelWidget.cs:30
Game.LabelWidget.BitmapFont
static BitmapFont BitmapFont
定义
LabelWidget.cs:7
Game.LanguageControl
定义
LanguageControl.cs:8
Game.LanguageControl.GetContentWidgets
static string GetContentWidgets(string name, string prop)
定义
LanguageControl.cs:348
Game.LanguageControl.Get
static string Get(string className, int key)
获取在当前语言类名键对应的字符串
定义
LanguageControl.cs:247
Engine.Media
定义
BitmapFont.cs:5
Game
定义
ContentFileBridge.cs:4
SurvivalcraftApi 1.8.2.3
Survivalcraft.Windows
Widget
LabelWidget.cs
制作者
1.16.1