Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 // 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));
 }
Esempio n. 3
0
 /// <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);
 }
Esempio n. 5
0
 /// <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);
     }
 }
Esempio n. 6
0
 protected void SendStateMessage(string title, string message, MessageSystemButton.MessageButtonColor color, MessageSystemButton.ButtonIcons icon);
Esempio n. 7
0
 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);
 }