Main   Class List   Namespace List   Wiki

GuiMessageVectorCtrl Class Reference
[Utility Controls]

A chat HUD control that displays messages from a MessageVector. More...

Inheritance diagram for GuiMessageVectorCtrl:
Inheritance graph
[legend]

List of all members.

Public Member Functions

bool attach (MessageVector item)
 Push a line onto the back of the list.
void detach ()
 Stop listing messages from the MessageVector previously attached to, if any.

Public Attributes

string allowedMatches [16]
int lineContinuedIndex
int lineSpacing
ColorI matchColor
int maxColorIndex

Detailed Description

A chat HUD control that displays messages from a MessageVector.

This renders messages from a MessageVector; the important thing here is that the MessageVector holds all the messages we care about, while we can destroy and create these GUI controls as needed.

Example:
// Declare ChatHud, which is what will display the actual chat from a MessageVector
new GuiMessageVectorCtrl(ChatHud) {
   profile = "ChatHudMessageProfile";
   horizSizing = "width";
   vertSizing = "height";
   position = "1 1";
   extent = "252 16";
   minExtent = "8 8";
   visible = "1";
   helpTag = "0";
   lineSpacing = "0";
   lineContinuedIndex = "10";
   matchColor = "0 0 255 255";
   maxColorIndex = "5";
};

// All messages are stored in this HudMessageVector, the actual
// MainChatHud only displays the contents of this vector.
new MessageVector(HudMessageVector);

// Attach the MessageVector to the chat control
chatHud.attach(HudMessageVector);
See also:
MessageVector for more details on how this is used

Member Function Documentation

bool GuiMessageVectorCtrl::attach ( MessageVector  item  ) 

Push a line onto the back of the list.

Parameters:
item The GUI element being pushed into the control
Example:
// All messages are stored in this HudMessageVector, the actual
// MainChatHud only displays the contents of this vector.
new MessageVector(HudMessageVector);

// Attach the MessageVector to the chat control
chatHud.attach(HudMessageVector);
Returns:
Value
void GuiMessageVectorCtrl::detach (  ) 

Stop listing messages from the MessageVector previously attached to, if any.

Detailed description

Parameters:
param Description
Example:
// Deatch the MessageVector from HudMessageVector
// HudMessageVector will no longer render the text
chatHud.detach();

Member Data Documentation



Copyright © GarageGames, LLC. All Rights Reserved.