Survivalcraft API 1.8.2.3 v1.8.2.3
Survivalcraft 2.4
载入中...
搜索中...
未找到
SpawnDialog.cs
浏览该文件的文档.
1using System.Xml.Linq;
2
3namespace Game {
4 public class SpawnDialog : Dialog {
6
8
10
12
13 public float TimeOfYear {
14 set {
15 m_seasonLabelWidget.Text = SubsystemSeasons.GetTimeOfYearName(value);
16 m_seasonLabelWidget.Color = SubsystemSeasons.GetTimeOfYearColor(value);
17 m_progressWidget.LitBarColor = SubsystemSeasons.GetTimeOfYearColor(value);
18 }
19 }
20
21 public string LargeMessage {
22 get => m_largeLabelWidget.Text;
23 set => m_largeLabelWidget.Text = value;
24 }
25
26 public string SmallMessage {
27 get => m_smallLabelWidget.Text;
28 set => m_smallLabelWidget.Text = value;
29 }
30
31 public float Progress {
32 get => m_progressWidget.Value;
33 set => m_progressWidget.Value = value;
34 }
35
36 public SpawnDialog() {
37 XElement node = ContentManager.Get<XElement>("Dialogs/SpawnDialog");
38 LoadContents(this, node);
39 m_seasonLabelWidget = Children.Find<LabelWidget>("SpawnDialog.SeasonLabel");
40 m_largeLabelWidget = Children.Find<LabelWidget>("SpawnDialog.LargeLabel");
41 m_smallLabelWidget = Children.Find<LabelWidget>("SpawnDialog.SmallLabel");
42 m_progressWidget = Children.Find<ValueBarWidget>("SpawnDialog.Progress");
43 }
44 }
45}
readonly WidgetsList Children
static object Get(Type type, string name)
LabelWidget m_smallLabelWidget
ValueBarWidget m_progressWidget
LabelWidget m_largeLabelWidget
LabelWidget m_seasonLabelWidget
static string GetTimeOfYearName(float timeOfYear)
static Color GetTimeOfYearColor(float timeOfYear)
virtual void LoadContents(object eventsTarget, XElement node)