ScreenMessaging Class |
Namespace: KSPDev.GUIUtils
The ScreenMessaging type exposes the following members.
| Name | Description | |
|---|---|---|
| SetColorToRichText | Wraps string into Unity rich-text tags to set a color. | |
| ShowErrorScreenMessage | Shows an error message with a default timeout. | |
| ShowInfoScreenMessage | Shows an info message with a default timeout. | |
| ShowInfoScreenMessageWithTimeout | Shows an info message with the specified timeout. | |
| ShowPriorityScreenMessage | Shows an important message with a default timeout. | |
| ShowPriorityScreenMessageWithTimeout | Shows an important message with the specified timeout. | |
| ShowScreenMessage(ScreenMessageStyle, Single, String, Object) | Shows a formatted message with the specified location and timeout. | |
| ShowScreenMessage(ScreenMessageStyle, Single, Color, String, Object) | Shows a formatted message with the specified location and timeout. | |
| ShowWarningScreenMessage | Shows a warning message with a default timeout. |
| Name | Description | |
|---|---|---|
| DefaultErrorTimeout | Default timeout for a UI message that reports an error. | |
| DefaultMessageTimeout | Default timeout for a regular UI message. | |
| DefaultWarningTimeout | Default timeout for a UI message that warns about unusual conditions. | |
| ErrorColor | Default color for the error messages. | |
| WarningColor | Default color for the warning messages. |
class MyMod : MonoBehaviour { void Update() { if (Input.GetKeyDown("1")) { ScreenMessaging.ShowPriorityScreenMessage("Key pressed in frame #{0}", Time.frameCount); } } }