KSP API
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ScreenMessages Class Reference

A class that lets you post temporary messages to the screen. If you use this class your messages will automatically have the same style as regular in-game messages. More...

Inheritance diagram for ScreenMessages:

Public Member Functions

 ScreenMessages ()
 

Static Public Member Functions

static void PostScreenMessage (ScreenMessage msg)
 Post a temporary message to the screen. Examples of screen messages are the "Warp = {number}x" message and the "Quicksaving..." message. More...
 
static ScreenMessage PostScreenMessage (string message)
 Post a temporary message to the screen. Examples of screen messages are the "Warp = {number}x" message and the "Quicksaving..." message. More...
 
static ScreenMessage PostScreenMessage (string message, float duration)
 Post a temporary message to the screen. Examples of screen messages are the "Warp = {number}x" message and the "Quicksaving..." message. More...
 
static ScreenMessage PostScreenMessage (string message, float duration, ScreenMessageStyle style)
 Post a temporary message to the screen. Examples of screen messages are the "Warp = {number}x" message and the "Quicksaving..." message. More...
 
static void RemoveMessage (ScreenMessage msg)
 Remove a currently active message from the screen. More...
 

Public Attributes

List< ScreenMessageactiveMessages
 The set of currently active screen messages. This is a non-static member, but you can get a reference to the ScreenMessages instance via More...
 
GUIStyle[] textStyles
 
bool useRenderQueue
 

Detailed Description

A class that lets you post temporary messages to the screen. If you use this class your messages will automatically have the same style as regular in-game messages.

Constructor & Destructor Documentation

ScreenMessages.ScreenMessages ( )

Member Function Documentation

static void ScreenMessages.PostScreenMessage ( ScreenMessage  msg)
static

Post a temporary message to the screen. Examples of screen messages are the "Warp = {number}x" message and the "Quicksaving..." message.

Parameters
msgThe message to post
static ScreenMessage ScreenMessages.PostScreenMessage ( string  message)
static

Post a temporary message to the screen. Examples of screen messages are the "Warp = {number}x" message and the "Quicksaving..." message.

Parameters
messageThe message to post.
Returns
A reference to the posted message
static ScreenMessage ScreenMessages.PostScreenMessage ( string  message,
float  duration 
)
static

Post a temporary message to the screen. Examples of screen messages are the "Warp = {number}x" message and the "Quicksaving..." message.

Parameters
messageThe message to post
durationHow long the message should remain on the screen, in seconds.
Returns
A reference to the posted message
static ScreenMessage ScreenMessages.PostScreenMessage ( string  message,
float  duration,
ScreenMessageStyle  style 
)
static

Post a temporary message to the screen. Examples of screen messages are the "Warp = {number}x" message and the "Quicksaving..." message.

Parameters
messageThe message to post
durationHow long the message should remain on the screen, in seconds.
styleWhich style of screen message to post–for instance, should it by like the warp message, the quicksaving message, etc.
Returns
A reference to the posted message
static void ScreenMessages.RemoveMessage ( ScreenMessage  msg)
static

Remove a currently active message from the screen.

Parameters
msgThe message to remove

Member Data Documentation

List<ScreenMessage> ScreenMessages.activeMessages

The set of currently active screen messages. This is a non-static member, but you can get a reference to the ScreenMessages instance via

ScreenMessages sm = (ScreenMessages)GameObject.FindObjectOfType(typeof(ScreenMessages));

GUIStyle [] ScreenMessages.textStyles
bool ScreenMessages.useRenderQueue

The documentation for this class was generated from the following file: