C# Class MoodSwingGUI.MSTextField

Inheritance: MSGUITypable
Show file Open project: verngutz/MoodSwing Class Usage Examples

Public Methods

Method Description
Draw ( GameTime gameTime ) : void
HandleKeyboardInput ( KeyboardState oldKeyboardState ) : void
Hover ( ) : void
LeftClick ( ) : void
MSTextField ( String text, Rectangle boundingRectangle, MSAction onEnter, MSGUITypable onTab, int maxTextLength, SpriteFont spriteFont, Color color, SpriteBatch spriteBatch, Microsoft.Xna.Framework.Game game ) : System

Constructs and MSTextField from the given parameters

MSTextField ( String text, Rectangle boundingRectangle, MSAction onEnter, MSGUITypable onTab, int maxTextLength, SpriteFont spriteFont, SpriteBatch spriteBatch, Microsoft.Xna.Framework.Game game ) : System
MiddleClick ( ) : void
RightClick ( ) : void
UnHover ( ) : void
UnLeftClick ( ) : void
UnMiddleClick ( ) : void
UnRightClick ( ) : void

Private Methods

Method Description
GoHome ( ) : void
GoToEnd ( ) : void
InsertAfterCursor ( String s ) : void
RemoveBeforeCursor ( ) : void
ShiftCursorLeft ( ) : void
ShiftCursorRight ( ) : void

Method Details

Draw() public method

public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void

HandleKeyboardInput() public method

public HandleKeyboardInput ( KeyboardState oldKeyboardState ) : void
oldKeyboardState Microsoft.Xna.Framework.Input.KeyboardState
return void

Hover() public method

public Hover ( ) : void
return void

LeftClick() public method

public LeftClick ( ) : void
return void

MSTextField() public method

Constructs and MSTextField from the given parameters
public MSTextField ( String text, Rectangle boundingRectangle, MSAction onEnter, MSGUITypable onTab, int maxTextLength, SpriteFont spriteFont, Color color, SpriteBatch spriteBatch, Microsoft.Xna.Framework.Game game ) : System
text String the initial text this MSTextField contains
boundingRectangle Microsoft.Xna.Framework.Rectangle the bounding Rectangle of this MSTextField
onEnter MSAction the MSAction to perform when this MSTextField is focused and the Enter key has been pressed
onTab MSGUITypable the MSGUITypable that will be given the keyboard focus when this MSTextField is focused and the Tab key has been pressed
maxTextLength int the maximum length of the text that this MSTextField can contain
spriteFont Microsoft.Xna.Framework.Graphics.SpriteFont the SpriteFont that will be used to draw the text on this MSTextField
color Color the text color of this MSTextField
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch the SpriteBatch that will draw this MSTextField
game Microsoft.Xna.Framework.Game the Game where this MSTextField will be used
return System

MSTextField() public method

public MSTextField ( String text, Rectangle boundingRectangle, MSAction onEnter, MSGUITypable onTab, int maxTextLength, SpriteFont spriteFont, SpriteBatch spriteBatch, Microsoft.Xna.Framework.Game game ) : System
text String
boundingRectangle Microsoft.Xna.Framework.Rectangle
onEnter MSAction
onTab MSGUITypable
maxTextLength int
spriteFont Microsoft.Xna.Framework.Graphics.SpriteFont
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
game Microsoft.Xna.Framework.Game
return System

MiddleClick() public method

public MiddleClick ( ) : void
return void

RightClick() public method

public RightClick ( ) : void
return void

UnHover() public method

public UnHover ( ) : void
return void

UnLeftClick() public method

public UnLeftClick ( ) : void
return void

UnMiddleClick() public method

public UnMiddleClick ( ) : void
return void

UnRightClick() public method

public UnRightClick ( ) : void
return void