C# Class GrandLarceny.Button

Afficher le fichier Open project: melburn/GLhf Class Usage Examples

Protected Properties

Свойство Type Description
m_bounds Microsoft.Xna.Framework.Rectangle
m_currentState State
m_isFocused bool
m_isPressed bool
m_isToggled bool
m_isVisible bool
m_text GrandLarceny.Text

Méthodes publiques

Méthode Description
Button ( Vector2 a_position ) : System
Button ( Vector2 a_position, string a_normal, string a_hover, string a_pressed, string a_toggle ) : System
Button ( string a_buttonTexture, Vector2 a_position ) : System
Button ( string a_buttonTexture, Vector2 a_position, string a_buttonText, string a_font, Color a_color, Vector2 a_offset ) : System
draw ( GameTime a_gameTime, SpriteBatch a_spriteBatch ) : void
getBox ( ) : Rectangle
getIntState ( ) : int
getPosition ( ) : GrandLarceny.Position
getSize ( ) : Vector2
getState ( ) : State
getText ( ) : string
hasEvent ( ) : bool
invokeClickEvent ( ) : void
isButtonPressed ( ) : bool
isVisible ( ) : bool
kill ( ) : void
loadContent ( ) : void
move ( Vector2 a_moveLength ) : void
playDownSound ( ) : void
playUpSound ( ) : void
setColor ( Color a_color ) : void
setDownSound ( string a_name ) : void
setHotkey ( Keys a_key, clickDelegate a_method ) : void
setLayer ( float a_layer ) : void
setPosition ( Vector2 a_position ) : void
setState ( State a_state ) : void
setState ( int a_state ) : void
setText ( String a_string ) : void
setText ( string a_string, Vector2 a_offset ) : void
setUpSound ( string a_name ) : void
setVisible ( bool a_visible ) : void
update ( ) : bool
updateHitbox ( ) : void

Private Methods

Méthode Description
hotkeyPressed ( ) : bool
setHoverTexture ( Microsoft.Xna.Framework.Graphics.Texture2D a_texture ) : void
setNormalTexture ( Microsoft.Xna.Framework.Graphics.Texture2D a_texture ) : void
setPressedTexture ( Microsoft.Xna.Framework.Graphics.Texture2D a_texture ) : void
setSize ( Vector2 a_size ) : void
setToggleTexture ( Microsoft.Xna.Framework.Graphics.Texture2D a_texture ) : void

Method Details

Button() public méthode

public Button ( Vector2 a_position ) : System
a_position Vector2
Résultat System

Button() public méthode

public Button ( Vector2 a_position, string a_normal, string a_hover, string a_pressed, string a_toggle ) : System
a_position Vector2
a_normal string
a_hover string
a_pressed string
a_toggle string
Résultat System

Button() public méthode

public Button ( string a_buttonTexture, Vector2 a_position ) : System
a_buttonTexture string
a_position Vector2
Résultat System

Button() public méthode

public Button ( string a_buttonTexture, Vector2 a_position, string a_buttonText, string a_font, Color a_color, Vector2 a_offset ) : System
a_buttonTexture string
a_position Vector2
a_buttonText string
a_font string
a_color Color
a_offset Vector2
Résultat System

draw() public méthode

public draw ( GameTime a_gameTime, SpriteBatch a_spriteBatch ) : void
a_gameTime Microsoft.Xna.Framework.GameTime
a_spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
Résultat void

getBox() public méthode

public getBox ( ) : Rectangle
Résultat Microsoft.Xna.Framework.Rectangle

getIntState() public méthode

public getIntState ( ) : int
Résultat int

getPosition() public méthode

public getPosition ( ) : GrandLarceny.Position
Résultat GrandLarceny.Position

getSize() public méthode

public getSize ( ) : Vector2
Résultat Vector2

getState() public méthode

public getState ( ) : State
Résultat State

getText() public méthode

public getText ( ) : string
Résultat string

hasEvent() public méthode

public hasEvent ( ) : bool
Résultat bool

invokeClickEvent() public méthode

public invokeClickEvent ( ) : void
Résultat void

isButtonPressed() public méthode

public isButtonPressed ( ) : bool
Résultat bool

isVisible() public méthode

public isVisible ( ) : bool
Résultat bool

kill() public méthode

public kill ( ) : void
Résultat void

loadContent() public méthode

public loadContent ( ) : void
Résultat void

move() public méthode

public move ( Vector2 a_moveLength ) : void
a_moveLength Vector2
Résultat void

playDownSound() public méthode

public playDownSound ( ) : void
Résultat void

playUpSound() public méthode

public playUpSound ( ) : void
Résultat void

setColor() public méthode

public setColor ( Color a_color ) : void
a_color Color
Résultat void

setDownSound() public méthode

public setDownSound ( string a_name ) : void
a_name string
Résultat void

setHotkey() public méthode

public setHotkey ( Keys a_key, clickDelegate a_method ) : void
a_key Keys
a_method clickDelegate
Résultat void

setLayer() public méthode

public setLayer ( float a_layer ) : void
a_layer float
Résultat void

setPosition() public méthode

public setPosition ( Vector2 a_position ) : void
a_position Vector2
Résultat void

setState() public méthode

public setState ( State a_state ) : void
a_state State
Résultat void

setState() public méthode

public setState ( int a_state ) : void
a_state int
Résultat void

setText() public méthode

public setText ( String a_string ) : void
a_string String
Résultat void

setText() public méthode

public setText ( string a_string, Vector2 a_offset ) : void
a_string string
a_offset Vector2
Résultat void

setUpSound() public méthode

public setUpSound ( string a_name ) : void
a_name string
Résultat void

setVisible() public méthode

public setVisible ( bool a_visible ) : void
a_visible bool
Résultat void

update() public méthode

public update ( ) : bool
Résultat bool

updateHitbox() public méthode

public updateHitbox ( ) : void
Résultat void

Property Details

m_bounds protected_oe property

protected Rectangle,Microsoft.Xna.Framework m_bounds
Résultat Microsoft.Xna.Framework.Rectangle

m_currentState protected_oe property

protected State m_currentState
Résultat State

m_isFocused protected_oe property

protected bool m_isFocused
Résultat bool

m_isPressed protected_oe property

protected bool m_isPressed
Résultat bool

m_isToggled protected_oe property

protected bool m_isToggled
Résultat bool

m_isVisible protected_oe property

protected bool m_isVisible
Résultat bool

m_text protected_oe property

protected Text,GrandLarceny m_text
Résultat GrandLarceny.Text