C#Code
C#Code
Public Member Functions | Protected Attributes | Private Attributes
TheForum.GameCode.Poster.Post Class Reference
Inheritance diagram for TheForum.GameCode.Poster.Post:
TheForum.GameCode.Poster.PostAchievement TheForum.GameCode.Poster.PostText3D

List of all members.

Public Member Functions

 Post ()
void Setup (Vector3 startLoc, string userName, string avatarFile, Vector2 avatarAreaDims, Vector2 messageAreaDims, bool isModerator, Libraries.AssetManager assetM, GraphicsDevice device, Libraries.StringType shaderID)
void ReloadPoster (Vector3 startLoc, string userName, string avatarFile, Vector2 avatarAreaDims, Vector2 messageAreaDims, bool isModerator, Libraries.AssetManager assetM, GraphicsDevice device)
virtual void Update (int timePassed, Libraries.AssetManager assetM)
virtual void Render (GraphicsDevice device, SpriteBatch spriteBatch)
void SetAllowRender (bool shouldDisplay)
void SetTimedScale (Vector3 startScale, Vector3 endScale, int timeTakes)
 Post ()
void Setup (Vector3 startLoc, string userName, string avatarFile, Vector2 avatarAreaDims, Vector2 messageAreaDims, bool isModerator, Libraries.AssetManager assetM, GraphicsDevice device)
void Update (int timePassed, Libraries.AssetManager assetM)
void SetPostMessageText (string text, Point dims, GraphicsDevice device, Libraries.AssetManager assetM)
void Render (GraphicsDevice device)
void SetAllowRender (bool shouldDisplay)

Protected Attributes

PostBackground m_postBG
 The background elements that comprise the post area. This is the rects, user image, whatever.
Point m_postMessageTextDims
 Dimensions to use for the post message texture.
bool m_display
 Wether the post should be displayed. Value is true if it should, false if not.
Poster m_poster
 Display the poster, things like user name, avatar, etc.
Libraries.Movement.TimedPointOnLine3D m_timedScale
 Used if you want scaling to be applied to the post. If not set then scaling isn't used.

Private Attributes

Libraries.Text.TextToTexture m_convertText
 Converts spritefont text to a texture.
string m_postMessageText
 Text to display for he message.
Libraries._3D.BaseModel m_postMessageTextModel
 Store the text for the post message after it has been converted to a 3D object.
Libraries.Text.SpriteFontText m_textRender
 Used to display the text.

Detailed Description

Display and handle graphical components shared by all posts. That is the backgrounds, avatar, etc.


Constructor & Destructor Documentation

TheForum.GameCode.Poster.Post.Post ( )

Constructor.

ID - ID to use for the poster.
TheForum.GameCode.Poster.Post.Post ( )

Constructor.

ID - ID to use for the poster.

Member Function Documentation

void TheForum.GameCode.Poster.Post.ReloadPoster ( Vector3  startLoc,
string  userName,
string  avatarFile,
Vector2  avatarAreaDims,
Vector2  messageAreaDims,
bool  isModerator,
Libraries.AssetManager  assetM,
GraphicsDevice  device 
)

Reload the poster portion of the post.

startLoc - Top left cornor of the post.
userName - User name to display for the poster.
avatarFile - Path to the avatar image to use. Null if no avatar is needed.
avatarAreaDims - World dimensions to use for the avatar area of the post.
messageAreaDims - World dimensions to use for the message area of the post.
isModerator - True if the poster is a moderator, false if not. Moderators have extra stuff in the post. assetM - Asset manager to use.
device - Graphics device to use.
virtual void TheForum.GameCode.Poster.Post.Render ( GraphicsDevice  device,
SpriteBatch  spriteBatch 
) [virtual]

Render everything.

device - Device to render with.
spriteBatch - Sprite batch to render with. Is assumed to be handled externally.

Reimplemented in TheForum.GameCode.Poster.PostAchievement, and TheForum.GameCode.Poster.PostText3D.

void TheForum.GameCode.Poster.Post.Render ( GraphicsDevice  device)

Render everything.

framesPassed - How long has passed since the previous update.
board - Board to use.
assetM - Asset manager to use.
void TheForum.GameCode.Poster.Post.SetAllowRender ( bool  shouldDisplay)

Set whether the post should display. Value is true if it should, false if not.

