public void Fill(String objectNote, String userNote) { Single num = m_outerPadding + m_innerPadding; Single num2 = 0f; Boolean flag = !String.IsNullOrEmpty(objectNote); m_objectNote.SetVisible(flag); if (flag) { m_objectNote.UpdatePositionY(-num); m_objectNote.UpdateText(objectNote); num += m_objectNote.Size.y + m_innerPadding; num2 = m_objectNote.Size.x; } Boolean flag2 = !String.IsNullOrEmpty(userNote); m_userNote.SetVisible(flag2); if (flag2) { m_userNote.UpdatePositionY(-num); m_userNote.UpdateText(userNote); num += m_userNote.Size.y + m_innerPadding; num2 = m_userNote.Size.x; } m_background.Scale(num2 + m_outerPadding * 2f, num - m_innerPadding + m_outerPadding); }
public void Fill(String p_caption, String p_description, ESize p_size) { Single num = m_outerPadding + m_innerPadding; Single num2 = 0f; Single horizontalScaleFactor; if (p_size == ESize.SMALL) { horizontalScaleFactor = 0.5f; } else if (p_size == ESize.MEDIUM) { horizontalScaleFactor = 0.75f; } else { horizontalScaleFactor = 1f; } Boolean flag = p_caption != String.Empty; m_caption.SetVisible(flag); if (flag) { m_caption.UpdatePositionY(-num); m_caption.HorizontalScaleFactor = horizontalScaleFactor; m_caption.UpdateText(p_caption); num += m_caption.Size.y + m_innerPadding; num2 = m_caption.Size.x; } Boolean flag2 = p_description != String.Empty; m_description.SetVisible(flag2); if (flag2) { m_description.UpdatePositionY(-num); m_description.HorizontalScaleFactor = horizontalScaleFactor; m_description.UpdateText(p_description); num += m_description.Size.y + m_innerPadding; num2 = m_description.Size.x; } m_background.Scale(num2 + m_outerPadding * 2f, num - m_innerPadding + m_outerPadding); }
public void Fill(Skill p_skill, TooltipType p_type, Boolean p_isDefault) { Init(); Single num = m_outerPadding + m_innerPadding; Boolean flag = p_type != TooltipType.CURRENT_EFFECT_NEXT || p_skill.Tier >= ETier.NOVICE; m_name.SetVisible(flag); if (flag) { m_name.UpdatePositionY(-num); FillSkillName(p_skill, p_type); num += m_name.Size.y + m_innerPadding; } Boolean flag2 = p_type == TooltipType.BASE || p_type == TooltipType.PARTY_CREATION; m_itemSlot.SetVisible(flag2); m_level.SetVisible(flag2); if (flag2) { m_itemSlot.UpdatePosition(new Vector3(-m_name.Size.x / 2f, -num, 0f)); m_itemSlot.SetItem(p_skill.Icon); m_level.VerticalAlign = TooltipGroup.Align.CENTER; m_level.MinHeight = m_itemSlot.Size.y; m_level.UpdatePositionY(-num); FillSkillLevel(p_skill, p_type, p_isDefault); num += m_level.Size.y + m_innerPadding; } Boolean flag3 = p_type == TooltipType.BASE || p_type == TooltipType.PARTY_CREATION || p_type == TooltipType.CURRENT_EFFECT_PREV || (p_type == TooltipType.CURRENT_EFFECT_NEXT && p_skill.Tier >= ETier.NOVICE); m_description.SetVisible(flag3); if (flag3) { m_description.UpdatePositionY(-num); FillSkillDescription(p_skill, p_type, p_isDefault); num += m_description.Size.y + m_innerPadding; } Boolean flag4 = p_type == TooltipType.CURRENT_EFFECT_NEXT || (p_type == TooltipType.CURRENT_EFFECT_PREV && p_skill.Level > 1); m_subHeadLine.SetVisible(flag4); if (flag4) { m_subHeadLine.UpdatePositionY(-num); if (p_type == TooltipType.CURRENT_EFFECT_NEXT) { m_subHeadLine.UpdateText(LocaManager.GetText("SKILL_NEXT_INCREASE")); } else { m_subHeadLine.UpdateText(LocaManager.GetText("SKILL_PREV_INCREASE")); } num += m_subHeadLine.Size.y + m_innerPadding; } Boolean flag5 = (p_type != TooltipType.CURRENT_EFFECT_PREV || p_skill.Level > 1) && (p_type != TooltipType.PARTY_CREATION || IsMagicSchoolSkill(p_skill)); m_effect.SetVisible(flag5); if (flag5) { m_effect.UpdatePositionY(-num); FillSkillEffect(p_skill, p_type); num += m_effect.Size.y + m_innerPadding; } Boolean flag6 = p_type == TooltipType.PARTY_CREATION && IsMagicSchoolSkill(p_skill); Int32 num2 = 0; for (Int32 i = 0; i < m_spellSlot.Length; i++) { m_spellSlot[i].SetVisible(false); m_spellName[i].SetVisible(false); } if (flag6) { foreach (SkillEffectStaticData skillEffectStaticData in p_skill.Tier1Effects) { if (skillEffectStaticData.Type == ESkillEffectType.LEARN_SPELL) { Int32 p_spellType = (Int32)skillEffectStaticData.Value; CharacterSpell characterSpell = SpellFactory.CreateCharacterSpell((ECharacterSpell)p_spellType); m_spellSlot[num2].SetVisible(true); m_spellSlot[num2].UpdatePosition(new Vector3(-m_name.Size.x / 2f, -num, 0f)); m_spellSlot[num2].SetItem(characterSpell.StaticData.Icon); m_spellName[num2].SetVisible(true); m_spellName[num2].VerticalAlign = TooltipGroup.Align.CENTER; m_spellName[num2].MinHeight = m_spellSlot[num2].Size.y; m_spellName[num2].UpdatePositionY(-num); m_spellName[num2].UpdateText(LocaManager.GetText(characterSpell.NameKey)); num += m_spellName[num2].Size.y + m_innerPadding; num2++; } } } m_background.Scale(m_name.Size.x + m_outerPadding * 2f, num - m_innerPadding + m_outerPadding); }
public void Fill(EQuickActionType p_action) { if (m_descriptionValues == null) { m_descriptionValues = new String[9]; m_descriptionValues[0] = "[00FF00]"; m_descriptionValues[1] = "[80FF80]"; m_descriptionValues[2] = "[FF0000]"; m_descriptionValues[3] = "[FFC080]"; m_descriptionValues[4] = "[FFFF80]"; m_descriptionValues[5] = "[80FFFF]"; m_descriptionValues[6] = "[-]"; } m_name.UpdateText(LocaManager.GetText("STANDARD_ACTION_" + p_action)); Single num = m_outerPadding + m_name.Size.y + m_innerPadding; switch (p_action) { case EQuickActionType.ATTACK: m_itemSlot.SetSpell("SPL_action_melee"); m_itemSlot.HideItem(); break; case EQuickActionType.ATTACKRANGED: m_itemSlot.SetSpell("SPL_action_ranged"); m_itemSlot.HideItem(); break; case EQuickActionType.USE_BEST_MANAPOTION: { m_itemSlot.SetSpell("SPL_action_bestpotion"); Potion bestPotion = LegacyLogic.Instance.WorldManager.Party.GetBestPotion(EPotionType.MANA_POTION, null); if (bestPotion != null) { m_itemSlot.SetItem(bestPotion.Icon); } else { m_itemSlot.SetItem("ITM_consumable_potion_mana_1"); } break; } case EQuickActionType.USE_BEST_HEALTHPOTION: { m_itemSlot.SetSpell("SPL_action_bestpotion"); Potion bestPotion2 = LegacyLogic.Instance.WorldManager.Party.GetBestPotion(EPotionType.HEALTH_POTION, null); if (bestPotion2 != null) { m_itemSlot.SetItem(bestPotion2.Icon); } else { m_itemSlot.SetItem("ITM_consumable_potion_health_1"); } break; } case EQuickActionType.DEFEND: m_itemSlot.SetSpell("SPL_action_defend"); m_itemSlot.HideItem(); break; } m_itemSlot.UpdatePosition(new Vector3(-m_name.Size.x / 2f, -num, 0f)); m_description.MinHeight = m_itemSlot.Size.y; m_description.VerticalAlign = TooltipGroup.Align.CENTER; m_description.UpdateText("-"); m_description.UpdatePositionY(-num); num += m_description.Size.y + m_innerPadding; if (p_action == EQuickActionType.ATTACKRANGED) { m_descriptionValues[7] = LegacyLogic.Instance.WorldManager.Party.SelectedCharacter.FightValues.RangedAttackRange.ToString(); m_descriptionValues[8] = (ConfigManager.Instance.Game.RangedAttackMeleeMalus * 100f).ToString(); } else if (p_action == EQuickActionType.DEFEND) { m_descriptionValues[7] = (ConfigManager.Instance.Game.DefendEvadeBonus * 100f).ToString(); m_descriptionValues[8] = (ConfigManager.Instance.Game.DefendBlockBonus * 100f).ToString(); } else { m_descriptionValues[7] = String.Empty; } m_details.UpdateText(LocaManager.GetText("STANDARD_ACTION_" + p_action + "_TT", m_descriptionValues)); m_details.UpdatePositionY(-num); num += m_details.Size.y + m_innerPadding; m_requirements.SetVisible(false); m_background.Scale(m_name.Size.x + m_outerPadding * 2f, num - m_innerPadding + m_outerPadding); }