public static void NotifyDeath(ProtoCrewMember kerbal) { var title = $"{kerbal.name} has died"; var text = $"{kerbal.name} has died while on EVA."; const MessageSystemButton.MessageButtonColor color = MessageSystemButton.MessageButtonColor.RED; const MessageSystemButton.ButtonIcons icon = MessageSystemButton.ButtonIcons.FAIL; var message = new MessageSystem.Message(title, text, color, icon); MessageSystem.Instance.AddMessage(message); }
// show a generic notification public static void Notification(string title, string msg, string type) { MessageSystemButton.MessageButtonColor msg_clr = MessageSystemButton.MessageButtonColor.BLUE; MessageSystemButton.ButtonIcons msg_icon = MessageSystemButton.ButtonIcons.MESSAGE; if (type == "ALERT") { msg_clr = MessageSystemButton.MessageButtonColor.RED; msg_icon = MessageSystemButton.ButtonIcons.ALERT; } MessageSystem.Instance.AddMessage(new MessageSystem.Message(title, msg, msg_clr, msg_icon)); }
/// <summary> /// Quick wrapper to post a user notification with less hassle. /// </summary> static void PostMessage(string title, string message, MessageSystemButton.MessageButtonColor messageButtonColor, MessageSystemButton.ButtonIcons buttonIcons) { MessageSystem.Message msg = new MessageSystem.Message( title, message, messageButtonColor, buttonIcons); MessageSystem.Instance.AddMessage(msg); }
public static void PostMessage(string sTitle, string sMessage, MessageSystemButton.MessageButtonColor cColor, MessageSystemButton.ButtonIcons bIcon) { MessageSystem.Message m = new MessageSystem.Message(sTitle, sMessage, cColor, bIcon); MessageSystem.Instance.AddMessage(m); }
/// <summary> /// Posts a new message to the messaging system unless notifications have been disabled in the general settings. /// </summary> public static void PostMessage(string title, string message, MessageSystemButton.MessageButtonColor messageButtonColor, MessageSystemButton.ButtonIcons buttonIcons, bool overrideMute = false) { if (DangIt.Instance.CurrentSettings.Messages || overrideMute) { MessageSystem.Message msg = new MessageSystem.Message( title, message, messageButtonColor, buttonIcons); MessageSystem.Instance.AddMessage(msg); } }
protected void SendStateMessage(string title, string message, MessageSystemButton.MessageButtonColor color, MessageSystemButton.ButtonIcons icon);
public static void DisplayMessage(String title, StringBuilder text, MessageSystemButton.MessageButtonColor color, MessageSystemButton.ButtonIcons icon) { MessageSystem.Message m = new MessageSystem.Message(title, text.ToString(), color, icon); MessageSystem.Instance.AddMessage(m); }