C# 클래스 MoodSwingGUI.MSButton

MSButton represents a drawable, clickable, action-attachable button.
상속: MSGUITypable
파일 보기 프로젝트 열기: verngutz/MoodSwing 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
action MSAction
clickedTexture Microsoft.Xna.Framework.Graphics.Texture2D
hoveredTexture Microsoft.Xna.Framework.Graphics.Texture2D
unhoveredTexture Microsoft.Xna.Framework.Graphics.Texture2D

공개 메소드들

메소드 설명
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

메소드 상세

Draw() 공개 메소드

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

HandleKeyboardInput() 공개 메소드

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

Hover() 공개 메소드

public Hover ( ) : void
리턴 void

LeftClick() 공개 메소드

public LeftClick ( ) : void
리턴 void

MSButton() 공개 메소드

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
리턴 System

MSButton() 공개 메소드

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
리턴 System

MiddleClick() 공개 메소드

public MiddleClick ( ) : void
리턴 void

RightClick() 공개 메소드

public RightClick ( ) : void
리턴 void

UnHover() 공개 메소드

public UnHover ( ) : void
리턴 void

UnLeftClick() 공개 메소드

public UnLeftClick ( ) : void
리턴 void

UnLeftClickNoAction() 공개 메소드

public UnLeftClickNoAction ( ) : void
리턴 void

UnMiddleClick() 공개 메소드

public UnMiddleClick ( ) : void
리턴 void

UnRightClick() 공개 메소드

public UnRightClick ( ) : void
리턴 void

프로퍼티 상세

action 보호되어 있는 프로퍼티

protected MSAction action
리턴 MSAction

clickedTexture 보호되어 있는 프로퍼티

protected Texture2D,Microsoft.Xna.Framework.Graphics clickedTexture
리턴 Microsoft.Xna.Framework.Graphics.Texture2D

hoveredTexture 보호되어 있는 프로퍼티

protected Texture2D,Microsoft.Xna.Framework.Graphics hoveredTexture
리턴 Microsoft.Xna.Framework.Graphics.Texture2D

unhoveredTexture 보호되어 있는 프로퍼티

protected Texture2D,Microsoft.Xna.Framework.Graphics unhoveredTexture
리턴 Microsoft.Xna.Framework.Graphics.Texture2D