public PeTipMsg(string content, string iconName, EMsgLevel level, EMsgType msgType = EMsgType.Misc, int musicID = -1) { m_IconName = iconName; m_Content = content; m_MsgType = msgType; m_MusicID = musicID; m_Style = EStyle.Icon; if (level == EMsgLevel.Norm) { m_Color = s_NormalColor; } else if (level == EMsgLevel.Warning) { m_Color = s_WarningColor; } else if (level == EMsgLevel.Error) { m_Color = s_ErrorColor; } else if (level == EMsgLevel.HighLightRed) { m_Color = s_HighLightRed; } PeTipsMsgMan.Instance.AddTipMsg(this); }
public static void Register(string content, Texture iconTex, EMsgLevel level, EMsgType msgType = EMsgType.Misc, int musicID = -1) { new PeTipMsg(content, iconTex, level, msgType, musicID); }