C# Class Knot3.Framework.Widgets.MenuItem

Inheritance: Widget, IKeyEventListener, IMouseClickEventListener, IMouseScrollEventListener
Datei anzeigen Open project: knot3/knot3-code Class Usage Examples

Public Properties

Property Type Description
Hovered GameTime>.Action

Protected Properties

Property Type Description
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch

Public Methods

Method Description
Collapse ( ) : void
MenuItem ( IScreen screen, DisplayLayer drawOrder, string text ) : System
OnKeyEvent ( List key, KeyEvent keyEvent, GameTime time ) : void

Reaktionen auf Tasteneingaben.

OnLeftClick ( Vector2 position, ClickState state, GameTime time ) : void

Reaktionen auf einen Linksklick.

OnRightClick ( Vector2 position, ClickState state, GameTime time ) : void

Reaktionen auf einen Rechtsklick.

OnScroll ( int scrollValue, GameTime time ) : void

Die Reaktion auf eine Bewegung des Mausrads.

SetHovered ( bool isHovered, GameTime time ) : void

Private Methods

Method Description
Draw ( GameTime time ) : void

Method Details

Collapse() public method

public Collapse ( ) : void
return void

MenuItem() public method

public MenuItem ( IScreen screen, DisplayLayer drawOrder, string text ) : System
screen IScreen
drawOrder DisplayLayer
text string
return System

OnKeyEvent() public method

Reaktionen auf Tasteneingaben.
public OnKeyEvent ( List key, KeyEvent keyEvent, GameTime time ) : void
key List
keyEvent KeyEvent
time Microsoft.Xna.Framework.GameTime
return void

OnLeftClick() public method

Reaktionen auf einen Linksklick.
public OnLeftClick ( Vector2 position, ClickState state, GameTime time ) : void
position Vector2
state ClickState
time Microsoft.Xna.Framework.GameTime
return void

OnRightClick() public method

Reaktionen auf einen Rechtsklick.
public OnRightClick ( Vector2 position, ClickState state, GameTime time ) : void
position Vector2
state ClickState
time Microsoft.Xna.Framework.GameTime
return void

OnScroll() public method

Die Reaktion auf eine Bewegung des Mausrads.
public OnScroll ( int scrollValue, GameTime time ) : void
scrollValue int
time Microsoft.Xna.Framework.GameTime
return void

SetHovered() public method

public SetHovered ( bool isHovered, GameTime time ) : void
isHovered bool
time Microsoft.Xna.Framework.GameTime
return void

Property Details

Hovered public_oe property

public Action Hovered
return GameTime>.Action

spriteBatch protected_oe property

protected SpriteBatch,Microsoft.Xna.Framework.Graphics spriteBatch
return Microsoft.Xna.Framework.Graphics.SpriteBatch