12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using Sirenix.OdinInspector;
- namespace KairoEngine.UI.ActivityMessages
- {
- [System.Serializable]
- public class ActivityMessage
- {
- [FoldoutGroup("@GetTitle()")] public string text;
- [FoldoutGroup("@GetTitle()")] public string id;
- [FoldoutGroup("@GetTitle()")] public string group;
- [FoldoutGroup("@GetTitle()")] public string prefab;
- [FoldoutGroup("@GetTitle()")] public Sprite icon;
- [FoldoutGroup("@GetTitle()")] public float time;
- [FoldoutGroup("@GetTitle()")] public bool sticky;
- [FoldoutGroup("@GetTitle()")] public bool hideOnClick;
- [FoldoutGroup("@GetTitle()")] public Action action;
- [FoldoutGroup("@GetTitle()")] public string tooltipHeader;
- [FoldoutGroup("@GetTitle()")] public string tooltipBody;
- [FoldoutGroup("@GetTitle()")] public string tooltipType;
- public ActivityMessage(string text, string id = "", string group = "", string prefab = "", Sprite icon = null, float time = 5f, bool sticky = false,
- bool hideOnClick = true, Action action = null, string tooltipHeader = "", string tooltipBody = "", string tooltipType = "")
- {
- this.text = text;
- this.id = id;
- this.group = group;
- this.prefab = prefab;
- this.icon = icon;
- this.time = time;
- this.sticky = sticky;
- this.hideOnClick = hideOnClick;
- this.action = action;
- this.tooltipHeader = tooltipHeader;
- this.tooltipBody = tooltipBody;
- this.tooltipType = tooltipType;
- }
- public string GetTitle()
- {
- if(id != "") return id;
- else return text;
- }
- }
- }
|