C# Class MoodSwingGUI.MSButton

MSButton represents a drawable, clickable, action-attachable button.
Inheritance: MSGUITypable
Afficher le fichier Open project: verngutz/MoodSwing Class Usage Examples

Protected Properties

Свойство Type Description
action MSAction
clickedTexture Microsoft.Xna.Framework.Graphics.Texture2D
hoveredTexture Microsoft.Xna.Framework.Graphics.Texture2D
unhoveredTexture Microsoft.Xna.Framework.Graphics.Texture2D

Méthodes publiques

Méthode Description
Draw ( GameTime gameTime ) : void
HandleKeyboardInput ( KeyboardState oldKeyboardState ) : void
Hover ( ) : void
LeftClick ( ) : void
MSButton ( MSLabel label, MSAction action, Rectangle boundingRectangle, Microsoft.Xna.Framework.Graphics.Texture2D unhovered, Microsoft.Xna.Framework.Graphics.Texture2D clicked, Microsoft.Xna.Framework.Graphics.Texture2D hovered, Color highlight, MSToolTip toolTip, Shape shape, SpriteBatch spriteBatch, Microsoft.Xna.Framework.Game game ) : System

Constructs an MSButton.

MSButton ( MSLabel label, MSAction action, Rectangle boundingRectangle, Microsoft.Xna.Framework.Graphics.Texture2D unhovered, Microsoft.Xna.Framework.Graphics.Texture2D clicked, Microsoft.Xna.Framework.Graphics.Texture2D hovered, MSToolTip toolTip, Shape shape, SpriteBatch spriteBatch, Microsoft.Xna.Framework.Game game ) : System

Constructs an MSButton with no highlight.

MiddleClick ( ) : void
RightClick ( ) : void
UnHover ( ) : void
UnLeftClick ( ) : void
UnLeftClickNoAction ( ) : void
UnMiddleClick ( ) : void
UnRightClick ( ) : void

Method Details

Draw() public méthode

public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Résultat void

HandleKeyboardInput() public méthode

public HandleKeyboardInput ( KeyboardState oldKeyboardState ) : void
oldKeyboardState Microsoft.Xna.Framework.Input.KeyboardState
Résultat void

Hover() public méthode

public Hover ( ) : void
Résultat void

LeftClick() public méthode

public LeftClick ( ) : void
Résultat void

MSButton() public méthode

Constructs an MSButton.
public MSButton ( MSLabel label, MSAction action, Rectangle boundingRectangle, Microsoft.Xna.Framework.Graphics.Texture2D unhovered, Microsoft.Xna.Framework.Graphics.Texture2D clicked, Microsoft.Xna.Framework.Graphics.Texture2D hovered, Color highlight, MSToolTip toolTip, Shape shape, SpriteBatch spriteBatch, Microsoft.Xna.Framework.Game game ) : System
label MSLabel Add text to this MSButton with an MSLabel. Use null if you don't need to add text. Make sure to position the MSLabel relative to the upper-left corner of this MSButton.
action MSAction will be executed when this MSButton is clicked
boundingRectangle Microsoft.Xna.Framework.Rectangle the bounding Rectangle of thisMSButton
unhovered Microsoft.Xna.Framework.Graphics.Texture2D will be drawn when this MSButton is unhovered
clicked Microsoft.Xna.Framework.Graphics.Texture2D will be drawn when this MSButton is pressed and hovered
hovered Microsoft.Xna.Framework.Graphics.Texture2D will be drawn when this MSButton is released and hovered
highlight Color the Color to overlay this MSButton with
toolTip MSToolTip
shape Shape the Shape of this MSButton
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch the SpriteBatch that will draw this MSButton
game Microsoft.Xna.Framework.Game the Game where this MSButton will be used
Résultat System

MSButton() public méthode

Constructs an MSButton with no highlight.
public MSButton ( MSLabel label, MSAction action, Rectangle boundingRectangle, Microsoft.Xna.Framework.Graphics.Texture2D unhovered, Microsoft.Xna.Framework.Graphics.Texture2D clicked, Microsoft.Xna.Framework.Graphics.Texture2D hovered, MSToolTip toolTip, Shape shape, SpriteBatch spriteBatch, Microsoft.Xna.Framework.Game game ) : System
label MSLabel Add text to this MSButton with an MSLabel. Use null if you don't need to add text. Make sure to position the MSLabel relative to the upper-left corner of this MSButton.
action MSAction will be executed when this MSButton is clicked
boundingRectangle Microsoft.Xna.Framework.Rectangle the bounding Rectangle of this MSButton
unhovered Microsoft.Xna.Framework.Graphics.Texture2D will be drawn when this MSButton is unhovered
clicked Microsoft.Xna.Framework.Graphics.Texture2D will be drawn when this MSButton is pressed and hovered
hovered Microsoft.Xna.Framework.Graphics.Texture2D will be drawn when this MSButton is released and hovered
toolTip MSToolTip
shape Shape the Shape of this MSButton
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch the SpriteBatch that will draw this MSButton
game Microsoft.Xna.Framework.Game the Game where this MSButton will be used
Résultat System

MiddleClick() public méthode

public MiddleClick ( ) : void
Résultat void

RightClick() public méthode

public RightClick ( ) : void
Résultat void

UnHover() public méthode

public UnHover ( ) : void
Résultat void

UnLeftClick() public méthode

public UnLeftClick ( ) : void
Résultat void

UnLeftClickNoAction() public méthode

public UnLeftClickNoAction ( ) : void
Résultat void

UnMiddleClick() public méthode

public UnMiddleClick ( ) : void
Résultat void

UnRightClick() public méthode

public UnRightClick ( ) : void
Résultat void

Property Details

action protected_oe property

protected MSAction action
Résultat MSAction

clickedTexture protected_oe property

protected Texture2D,Microsoft.Xna.Framework.Graphics clickedTexture
Résultat Microsoft.Xna.Framework.Graphics.Texture2D

hoveredTexture protected_oe property

protected Texture2D,Microsoft.Xna.Framework.Graphics hoveredTexture
Résultat Microsoft.Xna.Framework.Graphics.Texture2D

unhoveredTexture protected_oe property

protected Texture2D,Microsoft.Xna.Framework.Graphics unhoveredTexture
Résultat Microsoft.Xna.Framework.Graphics.Texture2D