2using System.Collections.Generic;
68 public List<Item>
items =
new List<Item>();
126 InvokeRepeating(
"Refresh", 0.2f, 0.2f);
200 obj = (EMono._zone.MaxSoil - EMono._zone.GetSoilCost()).ToString();
221 1 => FontColor.Warning,
222 0 => FontColor.Default,
229 public UIItem Add(
Element ele,
string id =
"", Sprite sprite =
null, Func<string> func =
null, Func<FontColor> funcCol =
null, Func<bool> funcShow =
null)
231 UIItem uIItem =
Util.Instantiate(mold, layout);
243 uIItem.image1.sprite = sprite;
247 uIItem.image1.sprite = ele.
GetIcon(
"_m");
249 uIItem.
image1.SetNativeSize();
250 uIItem.text1.skinRoot = base.skinRoot;
251 Shadow component = uIItem.
text1.GetComponent<Shadow>();
254 component.enabled = base.config.skin.BG.textShadow;
265 string text =
item.component.text1.text;
268 if (!
item.id.IsEmpty())
271 if (
item.funcCol !=
null)
273 fontColor =
item.funcCol();
282 text2 = text2 +
" (" + ele.ValueWithoutLink +
")";
294 if (text2 != text ||
item.lastColor != fontColor)
296 item.component.text1.SetText(text2, fontColor);
297 item.component.RebuildLayout();
299 item.lastColor = fontColor;
301 if (
item.funcShow !=
null)
303 item.component.SetActive(
item.funcShow());
308 layout.RebuildLayout();
309 this.RebuildLayout();
318 extra.attributes = a;
321 uIContextMenu.
AddToggle(
"dvpv", extra.
dv, delegate(
bool a)
373 uIContextMenu.
AddToggle(
"godMood", extra.
mood, delegate(
bool a)
381 extra.tourism_value = a;
404 SetBaseContextMenu(m);
ElementContainerCard elements
int GetCurrency(string id="money")
ElementContainer tempElements
static FactionBranch Branch
List< Element > ListElements(Func< Element, bool > shoudList=null, Comparison< Element > comparison=null)
Element GetElement(string alias)
virtual Sprite GetIcon(string suffix="")
int GetNextExp(int _lv=-1)
int CountMinions(Chara c)
int GetElectricity(bool cost=false)