shouldDisplay - True if the post should be allowed to render, false if not.
void TheForum.GameCode.Poster.Post.SetAllowRender ( bool  shouldDisplay)

Set whether the post should display. Value is true if it should, false if not.

void TheForum.GameCode.Poster.Post.SetPostMessageText ( string  text,
Point  dims,
GraphicsDevice  device,
Libraries.AssetManager  assetM 
)

Set the message text to display to be the given text. The text gets processed and turned into a texture.

text - Text message to store.
dims - Dimensions to use for the texture. Should be powers of 2.
device - Device to render text with.
assetM - Asset manager to use.
void TheForum.GameCode.Poster.Post.SetTimedScale ( Vector3  startScale,
Vector3  endScale,
int  timeTakes 
)

Set the post to have a timed scale, where it scales from one size to another.

startScale - Starting scale size.
endScale - Ending scale size.
timeTakes - How long the scale takes to happen.
void TheForum.GameCode.Poster.Post.Setup ( Vector3  startLoc,
string  userName,
string  avatarFile,
Vector2  avatarAreaDims,
Vector2  messageAreaDims,
bool  isModerator,
Libraries.AssetManager  assetM,
GraphicsDevice  device,
Libraries.StringType  shaderID 
)

Setup the post.

startLoc - Top left cornor of the post.
userName - User name to display for the poster.
avatarFile - Path to the avatar image to use. Null if no avatar is needed.
avatarAreaDims - World dimensions to use for the avatar area of the post.
messageAreaDims - World dimensions to use for the message area of the post.
isModerator - True if the poster is a moderator, false if not. Moderators have extra stuff in the post. assetM - Asset manager to use.
device - Graphics device to use.
shaderID - ID of the shader to use.

Reimplemented in TheForum.GameCode.Poster.PostText3D.

void TheForum.GameCode.Poster.Post.Setup ( Vector3  startLoc,
string  userName,
string  avatarFile,
Vector2  avatarAreaDims,
Vector2  messageAreaDims,
bool  isModerator,
Libraries.AssetManager  assetM,
GraphicsDevice  device 
)

Setup the post.

startLoc - Top left cornor of the post.
userName - User name to display for the poster.
avatarFile - Path to the avatar image to use. Null if no avatar is needed.
avatarAreaDims - World dimensions to use for the avatar area of the post.
messageAreaDims - World dimensions to use for the message area of the post.
isModerator - True if the poster is a moderator, false if not. Moderators have extra stuff in the post. assetM - Asset manager to use.
device - Graphics device to use.
virtual void TheForum.GameCode.Poster.Post.Update ( int  timePassed,
Libraries.AssetManager  assetM 
) [virtual]

Update everything. Handle notifing the board is a piece spawn is needed, etc.

timePassed - How long has passed since the previous update.
assetM - Asset manager to use.

Reimplemented in TheForum.GameCode.Poster.PostAchievement, and TheForum.GameCode.Poster.PostText3D.

void TheForum.GameCode.Poster.Post.Update ( int  timePassed,
Libraries.AssetManager  assetM 
)

Update everything. Handle notifing the board is a piece spawn is needed, etc.

timePassed - How long has passed since the previous update.
assetM - Asset manager to use.

Reimplemented in TheForum.GameCode.Poster.PostAchievement, and TheForum.GameCode.Poster.PostText3D.


Member Data Documentation

Converts spritefont text to a texture.

Reimplemented in TheForum.GameCode.Poster.PostAchievement, and TheForum.GameCode.Poster.PostText3D.

Wether the post should be displayed. Value is true if it should, false if not.

The background elements that comprise the post area. This is the rects, user image, whatever.

Display the poster, things like user name, avatar, etc.

Text to display for he message.

Reimplemented in TheForum.GameCode.Poster.PostAchievement, and TheForum.GameCode.Poster.PostText3D.

Dimensions to use for the post message texture.

Store the text for the post message after it has been converted to a 3D object.

Reimplemented in TheForum.GameCode.Poster.PostAchievement, and TheForum.GameCode.Poster.PostText3D.

Used to display the text.

Reimplemented in TheForum.GameCode.Poster.PostAchievement, and TheForum.GameCode.Poster.PostText3D.

Used if you want scaling to be applied to the post. If not set then scaling isn't used.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Enumerations Properties