2using System.Collections.Generic;
66 public List<Item>
items =
new List<Item>();
122 InvokeRepeating(
"Refresh", 0.2f, 0.2f);
196 obj = (EMono._zone.MaxSoil - EMono._zone.GetSoilCost()).ToString();
213 1 => FontColor.Warning,
214 0 => FontColor.Default,
221 public UIItem Add(
Element ele,
string id =
"", Sprite sprite =
null, Func<string> func =
null, Func<FontColor> funcCol =
null, Func<bool> funcShow =
null)
223 UIItem uIItem =
Util.Instantiate(mold, layout);
235 uIItem.image1.sprite = sprite;
239 uIItem.image1.sprite = ele.
GetIcon(
"_m");
241 uIItem.
image1.SetNativeSize();
242 uIItem.text1.skinRoot = base.skinRoot;
243 Shadow component = uIItem.
text1.GetComponent<Shadow>();
246 component.enabled = base.config.skin.BG.textShadow;
257 string text =
item.component.text1.text;
260 if (!
item.id.IsEmpty())
263 if (
item.funcCol !=
null)
265 fontColor =
item.funcCol();
274 text2 = text2 +
" (" + ele.ValueWithoutLink +
")";
286 if (text2 != text ||
item.lastColor != fontColor)
288 item.component.text1.SetText(text2, fontColor);
289 item.component.RebuildLayout();
291 item.lastColor = fontColor;
293 if (
item.funcShow !=
null)
295 item.component.SetActive(
item.funcShow());
300 layout.RebuildLayout();
301 this.RebuildLayout();
310 extra.attributes = a;
313 uIContextMenu.
AddToggle(
"dvpv", extra.
dv, delegate(
bool a)
365 uIContextMenu.
AddToggle(
"godMood", extra.
mood, delegate(
bool a)
373 extra.tourism_value = a;
391 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)