public unsafe static void ShowFightCharacterTooltip(ITooltipDataProvider dataProvider, Vector3 worldPosition)
        {
            //IL_0011: Unknown result type (might be due to invalid IL or missing references)
            //IL_0012: Unknown result type (might be due to invalid IL or missing references)
            //IL_0023: Unknown result type (might be due to invalid IL or missing references)
            //IL_002a: Unknown result type (might be due to invalid IL or missing references)
            //IL_002f: Unknown result type (might be due to invalid IL or missing references)
            //IL_0034: Unknown result type (might be due to invalid IL or missing references)
            //IL_0039: Unknown result type (might be due to invalid IL or missing references)
            //IL_003f: Unknown result type (might be due to invalid IL or missing references)
            //IL_0046: Unknown result type (might be due to invalid IL or missing references)
            //IL_004b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0050: Unknown result type (might be due to invalid IL or missing references)
            //IL_0055: Unknown result type (might be due to invalid IL or missing references)
            //IL_0059: Unknown result type (might be due to invalid IL or missing references)
            //IL_005a: Unknown result type (might be due to invalid IL or missing references)
            //IL_005f: Unknown result type (might be due to invalid IL or missing references)
            //IL_0062: Unknown result type (might be due to invalid IL or missing references)
            Transform       transform = CameraHandler.current.camera.get_transform();
            TooltipPosition position;

            if (((IntPtr)(void *)transform.InverseTransformPoint(worldPosition)).x < 0f)
            {
                worldPosition += 0.7071f * transform.get_right();
                position       = TooltipPosition.Right;
            }
            else
            {
                worldPosition -= 0.7071f * transform.get_right();
                position       = TooltipPosition.Left;
            }
            Vector3 worldPosition2 = FightUIRework.WorldToUIWorld(worldPosition);

            FightUIRework.ShowTooltip(dataProvider, position, worldPosition2);
        }
        public void Initialize(ITooltipDataProvider dataProvider)
        {
            RemoveAllTooltip();
            IFightValueProvider valueProvider = dataProvider.GetValueProvider();

            KeywordReference[] keywordReferences = dataProvider.keywordReferences;
            if (keywordReferences == null)
            {
                return;
            }
            for (int num = keywordReferences.Length - 1; num >= 0; num--)
            {
                KeywordReference keywordReference = keywordReferences[num];
                if (keywordReference.IsValidFor(RuntimeData.currentKeywordContext))
                {
                    ITooltipDataProvider tooltipDataProvider = TooltipDataProviderFactory.Create(keywordReference, valueProvider);
                    if (tooltipDataProvider != null)
                    {
                        KeywordTooltip tooltip = GetTooltip();
                        tooltip.Initialize(tooltipDataProvider);
                        m_activeTooltips.Add(tooltip);
                    }
                }
            }
        }
Exemple #3
0
        public static void ShowTooltip(ITooltipDataProvider tooltipDataProvider, TooltipPosition position, RectTransform rectTransform)
        {
            FightTooltip fightTooltip = GetFightTooltip();

            if (fightTooltip != null)
            {
                fightTooltip.Initialize(tooltipDataProvider);
                fightTooltip.ShowAt(position, rectTransform);
            }
        }
Exemple #4
0
        public static void ShowTooltip(ITooltipDataProvider tooltipDataProvider, TooltipPosition position, Vector3 worldPosition)
        {
            //IL_0018: Unknown result type (might be due to invalid IL or missing references)
            FightTooltip fightTooltip = GetFightTooltip();

            if (fightTooltip != null)
            {
                fightTooltip.Initialize(tooltipDataProvider);
                fightTooltip.ShowAt(position, worldPosition);
            }
        }
Exemple #5
0
        public void Initialize([NotNull] ITooltipDataProvider dataProvider)
        {
            IValueProvider valueProvider = dataProvider.GetValueProvider();

            m_title.SetText(dataProvider.GetTitleKey(), valueProvider);
            m_description.SetText(dataProvider.GetDescriptionKey(), valueProvider);
            switch (dataProvider.tooltipDataType)
            {
            case TooltipDataType.Character:
                SetCharacterPropertiesVisibility(value: true);
                SetMechanismPropertiesVisibility(value: false);
                SetSpellElementsVisibility(value: false);
                SetIconsVisibility(value: true);
                InitializeProperties((ICharacterTooltipDataProvider)dataProvider);
                break;

            case TooltipDataType.ObjectMechanism:
                SetCharacterPropertiesVisibility(value: false);
                SetMechanismPropertiesVisibility(value: true);
                SetSpellElementsVisibility(value: false);
                SetIconsVisibility(value: true);
                InitializeProperties((IObjectMechanismTooltipDataProvider)dataProvider);
                break;

            case TooltipDataType.FloorMechanism:
                SetCharacterPropertiesVisibility(value: false);
                SetMechanismPropertiesVisibility(value: false);
                SetSpellElementsVisibility(value: false);
                SetIconsVisibility(value: false);
                break;

            case TooltipDataType.Spell:
                SetCharacterPropertiesVisibility(value: false);
                SetMechanismPropertiesVisibility(value: false);
                SetSpellElementsVisibility(value: true);
                SetIconsVisibility(value: true);
                InitializeProperties((ISpellTooltipDataProvider)dataProvider);
                break;

            case TooltipDataType.Text:
                SetCharacterPropertiesVisibility(value: false);
                SetMechanismPropertiesVisibility(value: false);
                SetSpellElementsVisibility(value: false);
                SetIconsVisibility(value: false);
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
 public void Initialize(ITooltipDataProvider tooltipDataProvider)
 {
     m_content.Initialize(tooltipDataProvider);
 }
 public void Initialize([NotNull] ITooltipDataProvider dataProvider)
 {
     m_content.Initialize(dataProvider);
     m_keywordsContainer.Initialize(dataProvider);
 }