C# Class Knot3.Framework.Widgets.Menu

Inheritance: Container, IMouseClickEventListener, IMouseMoveEventListener, IMouseScrollEventListener
Show file Open project: knot3/knot3-code Class Usage Examples

Private Properties

Property Type Description
Draw void
Update void
performScroll void
verticalRelativeItemPosition Microsoft.Xna.Framework.Vector2
verticalRelativeItemSize Microsoft.Xna.Framework.Vector2

Public Methods

Method Description
ItemBounds ( MenuItem item ) : Bounds

Die von der Auflösung unabhängigen Ausmaße der Menüeinträge.

Menu ( IScreen screen, DisplayLayer drawOrder ) : System.Diagnostics.CodeAnalysis

Erzeugt eine neue Instanz eines VerticalMenu-Objekts und initialisiert diese mit dem zugehörigen IGameScreen-Objekt. Zudem ist die Angaben der Zeichenreihenfolge Pflicht.

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

Tut nichts.

OnLeftMove ( ScreenPoint previousPosition, ScreenPoint currentPosition, ScreenPoint move, GameTime time ) : void
OnMove ( ScreenPoint previousPosition, ScreenPoint currentPosition, ScreenPoint move, GameTime time ) : void
OnNoMove ( ScreenPoint currentPosition, GameTime time ) : void
OnRightClick ( Vector2 position, ClickState state, GameTime time ) : void

Tut nichts.

OnRightMove ( ScreenPoint previousPosition, ScreenPoint currentPosition, ScreenPoint move, GameTime time ) : void
OnScroll ( int scrollValue, GameTime time ) : void

Die Reaktion auf eine Bewegung des Mausrads. Das Menü scrollt die Einträge.

SetHovered ( bool hovered, GameTime time ) : void

Tut nichts.

Protected Methods

Method Description
assignMenuItemInformation ( MenuItem item ) : void

Private Methods

Method Description
Draw ( GameTime time ) : void
Update ( GameTime time ) : void
performScroll ( ) : void
verticalRelativeItemPosition ( int itemOrder ) : Vector2
verticalRelativeItemSize ( int itemOrder ) : Vector2

Method Details

ItemBounds() public method

Die von der Auflösung unabhängigen Ausmaße der Menüeinträge.
public ItemBounds ( MenuItem item ) : Bounds
item MenuItem
return Knot3.Framework.Math.Bounds

Menu() public method

Erzeugt eine neue Instanz eines VerticalMenu-Objekts und initialisiert diese mit dem zugehörigen IGameScreen-Objekt. Zudem ist die Angaben der Zeichenreihenfolge Pflicht.
public Menu ( IScreen screen, DisplayLayer drawOrder ) : System.Diagnostics.CodeAnalysis
screen IScreen
drawOrder DisplayLayer
return System.Diagnostics.CodeAnalysis

OnLeftClick() public method

Tut nichts.
public OnLeftClick ( Vector2 position, ClickState state, GameTime time ) : void
position Microsoft.Xna.Framework.Vector2
state ClickState
time Microsoft.Xna.Framework.GameTime
return void

OnLeftMove() public method

public OnLeftMove ( ScreenPoint previousPosition, ScreenPoint currentPosition, ScreenPoint move, GameTime time ) : void
previousPosition ScreenPoint
currentPosition ScreenPoint
move ScreenPoint
time Microsoft.Xna.Framework.GameTime
return void

OnMove() public method

public OnMove ( ScreenPoint previousPosition, ScreenPoint currentPosition, ScreenPoint move, GameTime time ) : void
previousPosition ScreenPoint
currentPosition ScreenPoint
move ScreenPoint
time Microsoft.Xna.Framework.GameTime
return void

OnNoMove() public method

public OnNoMove ( ScreenPoint currentPosition, GameTime time ) : void
currentPosition ScreenPoint
time Microsoft.Xna.Framework.GameTime
return void

OnRightClick() public method

Tut nichts.
public OnRightClick ( Vector2 position, ClickState state, GameTime time ) : void
position Microsoft.Xna.Framework.Vector2
state ClickState
time Microsoft.Xna.Framework.GameTime
return void

OnRightMove() public method

public OnRightMove ( ScreenPoint previousPosition, ScreenPoint currentPosition, ScreenPoint move, GameTime time ) : void
previousPosition ScreenPoint
currentPosition ScreenPoint
move ScreenPoint
time Microsoft.Xna.Framework.GameTime
return void

OnScroll() public method

Die Reaktion auf eine Bewegung des Mausrads. Das Menü scrollt die Einträge.
public OnScroll ( int scrollValue, GameTime time ) : void
scrollValue int
time Microsoft.Xna.Framework.GameTime
return void

SetHovered() public method

Tut nichts.
public SetHovered ( bool hovered, GameTime time ) : void
hovered bool
time Microsoft.Xna.Framework.GameTime
return void

assignMenuItemInformation() protected method

protected assignMenuItemInformation ( MenuItem item ) : void
item MenuItem
return void