1
This repository has been archived on 2025-03-15. You can view files and clone it, but cannot push or open issues or pull requests.
2025-03-15 20:02:21 +01:00

66 lines
2.0 KiB
C#

using System;
using EvolutStudio.tinysAPI.BaseClasses;
namespace EvolutStudio
{
namespace VRPortfolioWork
{
namespace Components
{
public class ConsoleTooltipComponent : BaseClassComponent
{
#region Public Attributes
// reference to the current tooltip state
public bool currentTooltipState;
// reference to the current tooltip text
public string currentTooltipText;
#endregion
#region Private Attributes
// Add your private attributes
#endregion
#region Public Functions
public override void ValidationFailed(string notification)
{
throw new NotImplementedException();
}
public override void ValidationSucceeded(string notification)
{
if (
notification.Equals(BaseClassNotification.POINTERCLICKEVENT) ||
notification.Equals(BaseClassNotification.POINTERENTEREVENT) ||
notification.Equals(BaseClassNotification.POINTEREXITEVENT))
{
// update the child text
gameObject.transform.GetChild(0).GetComponent<UnityEngine.UI.Text>().text = currentTooltipText;
// update active state
gameObject.transform.GetChild(0).gameObject.SetActive(currentTooltipState);
}
}
// Use this for initialization
public override void Init()
{
_ComponentsArrayIndex = modulInstance.View.RegisterComponent(this);
}
#endregion
#region Private Functions
// Add your private functions
#endregion
}
}
}
}