Inventory Engine  v4.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MoreMountains.Tools.MMConsole Class Reference

This class displays an on-screen console for easier debugging DO NOT ADD THIS CLASS AS A COMPONENT. More...

Inherits MonoBehaviour.

Public Member Functions

virtual void SetFontSize (int fontSize)
 Sets the size of the font, and automatically deduces the character's height and width. More...
 
virtual void SetScreenOffset (int top=10, int left=10)
 Sets the screen offset, from the top left corner More...
 
virtual void SetMessage (string newMessage)
 Replaces the content of the current message stack with the specified string More...
 
virtual void AddMessage (string newMessage)
 Adds the specified message to the message stack. More...
 

Protected Member Functions

virtual void OnGUI ()
 Draws a box containing the current stack of messages on top of the screen. More...
 

Protected Attributes

string _messageStack
 
int _numberOfMessages =0
 
bool _messageStackHasBeenDisplayed =false
 
int _largestMessageLength =0
 
int _marginTop = 10
 
int _marginLeft = 10
 
int _padding = 10
 
int _fontSize = 10
 
int _characterHeight = 16
 
int _characterWidth = 6
 

Detailed Description

This class displays an on-screen console for easier debugging DO NOT ADD THIS CLASS AS A COMPONENT.

Instead, use the MMDebug.DebugOnScreen methods that will take care of everything

Member Function Documentation

◆ AddMessage()

virtual void MoreMountains.Tools.MMConsole.AddMessage ( string  newMessage)
virtual

Adds the specified message to the message stack.

Parameters
newMessageNew message.

◆ OnGUI()

virtual void MoreMountains.Tools.MMConsole.OnGUI ( )
protectedvirtual

Draws a box containing the current stack of messages on top of the screen.

◆ SetFontSize()

virtual void MoreMountains.Tools.MMConsole.SetFontSize ( int  fontSize)
virtual

Sets the size of the font, and automatically deduces the character's height and width.

Parameters
fontSizeFont size.

◆ SetMessage()

virtual void MoreMountains.Tools.MMConsole.SetMessage ( string  newMessage)
virtual

Replaces the content of the current message stack with the specified string

Parameters
newMessageNew message.

◆ SetScreenOffset()

virtual void MoreMountains.Tools.MMConsole.SetScreenOffset ( int  top = 10,
int  left = 10 
)
virtual

Sets the screen offset, from the top left corner

Parameters
top
left

Member Data Documentation

◆ _characterHeight

int MoreMountains.Tools.MMConsole._characterHeight = 16
protected

◆ _characterWidth

int MoreMountains.Tools.MMConsole._characterWidth = 6
protected

◆ _fontSize

int MoreMountains.Tools.MMConsole._fontSize = 10
protected

◆ _largestMessageLength

int MoreMountains.Tools.MMConsole._largestMessageLength =0
protected

◆ _marginLeft

int MoreMountains.Tools.MMConsole._marginLeft = 10
protected

◆ _marginTop

int MoreMountains.Tools.MMConsole._marginTop = 10
protected

◆ _messageStack

string MoreMountains.Tools.MMConsole._messageStack
protected

◆ _messageStackHasBeenDisplayed

bool MoreMountains.Tools.MMConsole._messageStackHasBeenDisplayed =false
protected

◆ _numberOfMessages

int MoreMountains.Tools.MMConsole._numberOfMessages =0
protected

◆ _padding

int MoreMountains.Tools.MMConsole._padding = 10
protected

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