C# Class GrandLarceny.Button

Mostra file Open project: melburn/GLhf Class Usage Examples

Protected Properties

Property 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

Public Methods

Method 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

Method 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 method

public Button ( Vector2 a_position ) : System
a_position Vector2
return System

Button() public method

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
return System

Button() public method

public Button ( string a_buttonTexture, Vector2 a_position ) : System
a_buttonTexture string
a_position Vector2
return System

Button() public method

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
return System

draw() public method

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

getBox() public method

public getBox ( ) : Rectangle
return Microsoft.Xna.Framework.Rectangle

getIntState() public method

public getIntState ( ) : int
return int

getPosition() public method

public getPosition ( ) : GrandLarceny.Position
return GrandLarceny.Position

getSize() public method

public getSize ( ) : Vector2
return Vector2

getState() public method

public getState ( ) : State
return State

getText() public method

public getText ( ) : string
return string

hasEvent() public method

public hasEvent ( ) : bool
return bool

invokeClickEvent() public method

public invokeClickEvent ( ) : void
return void

isButtonPressed() public method

public isButtonPressed ( ) : bool
return bool

isVisible() public method

public isVisible ( ) : bool
return bool

kill() public method

public kill ( ) : void
return void

loadContent() public method

public loadContent ( ) : void
return void

move() public method

public move ( Vector2 a_moveLength ) : void
a_moveLength Vector2
return void

playDownSound() public method

public playDownSound ( ) : void
return void

playUpSound() public method

public playUpSound ( ) : void
return void

setColor() public method

public setColor ( Color a_color ) : void
a_color Color
return void

setDownSound() public method

public setDownSound ( string a_name ) : void
a_name string
return void

setHotkey() public method

public setHotkey ( Keys a_key, clickDelegate a_method ) : void
a_key Keys
a_method clickDelegate
return void

setLayer() public method

public setLayer ( float a_layer ) : void
a_layer float
return void

setPosition() public method

public setPosition ( Vector2 a_position ) : void
a_position Vector2
return void

setState() public method

public setState ( State a_state ) : void
a_state State
return void

setState() public method

public setState ( int a_state ) : void
a_state int
return void

setText() public method

public setText ( String a_string ) : void
a_string String
return void

setText() public method

public setText ( string a_string, Vector2 a_offset ) : void
a_string string
a_offset Vector2
return void

setUpSound() public method

public setUpSound ( string a_name ) : void
a_name string
return void

setVisible() public method

public setVisible ( bool a_visible ) : void
a_visible bool
return void

update() public method

public update ( ) : bool
return bool

updateHitbox() public method

public updateHitbox ( ) : void
return void

Property Details

m_bounds protected_oe property

protected Rectangle,Microsoft.Xna.Framework m_bounds
return Microsoft.Xna.Framework.Rectangle

m_currentState protected_oe property

protected State m_currentState
return State

m_isFocused protected_oe property

protected bool m_isFocused
return bool

m_isPressed protected_oe property

protected bool m_isPressed
return bool

m_isToggled protected_oe property

protected bool m_isToggled
return bool

m_isVisible protected_oe property

protected bool m_isVisible
return bool

m_text protected_oe property

protected Text,GrandLarceny m_text
return GrandLarceny.Text