Survivalcraft API 1.8.2.3 v1.8.2.3
Survivalcraft 2.4
载入中...
搜索中...
未找到
BusyDialog.cs
浏览该文件的文档.
1using System.Xml.Linq;
2
3namespace Game {
4 public class BusyDialog : Dialog {
6
8
9 public string LargeMessage {
10 get => m_largeLabelWidget.Text;
11 set {
12 m_largeLabelWidget.Text = value ?? string.Empty;
13 m_largeLabelWidget.IsVisible = !string.IsNullOrEmpty(value);
14 }
15 }
16
17 public string SmallMessage {
18 get => m_smallLabelWidget.Text;
19 set {
20 m_smallLabelWidget.Text = value ?? string.Empty;
21 m_smallLabelWidget.IsVisible = !string.IsNullOrEmpty(value);
22 }
23 }
24
25 public BusyDialog(string largeMessage, string smallMessage) {
26 XElement node = ContentManager.Get<XElement>("Dialogs/BusyDialog");
27 LoadContents(this, node);
28 m_largeLabelWidget = Children.Find<LabelWidget>("BusyDialog.LargeLabel");
29 m_smallLabelWidget = Children.Find<LabelWidget>("BusyDialog.SmallLabel");
30 LargeMessage = largeMessage;
31 SmallMessage = smallMessage;
32 }
33
34 public override void Update() {
35 if (Input.Back) {
36 Input.Clear();
37 }
38 }
39 }
40}
BusyDialog(string largeMessage, string smallMessage)
LabelWidget m_smallLabelWidget
override void Update()
LabelWidget m_largeLabelWidget
readonly WidgetsList Children
static object Get(Type type, string name)
virtual void LoadContents(object eventsTarget, XElement node)