protected override void OnPrefabInit() { base.OnPrefabInit(); added.GetComponent <ToolTip>().OnToolTip = OnPositiveNoteTooltip; removed.GetComponent <ToolTip>().OnToolTip = OnNegativeNoteTooltip; net.GetComponent <ToolTip>().OnToolTip = OnNetNoteTooltip; name.GetComponent <ToolTip>().OnToolTip = OnNetNoteTooltip; }
private void Initialize(List <Event> events) { foreach (Event @event in events) { Event current = @event; HierarchyReferences hierarchyReferences = Util.KInstantiateUI <HierarchyReferences>(entryPrefab, entryParent.gameObject, true); LocText reference = hierarchyReferences.GetReference <LocText>("Title"); LocText reference2 = hierarchyReferences.GetReference <LocText>("Description"); KButton reference3 = hierarchyReferences.GetReference <KButton>("Details"); Event.GetUIStrings(current.event_type, out string title, out string title_tooltip); reference.text = title; reference.GetComponent <ToolTip>().toolTip = title_tooltip; reference2.text = current.mod.title; ToolTip component = reference2.GetComponent <ToolTip>(); if ((Object)component != (Object)null) { component.toolTip = current.mod.ToString(); } reference3.isInteractable = false; Mod mod = Global.Instance.modManager.FindMod(current.mod); if (mod != null) { if ((Object)component != (Object)null && !string.IsNullOrEmpty(mod.description)) { component.toolTip = mod.description; } if (mod.on_managed != null) { reference3.onClick += mod.on_managed; reference3.isInteractable = true; } } } }
public static void Postfix(ManagementMenu.ScreenData screenData, ManagementMenu __instance) { KIconToggleMenu.ToggleInfo researchInfo = Traverse.Create(__instance).Field("researchInfo").GetValue <KIconToggleMenu.ToggleInfo>(); ManagementMenu.ScreenData activeScreen = Traverse.Create(__instance).Field("activeScreen").GetValue <ManagementMenu.ScreenData>(); if (screenData.toggleInfo == researchInfo && activeScreen == screenData) { RequirementFunctions.CountResourcesInReservoirs(); ResearchScreen researchScreen = (ResearchScreen)ManagementMenu.Instance.researchScreen; Dictionary <Tech, ResearchEntry> entryMap = Traverse.Create(researchScreen).Field("entryMap").GetValue <Dictionary <Tech, ResearchEntry> >(); foreach (Tech tech in entryMap.Keys) { if (!tech.IsComplete()) { LocText researchName = Traverse.Create(entryMap[tech]).Field("researchName").GetValue <LocText>(); if (!TechRequirements.Instance.HasTechReq(tech.Id)) { continue; } researchName.GetComponent <ToolTip>().toolTip = CreateTechTooltipText(tech); } } } /*else if (screenData.toggleInfo == researchInfo && activeScreen != screenData) * Debug.Log("ResearchRequirements: Research closed"); * else * Debug.Log("ResearchRequirements: Other screen toogled");*/ }
public void Initialize(object widget_id, IList <GroupSelectorWidget.ItemData> options, ItemCallbacks item_callbacks) { widgetID = widget_id; this.options = options; itemCallbacks = item_callbacks; if (itemCallbacks.getTitleHoverText != null) { label.GetComponent <ToolTip>().OnToolTip = (() => itemCallbacks.getTitleHoverText(widget_id)); } bool adding_item = true; addItemButton.onClick += delegate { RebuildSubPanel(addItemButton.transform.GetPosition(), (object widget_go) => itemCallbacks.getHeaderButtonOptions(widget_go, adding_item), itemCallbacks.onItemAdded, (object widget_go, object item_data) => itemCallbacks.getItemHoverText(widget_go, adding_item, item_data)); }; bool adding_item2 = false; removeItemButton.onClick += delegate { RebuildSubPanel(removeItemButton.transform.GetPosition(), (object widget_go) => itemCallbacks.getHeaderButtonOptions(widget_go, adding_item2), itemCallbacks.onItemRemoved, (object widget_go, object item_data) => itemCallbacks.getItemHoverText(widget_go, adding_item2, item_data)); }; sortButton.onClick += delegate { RebuildSubPanel(sortButton.transform.GetPosition(), itemCallbacks.getValidSortOptionIndices, delegate(object item_data) { itemCallbacks.onSort(widgetID, item_data); }, (object widget_go, object item_data) => itemCallbacks.getSortHoverText(item_data)); }; if (itemCallbacks.getTitleButtonHoverText != null) { addItemButton.GetComponent <ToolTip>().OnToolTip = (() => itemCallbacks.getTitleButtonHoverText(widget_id, true)); removeItemButton.GetComponent <ToolTip>().OnToolTip = (() => itemCallbacks.getTitleButtonHoverText(widget_id, false)); } }
private void Rebuild() { if ((UnityEngine.Object)controller == (UnityEngine.Object)null) { controller = GetComponentInChildren <KBatchedAnimController>(); if ((UnityEngine.Object)controller == (UnityEngine.Object)null) { if ((UnityEngine.Object)targetImage != (UnityEngine.Object)null) { targetImage.enabled = true; } Debug.LogWarning("Controller for [" + base.name + "] null"); return; } } SetPortraitData(identityObject, controller, useDefaultExpression); if (useLabels && (UnityEngine.Object)duplicantName != (UnityEngine.Object)null) { duplicantName.SetText((identityObject == null) ? string.Empty : identityObject.GetProperName()); if (identityObject is MinionIdentity && (UnityEngine.Object)duplicantJob != (UnityEngine.Object)null) { duplicantJob.SetText((identityObject == null) ? string.Empty : (identityObject as MinionIdentity).GetComponent <MinionResume>().GetSkillsSubtitle()); duplicantJob.GetComponent <ToolTip>().toolTip = (identityObject as MinionIdentity).GetComponent <MinionResume>().GetSkillsSubtitle(); } } }
public override void Refresh() { base.Refresh(); rationsEatenToday.text = GameUtil.GetFormattedCalories(rationMonitor.GetRationsAteToday(), GameUtil.TimeSlice.None, true); if (!((Object)identity == (Object)null)) { Amounts amounts = identity.GetAmounts(); foreach (AmountInstance item in amounts) { float min = item.GetMin(); float max = item.GetMax(); float num = max - min; float num2 = (num - (max - item.value)) / num; string str = Mathf.RoundToInt(num2 * 100f).ToString(); if (item.amount == Db.Get().Amounts.Stress) { currentStressText.text = item.GetValueString(); currentStressText.GetComponent <ToolTip>().toolTip = item.GetTooltip(); stressTrendImage.SetValue(item); } else if (item.amount == Db.Get().Amounts.Calories) { currentCaloriesText.text = str + "%"; currentCaloriesText.GetComponent <ToolTip>().toolTip = item.GetTooltip(); } else if (item.amount == Db.Get().Amounts.HitPoints) { currentHealthText.text = str + "%"; currentHealthText.GetComponent <ToolTip>().toolTip = item.GetTooltip(); } } } }
public void SetLine(ReportManager.ReportGroup reportGroup) { LayoutElement component = name.GetComponent <LayoutElement>(); float num3 = component.minWidth = (component.preferredWidth = nameWidth); spacer.minWidth = groupSpacerWidth; name.text = reportGroup.stringKey; }
private void RefreshNotes() { blockTypeCounts.Clear(); foreach (ScheduleBlockType resource in Db.Get().ScheduleBlockTypes.resources) { blockTypeCounts[resource.Id] = 0; } foreach (ScheduleBlock block in schedule.GetBlocks()) { foreach (ScheduleBlockType allowed_type in block.allowed_types) { Dictionary <string, int> dictionary; string id; (dictionary = blockTypeCounts)[id = allowed_type.Id] = dictionary[id] + 1; } } ToolTip component = noteEntryRight.GetComponent <ToolTip>(); component.ClearMultiStringTooltip(); int num = 0; foreach (KeyValuePair <string, int> blockTypeCount in blockTypeCounts) { if (blockTypeCount.Value == 0) { num++; component.AddMultiStringTooltip(string.Format(UI.SCHEDULEGROUPS.NOTIME, Db.Get().ScheduleBlockTypes.Get(blockTypeCount.Key).Name), null); } } if (num > 0) { noteEntryRight.text = string.Format(UI.SCHEDULEGROUPS.MISSINGBLOCKS, num); } else { noteEntryRight.text = string.Empty; } int numBlocks = blockTypeCounts[Db.Get().ScheduleBlockTypes.Recreation.Id]; string breakBonus = QualityOfLifeNeed.GetBreakBonus(numBlocks); if (breakBonus != null) { Effect effect = Db.Get().effects.Get(breakBonus); if (effect != null) { foreach (AttributeModifier selfModifier in effect.SelfModifiers) { if (selfModifier.AttributeId == Db.Get().Attributes.QualityOfLife.Id) { noteEntryLeft.text = string.Format(UI.SCHEDULESCREEN.DOWNTIME_MORALE, selfModifier.GetFormattedString(null)); noteEntryLeft.GetComponent <ToolTip>().SetSimpleTooltip(string.Format(UI.SCHEDULESCREEN.SCHEDULE_DOWNTIME_MORALE, selfModifier.GetFormattedString(null))); } } } } }
public LogicSettingUIInfo(LocText prefab, LogicLabelSetting logicSettingDispComp) { logicSettingDisplay = logicSettingDispComp; cachedLocText = prefab; prefab.transform.position = logicSettingDisplay.position + LabelPrefab.offset; var rectTransform = prefab.GetComponent <RectTransform>(); rectTransform.sizeDelta = logicSettingDisplay.sizeDelta * rectTransform.InverseLocalScale(); prefab.gameObject.SetActive(true); }
/// <summary> /// Applied after SetTech runs. /// </summary> internal static void Postfix(LocText ___researchName, Tech newTech) { if (newTech != null && ___researchName != null) { var tooltip = ___researchName.GetComponent <ToolTip>(); if (tooltip != null) { // Append to existing tooltip string text = tooltip.GetMultiString(0); string keyCode = GameUtil.GetKeycodeLocalized(KKeyCode.LeftShift) ?? "SHIFT"; tooltip.SetSimpleTooltip(text + "\r\n\r\n" + ResearchQueueStrings. QueueTooltip.text.F(keyCode)); } } }
public static void Postfix(ManagementMenu.ScreenData screenData, ManagementMenu __instance) { KIconToggleMenu.ToggleInfo researchInfo = Traverse.Create(__instance).Field("researchInfo").GetValue <KIconToggleMenu.ToggleInfo>(); ManagementMenu.ScreenData activeScreen = Traverse.Create(__instance).Field("activeScreen").GetValue <ManagementMenu.ScreenData>(); if (screenData.toggleInfo == researchInfo && activeScreen == screenData) { RequirementFunctions.CountResourcesInReservoirs(); ResearchScreen researchScreen = Traverse.Create(ManagementMenu.Instance).Field("researchScreen").GetValue <ResearchScreen>(); if (researchScreen == null) { return; } Dictionary <Tech, ResearchEntry> entryMap = Traverse.Create(researchScreen).Field("entryMap").GetValue <Dictionary <Tech, ResearchEntry> >(); foreach (Tech tech in entryMap.Keys) { if (!tech.IsComplete()) { LocText researchName = Traverse.Create(entryMap[tech]).Field("researchName").GetValue <LocText>(); researchName.GetComponent <ToolTip>().toolTip = CreateTechTooltipText(tech); } } } }
private void SetInfoText() { traitEntries.ForEach(delegate(GameObject tl) { UnityEngine.Object.Destroy(tl.gameObject); }); traitEntries.Clear(); characterNameTitle.SetTitle(stats.Name); for (int i = 1; i < stats.Traits.Count; i++) { Trait trait = stats.Traits[i]; LocText locText = (!trait.PositiveTrait) ? badTrait : goodTrait; LocText locText2 = Util.KInstantiateUI <LocText>(locText.gameObject, locText.transform.parent.gameObject, false); locText2.gameObject.SetActive(true); locText2.text = stats.Traits[i].Name; locText2.color = ((!trait.PositiveTrait) ? Constants.NEGATIVE_COLOR : Constants.POSITIVE_COLOR); locText2.GetComponent <ToolTip>().SetSimpleTooltip(trait.description); for (int num = 0; num < trait.SelfModifiers.Count; num++) { GameObject gameObject = Util.KInstantiateUI(attributeLabelTrait.gameObject, locText.transform.parent.gameObject, false); gameObject.SetActive(true); LocText componentInChildren = gameObject.GetComponentInChildren <LocText>(); string format = (!(trait.SelfModifiers[num].Value > 0f)) ? UI.CHARACTERCONTAINER_ATTRIBUTEMODIFIER_DECREASED : UI.CHARACTERCONTAINER_ATTRIBUTEMODIFIER_INCREASED; componentInChildren.text = string.Format(format, Strings.Get("STRINGS.DUPLICANTS.ATTRIBUTES." + trait.SelfModifiers[num].AttributeId.ToUpper() + ".NAME")); if (!(trait.SelfModifiers[num].AttributeId == "GermResistance")) { goto IL_01bd; } goto IL_01bd; IL_01bd: Klei.AI.Attribute attribute = Db.Get().Attributes.Get(trait.SelfModifiers[num].AttributeId); string text = attribute.Description; string text2 = text; text = text2 + "\n\n" + Strings.Get("STRINGS.DUPLICANTS.ATTRIBUTES." + trait.SelfModifiers[num].AttributeId.ToUpper() + ".NAME") + ": " + trait.SelfModifiers[num].GetFormattedString(null); List <AttributeConverter> convertersForAttribute = Db.Get().AttributeConverters.GetConvertersForAttribute(attribute); for (int j = 0; j < convertersForAttribute.Count; j++) { string text3 = convertersForAttribute[j].DescriptionFromAttribute(convertersForAttribute[j].multiplier * trait.SelfModifiers[num].Value, null); if (text3 != string.Empty) { text = text + "\n • " + text3; } } componentInChildren.GetComponent <ToolTip>().SetSimpleTooltip(text); traitEntries.Add(gameObject); } if (trait.disabledChoreGroups != null) { GameObject gameObject2 = Util.KInstantiateUI(attributeLabelTrait.gameObject, locText.transform.parent.gameObject, false); gameObject2.SetActive(true); LocText componentInChildren2 = gameObject2.GetComponentInChildren <LocText>(); componentInChildren2.text = trait.GetDisabledChoresString(false); string text4 = string.Empty; string text5 = string.Empty; for (int k = 0; k < trait.disabledChoreGroups.Length; k++) { if (k > 0) { text4 += ", "; text5 += "\n"; } text4 += trait.disabledChoreGroups[k].Name; text5 += trait.disabledChoreGroups[k].description; } componentInChildren2.GetComponent <ToolTip>().SetSimpleTooltip(string.Format(DUPLICANTS.TRAITS.CANNOT_DO_TASK_TOOLTIP, text4, text5)); traitEntries.Add(gameObject2); } if (trait.ignoredEffects != null && trait.ignoredEffects.Length > 0) { GameObject gameObject3 = Util.KInstantiateUI(attributeLabelTrait.gameObject, locText.transform.parent.gameObject, false); gameObject3.SetActive(true); LocText componentInChildren3 = gameObject3.GetComponentInChildren <LocText>(); componentInChildren3.text = trait.GetIgnoredEffectsString(false); string text6 = string.Empty; string text7 = string.Empty; for (int l = 0; l < trait.ignoredEffects.Length; l++) { if (l > 0) { text6 += ", "; text7 += "\n"; } text6 += Strings.Get("STRINGS.DUPLICANTS.MODIFIERS." + trait.ignoredEffects[l].ToUpper() + ".NAME"); text7 += Strings.Get("STRINGS.DUPLICANTS.MODIFIERS." + trait.ignoredEffects[l].ToUpper() + ".CAUSE"); } componentInChildren3.GetComponent <ToolTip>().SetSimpleTooltip(string.Format(DUPLICANTS.TRAITS.IGNORED_EFFECTS_TOOLTIP, text6, text7)); traitEntries.Add(gameObject3); } if (Strings.TryGet("STRINGS.DUPLICANTS.TRAITS." + trait.Id.ToUpper() + ".SHORT_DESC", out StringEntry result)) { GameObject gameObject4 = Util.KInstantiateUI(attributeLabelTrait.gameObject, locText.transform.parent.gameObject, false); gameObject4.SetActive(true); LocText componentInChildren4 = gameObject4.GetComponentInChildren <LocText>(); componentInChildren4.text = result.String; componentInChildren4.GetComponent <ToolTip>().SetSimpleTooltip(Strings.Get("STRINGS.DUPLICANTS.TRAITS." + trait.Id.ToUpper() + ".SHORT_DESC_TOOLTIP")); traitEntries.Add(gameObject4); } traitEntries.Add(locText2.gameObject); } aptitudeEntries.ForEach(delegate(GameObject al) { UnityEngine.Object.Destroy(al.gameObject); }); aptitudeEntries.Clear(); expectationLabels.ForEach(delegate(LocText el) { UnityEngine.Object.Destroy(el.gameObject); }); expectationLabels.Clear(); foreach (KeyValuePair <SkillGroup, float> skillAptitude in stats.skillAptitudes) { if (skillAptitude.Value != 0f) { SkillGroup skillGroup = Db.Get().SkillGroups.Get(skillAptitude.Key.IdHash); if (skillGroup == null) { Debug.LogWarningFormat("Role group not found for aptitude: {0}", skillAptitude.Key); } else { GameObject gameObject5 = Util.KInstantiateUI(aptitudeEntry.gameObject, aptitudeEntry.transform.parent.gameObject, false); LocText locText3 = Util.KInstantiateUI <LocText>(aptitudeLabel.gameObject, gameObject5, false); locText3.gameObject.SetActive(true); locText3.text = skillGroup.Name; string empty = string.Empty; if (skillGroup.choreGroupID != string.Empty) { ChoreGroup choreGroup = Db.Get().ChoreGroups.Get(skillGroup.choreGroupID); empty = string.Format(DUPLICANTS.ROLES.GROUPS.APTITUDE_DESCRIPTION_CHOREGROUP, skillGroup.Name, DUPLICANTSTATS.APTITUDE_BONUS, choreGroup.description); } else { empty = string.Format(DUPLICANTS.ROLES.GROUPS.APTITUDE_DESCRIPTION, skillGroup.Name, DUPLICANTSTATS.APTITUDE_BONUS); } locText3.GetComponent <ToolTip>().SetSimpleTooltip(empty); float num2 = (float)DUPLICANTSTATS.APTITUDE_ATTRIBUTE_BONUSES[stats.skillAptitudes.Count - 1]; LocText locText4 = Util.KInstantiateUI <LocText>(attributeLabelAptitude.gameObject, gameObject5, false); locText4.gameObject.SetActive(true); locText4.text = "+" + num2 + " " + skillAptitude.Key.relevantAttributes[0].Name; string text8 = skillAptitude.Key.relevantAttributes[0].Description; string text2 = text8; text8 = text2 + "\n\n" + skillAptitude.Key.relevantAttributes[0].Name + ": +" + DUPLICANTSTATS.APTITUDE_ATTRIBUTE_BONUSES[stats.skillAptitudes.Count - 1]; List <AttributeConverter> convertersForAttribute2 = Db.Get().AttributeConverters.GetConvertersForAttribute(skillAptitude.Key.relevantAttributes[0]); for (int m = 0; m < convertersForAttribute2.Count; m++) { text8 = text8 + "\n • " + convertersForAttribute2[m].DescriptionFromAttribute(convertersForAttribute2[m].multiplier * num2, null); } locText4.GetComponent <ToolTip>().SetSimpleTooltip(text8); gameObject5.gameObject.SetActive(true); aptitudeEntries.Add(gameObject5); } } } if (stats.stressTrait != null) { LocText locText5 = Util.KInstantiateUI <LocText>(expectationRight.gameObject, expectationRight.transform.parent.gameObject, false); locText5.gameObject.SetActive(true); locText5.text = string.Format(UI.CHARACTERCONTAINER_STRESSTRAIT, stats.stressTrait.Name); locText5.GetComponent <ToolTip>().SetSimpleTooltip(stats.stressTrait.GetTooltip()); expectationLabels.Add(locText5); } if (stats.congenitaltrait != null) { LocText locText6 = Util.KInstantiateUI <LocText>(expectationRight.gameObject, expectationRight.transform.parent.gameObject, false); locText6.gameObject.SetActive(true); locText6.text = string.Format(UI.CHARACTERCONTAINER_CONGENITALTRAIT, stats.congenitaltrait.Name); locText6.GetComponent <ToolTip>().SetSimpleTooltip(stats.congenitaltrait.GetTooltip()); expectationLabels.Add(locText6); } description.text = stats.personality.description; }
public void Refresh() { if (!((UnityEngine.Object)selectedEntity == (UnityEngine.Object)null) && !((UnityEngine.Object)selectedEntity.gameObject == (UnityEngine.Object)null)) { Amounts amounts = selectedEntity.GetAmounts(); Attributes attributes = selectedEntity.GetAttributes(); if (amounts != null && attributes != null) { WiltCondition component = selectedEntity.GetComponent <WiltCondition>(); if ((UnityEngine.Object)component == (UnityEngine.Object)null) { conditionsContainerNormal.gameObject.SetActive(false); conditionsContainerAdditional.gameObject.SetActive(false); foreach (AmountLine amountsLine in amountsLines) { AmountLine current = amountsLine; bool flag = current.TryUpdate(amounts); if (current.go.activeSelf != flag) { current.go.SetActive(flag); } } foreach (AttributeLine attributesLine in attributesLines) { AttributeLine current2 = attributesLine; bool flag2 = current2.TryUpdate(attributes); if (current2.go.activeSelf != flag2) { current2.go.SetActive(flag2); } } } bool flag3 = false; for (int i = 0; i < checkboxLines.Count; i++) { CheckboxLine checkboxLine = checkboxLines[i]; CheckboxLineDisplayType checkboxLineDisplayType = CheckboxLineDisplayType.Hidden; CheckboxLine checkboxLine2 = checkboxLines[i]; if (checkboxLine2.amount != null) { for (int j = 0; j < amounts.Count; j++) { AmountInstance amountInstance = amounts[j]; if (checkboxLine.amount == amountInstance.amount) { checkboxLineDisplayType = checkboxLine.display_condition(selectedEntity.gameObject); break; } } } else { checkboxLineDisplayType = checkboxLine.display_condition(selectedEntity.gameObject); } if (checkboxLineDisplayType != CheckboxLineDisplayType.Hidden) { checkboxLine.locText.SetText(checkboxLine.label_text_func(selectedEntity.gameObject)); if (!checkboxLine.go.activeSelf) { checkboxLine.go.SetActive(true); } GameObject gameObject = checkboxLine.go.GetComponent <HierarchyReferences>().GetReference("Check").gameObject; gameObject.SetActive(checkboxLine.get_value(selectedEntity.gameObject)); if ((UnityEngine.Object)checkboxLine.go.transform.parent != (UnityEngine.Object)checkboxLine.parentContainer) { checkboxLine.go.transform.SetParent(checkboxLine.parentContainer); checkboxLine.go.transform.localScale = Vector3.one; } if ((UnityEngine.Object)checkboxLine.parentContainer == (UnityEngine.Object)conditionsContainerAdditional) { flag3 = true; } if (checkboxLineDisplayType == CheckboxLineDisplayType.Normal) { if (checkboxLine.get_value(selectedEntity.gameObject)) { checkboxLine.locText.color = Color.black; gameObject.transform.parent.GetComponent <Image>().color = Color.black; } else { Color color = new Color(0.992156863f, 0f, 0.101960786f); checkboxLine.locText.color = color; gameObject.transform.parent.GetComponent <Image>().color = color; } } else { checkboxLine.locText.color = Color.grey; gameObject.transform.parent.GetComponent <Image>().color = Color.grey; } } else if (checkboxLine.go.activeSelf) { checkboxLine.go.SetActive(false); } } if ((UnityEngine.Object)component != (UnityEngine.Object)null) { Growing component2 = component.GetComponent <Growing>(); bool flag4 = component.HasTag(GameTags.Decoration); conditionsContainerNormal.gameObject.SetActive(true); conditionsContainerAdditional.gameObject.SetActive(!flag4); if ((UnityEngine.Object)component2 == (UnityEngine.Object)null) { float num = 1f; LocText reference = conditionsContainerNormal.GetComponent <HierarchyReferences>().GetReference <LocText>("Label"); reference.text = string.Empty; reference.text = ((!flag4) ? string.Format(UI.VITALSSCREEN.CONDITIONS_GROWING.WILD_INSTANT.BASE, Util.FormatTwoDecimalPlace(num * 0.25f * 100f)) : string.Format(UI.VITALSSCREEN.CONDITIONS_GROWING.WILD_DECOR.BASE)); reference.GetComponent <ToolTip>().SetSimpleTooltip(string.Format(UI.VITALSSCREEN.CONDITIONS_GROWING.WILD_INSTANT.TOOLTIP)); reference = conditionsContainerAdditional.GetComponent <HierarchyReferences>().GetReference <LocText>("Label"); reference.color = ((!selectedEntity.GetComponent <ReceptacleMonitor>().Replanted) ? Color.grey : Color.black); reference.text = string.Empty; reference.text = string.Format(UI.VITALSSCREEN.CONDITIONS_GROWING.ADDITIONAL_DOMESTIC_INSTANT.BASE, Util.FormatTwoDecimalPlace(num * 100f)); reference.GetComponent <ToolTip>().SetSimpleTooltip(string.Format(UI.VITALSSCREEN.CONDITIONS_GROWING.ADDITIONAL_DOMESTIC_INSTANT.TOOLTIP)); } else { LocText reference = conditionsContainerNormal.GetComponent <HierarchyReferences>().GetReference <LocText>("Label"); reference.text = string.Empty; reference.text = string.Format(UI.VITALSSCREEN.CONDITIONS_GROWING.WILD.BASE, GameUtil.GetFormattedCycles(component.GetComponent <Growing>().WildGrowthTime(), "F1")); reference.GetComponent <ToolTip>().SetSimpleTooltip(string.Format(UI.VITALSSCREEN.CONDITIONS_GROWING.WILD.TOOLTIP, GameUtil.GetFormattedCycles(component.GetComponent <Growing>().WildGrowthTime(), "F1"))); reference = conditionsContainerAdditional.GetComponent <HierarchyReferences>().GetReference <LocText>("Label"); reference.color = ((!selectedEntity.GetComponent <ReceptacleMonitor>().Replanted) ? Color.grey : Color.black); reference.text = string.Empty; reference.text = ((!flag3) ? string.Format(UI.VITALSSCREEN.CONDITIONS_GROWING.DOMESTIC.BASE, GameUtil.GetFormattedCycles(component.GetComponent <Growing>().DomesticGrowthTime(), "F1")) : string.Format(UI.VITALSSCREEN.CONDITIONS_GROWING.ADDITIONAL_DOMESTIC.BASE, GameUtil.GetFormattedCycles(component.GetComponent <Growing>().DomesticGrowthTime(), "F1"))); reference.GetComponent <ToolTip>().SetSimpleTooltip(string.Format(UI.VITALSSCREEN.CONDITIONS_GROWING.ADDITIONAL_DOMESTIC.TOOLTIP, GameUtil.GetFormattedCycles(component.GetComponent <Growing>().DomesticGrowthTime(), "F1"))); } foreach (AmountLine amountsLine2 in amountsLines) { AmountLine current3 = amountsLine2; current3.go.SetActive(false); } foreach (AttributeLine attributesLine2 in attributesLines) { AttributeLine current4 = attributesLine2; current4.go.SetActive(false); } } } } }