30 GetComponentInParent<Layer>().RebuildLayout(recursive:
true);
31 this.RebuildLayout(recursive:
true);
44 b.onClick.AddListener(delegate
48 if ((a.Cost > 0 && EClass.Branch.policies.CurrentAP() + a.Cost > EClass.Branch.MaxAP) || !CanActivate(a))
63 EClass.pc.faction.SetGlobalPolicyActive(2705, a.active);
67 EClass.pc.faction.SetGlobalPolicyActive(2708, a.active);
71 EClass.pc.faction.SetGlobalPolicyActive(2710, a.active);
75 EClass.pc.faction.SetGlobalPolicyActive(2711, a.active);
79 EClass.pc.faction.SetGlobalPolicyActive(2712, a.active);
85 b.tooltip.onShowTooltip = delegate(
UITooltip tp)
101 list.GetComponentInChildren<CanvasGroup>().alpha = ((list.items.Count > 0) ? 0.9f : 0.4f);
102 static bool CanActivate(
Policy p)
127 UIList[] array =
new UIList[4] { listPolicyLaw, listPolicyLife, listPolicyEconomy, listUtility };
128 for (
int i = 0; i < array.Length; i++)
130 UIButton[] componentsInChildren = array[i].GetComponentsInChildren<
UIButton>();
131 foreach (
UIButton obj
in componentsInChildren)
134 obj.icon.material = (policy.active ? null : matGrayscale);
if(item3.idFile==idFirstFile &&item3.id==idFirstTopic)
void RefreshPolicyIcons()
override void OnSwitchContent(int idTab)
void RefreshPolicyList(UIList list, string cat, string plan)
static FactionBranch Branch
bool IsActive(int id, int days=-1)
int GetSortVal(UIList.SortMode m)
override void Add(object item)