C# Class Bricklayer.Client.Interface.GameScreen

The main screen to be used for game functions
Inheritance: Bricklayer.Client.Interface.BaseScreen
Exibir arquivo Open project: Cyral/Bricklayer

Public Properties

Property Type Description
Bar TomShane.Neoforce.Controls.StatusBar
ChatBox TomShane.Neoforce.Controls.Console
Inventory TomShane.Neoforce.Controls.Button[]
LeaveButton TomShane.Neoforce.Controls.Button
PlayerList TomShane.Neoforce.Controls.ListBox
StatsLabel TomShane.Neoforce.Controls.Label

Public Methods

Method Description
Add ( Bricklayer.Client.Interface.ScreenManager screenManager ) : void
AddChat ( string username, string message ) : void

Adds a chat message to the chat box

GameScreen ( ) : System
GameScreen ( System.Action action ) : System
Remove ( ) : void
SentChat ( object sender, TomShane.Neoforce.Controls.ConsoleMessageEventArgs e ) : void

Called when a chat is sent from the local user

Show ( ) : void

Called when we recieve the Init packet, meaning we can now show game UI and hide the loading message

SystemChat ( string message ) : void

Adds a system chat message to the chat box

TextBox_TextChanged ( object sender, TomShane e ) : void

Called when the content of the chatbox's text is changed

WrapText ( SpriteFont spriteFont, string text, float maxLineWidth ) : string

Wraps a string around the width of an area (Ex: The chat box)

Private Methods

Method Description
AddText ( ConsoleMessage c, string texts, ConsoleMessage msgs ) : void

Used to add text messages to the chat box

Method Details

Add() public method

public Add ( Bricklayer.Client.Interface.ScreenManager screenManager ) : void
screenManager Bricklayer.Client.Interface.ScreenManager
return void

AddChat() public method

Adds a chat message to the chat box
public AddChat ( string username, string message ) : void
username string
message string
return void

GameScreen() public method

public GameScreen ( ) : System
return System

GameScreen() public method

public GameScreen ( System.Action action ) : System
action System.Action
return System

Remove() public method

public Remove ( ) : void
return void

SentChat() public method

Called when a chat is sent from the local user
public SentChat ( object sender, TomShane.Neoforce.Controls.ConsoleMessageEventArgs e ) : void
sender object
e TomShane.Neoforce.Controls.ConsoleMessageEventArgs
return void

Show() public method

Called when we recieve the Init packet, meaning we can now show game UI and hide the loading message
public Show ( ) : void
return void

SystemChat() public method

Adds a system chat message to the chat box
public SystemChat ( string message ) : void
message string
return void

TextBox_TextChanged() public method

Called when the content of the chatbox's text is changed
public TextBox_TextChanged ( object sender, TomShane e ) : void
sender object
e TomShane
return void

WrapText() public method

Wraps a string around the width of an area (Ex: The chat box)
public WrapText ( SpriteFont spriteFont, string text, float maxLineWidth ) : string
spriteFont Microsoft.Xna.Framework.Graphics.SpriteFont
text string
maxLineWidth float
return string

Property Details

Bar public_oe property

public StatusBar,TomShane.Neoforce.Controls Bar
return TomShane.Neoforce.Controls.StatusBar

ChatBox public_oe property

public Console,TomShane.Neoforce.Controls ChatBox
return TomShane.Neoforce.Controls.Console

Inventory public_oe property

public Button[],TomShane.Neoforce.Controls Inventory
return TomShane.Neoforce.Controls.Button[]

LeaveButton public_oe property

public Button,TomShane.Neoforce.Controls LeaveButton
return TomShane.Neoforce.Controls.Button

PlayerList public_oe property

public ListBox,TomShane.Neoforce.Controls PlayerList
return TomShane.Neoforce.Controls.ListBox

StatsLabel public_oe property

public Label,TomShane.Neoforce.Controls StatsLabel
return TomShane.Neoforce.Controls.Label