C# Class Knot3.Framework.Widgets.Dialog

Inheritance: Widget, IKeyEventListener, IMouseClickEventListener, IMouseMoveEventListener
Afficher le fichier Open project: knot3/knot3-code

Méthodes publiques

Свойство Type Description
Close Action

Protected Properties

Свойство Type Description
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch

Méthodes publiques

Méthode Description
Dialog ( IScreen screen, DisplayLayer drawOrder, string title ) : System

Erzeugt ein neues Dialog-Objekt und initialisiert dieses mit dem zugehörigen IGameScreen-Objekt. Zudem sind Angaben zur Zeichenreihenfolge, einer Zeichenkette für den Titel und für den eingeblendeten Text Pflicht. [base=screen, drawOrder]

OnKeyEvent ( List key, KeyEvent keyEvent, GameTime time ) : void

Durch Drücken der Entertaste wird die ausgewählte Aktion ausgeführt. Durch Drücken der Escape-Taste wird der Dialog abgebrochen. Mit Hilfe der Pfeiltasten kann zwischen den Aktionen gewechselt werden.

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

Bei einem Linksklick geschieht 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

Bei einem Rechtsklick geschieht nichts.

OnRightMove ( ScreenPoint previousPosition, ScreenPoint currentPosition, ScreenPoint move, GameTime time ) : void
SetHovered ( bool hovered, GameTime time ) : void
SubComponents ( GameTime time ) : IEnumerable

Private Methods

Méthode Description
Draw ( GameTime time ) : void

Method Details

Dialog() public méthode

Erzeugt ein neues Dialog-Objekt und initialisiert dieses mit dem zugehörigen IGameScreen-Objekt. Zudem sind Angaben zur Zeichenreihenfolge, einer Zeichenkette für den Titel und für den eingeblendeten Text Pflicht. [base=screen, drawOrder]
public Dialog ( IScreen screen, DisplayLayer drawOrder, string title ) : System
screen IScreen
drawOrder DisplayLayer
title string
Résultat System

OnKeyEvent() public méthode

Durch Drücken der Entertaste wird die ausgewählte Aktion ausgeführt. Durch Drücken der Escape-Taste wird der Dialog abgebrochen. Mit Hilfe der Pfeiltasten kann zwischen den Aktionen gewechselt werden.
public OnKeyEvent ( List key, KeyEvent keyEvent, GameTime time ) : void
key List
keyEvent KeyEvent
time Microsoft.Xna.Framework.GameTime
Résultat void

OnLeftClick() public méthode

Bei einem Linksklick geschieht nichts.
public OnLeftClick ( Vector2 position, ClickState state, GameTime time ) : void
position Vector2
state ClickState
time Microsoft.Xna.Framework.GameTime
Résultat void

OnLeftMove() public méthode

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

OnMove() public méthode

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

OnNoMove() public méthode

public OnNoMove ( ScreenPoint currentPosition, GameTime time ) : void
currentPosition ScreenPoint
time Microsoft.Xna.Framework.GameTime
Résultat void

OnRightClick() public méthode

Bei einem Rechtsklick geschieht nichts.
public OnRightClick ( Vector2 position, ClickState state, GameTime time ) : void
position Vector2
state ClickState
time Microsoft.Xna.Framework.GameTime
Résultat void

OnRightMove() public méthode

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

SetHovered() public méthode

public SetHovered ( bool hovered, GameTime time ) : void
hovered bool
time Microsoft.Xna.Framework.GameTime
Résultat void

SubComponents() public méthode

public SubComponents ( GameTime time ) : IEnumerable
time Microsoft.Xna.Framework.GameTime
Résultat IEnumerable

Property Details

Close public_oe property

Wird aufgerufen, wenn der Dialog geschlossen wird.
public Action Close
Résultat Action

spriteBatch protected_oe property

protected SpriteBatch,Microsoft.Xna.Framework.Graphics spriteBatch
Résultat Microsoft.Xna.Framework.Graphics.SpriteBatch