14 return EMono.scene.actionMode;
24 return EMono.screen.tileSelector;
31 this.moldDynamic = this.layoutDynamic.CreateMold(
null);
32 this.oriPos = this.Rect().anchoredPosition;
38 if (this.mode ==
null)
42 bool flag = EMono.core.IsGameStarted && this.mode.ShowActionHint;
43 base.gameObject.SetActive(flag);
48 this.extra.SetActive(
true);
49 bool digRamp = this.mode == ActionMode.Dig && ActionMode.Dig.mode ==
TaskDig.Mode.Ramp;
50 bool mineRamp = this.mode == ActionMode.Mine && ActionMode.Mine.mode ==
TaskMine.Mode.Ramp;
51 this.groupRadio.SetActive(digRamp | mineRamp);
52 if (digRamp | mineRamp)
54 this.groupRadio.Init(0, delegate(
int a)
60 ActionMode.Dig.ramp = 3;
64 ActionMode.Dig.ramp = 4;
68 ActionMode.Dig.ramp = 5;
76 ActionMode.Mine.ramp = 3;
80 ActionMode.Mine.ramp = 4;
84 ActionMode.Mine.ramp = 5;
89 this.groupRadio.ToggleInteractable(
true);
92 this.layoutDynamic.DestroyChildren(
false,
true);
93 this.groupToggle.SetActive(this.dynamic);
98 public void AddToggle(
string lang,
bool on, Action<bool> action)
100 UIButton uibutton = Util.Instantiate<UIButton>(this.moldDynamic, this.layoutDynamic);
101 uibutton.mainText.SetText(lang.lang());
102 uibutton.SetToggle(on, action);
107 public void UpdateText()
109 string hintText = this.mode.GetHintText();
110 base.gameObject.SetActive(
EMono.scene.actionMode.ShowActionHint && !hintText.IsEmpty());
111 this.SetText(hintText,
false);
113 this.buttonPick.SetOnClick(delegate
120 public void Show(
string lang,
bool icon =
true)
122 string text = lang.lang();
123 bool anime = text != this.lastText || !base.gameObject.activeSelf;
124 this.lastText = text;
125 this.iconNerun.SetActive(
false);
126 base.gameObject.SetActive(
true);
127 this.buttonPick.SetActive(
false);
128 this.extra.SetActive(
false);
129 this.SetText(text, anime);
133 public void SetText(
string s,
bool anime =
false)
135 this.Rect().anchoredPosition = this.oriPos;
136 this.textTitle.SetText(s);
137 this.RebuildLayout(
false);
140 this.animePop.Play(base.transform,
null, -1f, 0f);
145 public Transform extra;
148 public LayoutGroup layoutDynamic;
151 public UIText textTitle;
154 public UIText textDetail;
157 public UIButton buttonPick;
160 public UIButton buttonSavePartialMap;
163 public UIButton buttonDeletePartialMap;
166 public UISelectableGroup groupRadio;
169 public UISelectableGroup groupToggle;
172 public Anime animePop;
175 public Image iconNerun;
178 public CanvasGroup cg;
185 private UIButton moldDynamic;
188 private Vector3 oriPos;
191 private string lastText;