C# 클래스 MonoGameUi.Control

Basisklasse für alle Arten von Controls.
파일 보기 프로젝트 열기: OctoAwesome/monogameui 1 사용 예제들

공개 메소드들

메소드 설명
CalculcateRequiredClientSpace ( Point available ) : Point

Ist für die Berechnung des Client-Contents zuständig und erleichtert das automatische Alignment.

Control ( BaseScreenComponent manager, string style = "" ) : System
Draw ( SpriteBatch batch, Rectangle renderMask, GameTime gameTime ) : void

Zeichenauruf für das Control (SpriteBatch ist bereits aktiviert)

Focus ( ) : void

Setzt den Fokus auf dieses Control.

GetExpectedSize ( Point available ) : Point

Methode zur Ermittlung des notwendigen Platzes.

GetMaxClientSize ( Point containerSize ) : Point

Ermittelt die maximale Größe des Client Bereichs für dieses Control.

GetMinClientSize ( Point containerSize ) : Point

Ermittelt die minimale Größe des Client Bereichs für dieses Control.

HasInvalidDimensions ( ) : bool

Gibt zurück, ob die Größenangaben nicht mehr aktuell sind.

InvalidateDimensions ( ) : void

Teilt dem Steuerelement mit, dass seine Größe neu berechnet werden muss.

InvalidateDrawing ( ) : void
OnResolutionChanged ( ) : void

Wird aufgerufen, wenn die Auflösung des Fensters geändert wird.

PreDraw ( GameTime gameTime ) : void
SetActualSize ( Point available ) : void

Legt die tatsächliche Größe für dieses Control fest.

StartTransition ( Transition transition ) : void
Unfocus ( ) : void

Entfernt den Fokus.

Update ( GameTime gameTime ) : void

보호된 메소드들

메소드 설명
ApplySkin ( Type type ) : void
OnCanFocusChanged ( PropertyEventArgs args ) : void
OnDraw ( SpriteBatch batch, Rectangle controlArea, GameTime gameTime ) : void

Malt das komplette Control

OnDrawBackground ( SpriteBatch batch, Rectangle backgroundArea, GameTime gameTime, float alpha ) : void

Malt den Hintergrund des Controls

OnDrawContent ( SpriteBatch batch, Rectangle contentArea, GameTime gameTime, float alpha ) : void

Malt den Content des Controls

OnDrawFocusFrame ( SpriteBatch batch, Rectangle contentArea, GameTime gameTime, float alpha ) : void

Malt den Fokusrahmen des Controls

OnDropEnter ( DragEventArgs args ) : void
OnDropLeave ( DragEventArgs args ) : void
OnDropMove ( DragEventArgs args ) : void
OnEnableChanged ( PropertyEventArgs args ) : void
OnEndDrop ( DragEventArgs args ) : void
OnGotFocus ( EventArgs args ) : void
OnHoveredChanged ( PropertyEventArgs args ) : void
OnInsertControl ( CollectionEventArgs args ) : void

Ein neues Control wurde in die Children-Liste eingefügt.

OnKeyDown ( KeyEventArgs args ) : void

Wird aufgerufen, wenn eine Taste gedrückt wird.

OnKeyPress ( KeyEventArgs args ) : void

Wird aufgerufen, wenn eine Taste gedrückt ist.

OnKeyTextPress ( KeyTextEventArgs args ) : void
OnKeyUp ( KeyEventArgs args ) : void

Wird aufgerufen, wenn eine Taste losgelassen wird.

OnLeftMouseClick ( MouseEventArgs args ) : void

Wird aufgerufen, wenn mit der linken Maustaste auf das Steuerelement geklickt wird.

OnLeftMouseDoubleClick ( MouseEventArgs args ) : void
OnLeftMouseDown ( MouseEventArgs args ) : void

Wird aufgerufen, wenn die linke Maustaste heruntergedrückt wird.

OnLeftMouseUp ( MouseEventArgs args ) : void

Wird aufgerufen, wenn die linke Maustaste losgelassen wird.

OnLostFocus ( EventArgs args ) : void
OnMouseEnter ( MouseEventArgs args ) : void
OnMouseLeave ( MouseEventArgs args ) : void
OnMouseMove ( MouseEventArgs args ) : void
OnMouseScroll ( MouseScrollEventArgs args ) : void
OnParentChanged ( PropertyEventArgs args ) : void

Der Parent dieses Controls hat sich geändert.

OnPreDraw ( GameTime gameTime ) : void
OnRemoveControl ( CollectionEventArgs args ) : void

Ein Control wurde aus der Children-Liste entfernt.

OnRightMouseClick ( MouseEventArgs args ) : void

Wird aufgerufen, wenn mit der rechten Maustaste auf das Steuerelement geklickt wird.

OnRightMouseDoubleClick ( MouseEventArgs args ) : void
OnRightMouseDown ( MouseEventArgs args ) : void

Wird aufgerufen, wenn die rechte Maustaste heruntergedrückt wird.

OnRightMouseUp ( MouseEventArgs args ) : void

Wird aufgerufen, wenn die rechte Maustaste losgelassen wird.

OnStartDrag ( DragEventArgs args ) : void
OnTabOrderChanged ( PropertyEventArgs args ) : void
OnTabStopChanged ( PropertyEventArgs args ) : void
OnTouchDoubleTap ( TouchEventArgs args ) : void
OnTouchDown ( TouchEventArgs args ) : void
OnTouchMove ( TouchEventArgs args ) : void
OnTouchTap ( TouchEventArgs args ) : void
OnTouchUp ( TouchEventArgs args ) : void
OnUpdate ( GameTime gameTime ) : void
OnVisibleChanged ( PropertyEventArgs args ) : void
OnZOrderChanged ( PropertyEventArgs args ) : void
SetDimension ( Point actualSize, Point containerSize ) : void

Führt eine automatische Anordnung auf Basis der aktuellen Size und den Alignment-Parametern durch.

비공개 메소드들

메소드 설명
CalculateLocalPosition ( Point global, Control control ) : Point
ControlCollectionInsert ( Control item, int index ) : void
ControlCollectionRemove ( Control item, int index ) : void
HandleTransitions ( GameTime gameTime ) : void
InternalDropMove ( DragEventArgs args ) : bool
InternalEndDrop ( DragEventArgs args ) : bool
InternalKeyDown ( KeyEventArgs args ) : void
InternalKeyPress ( KeyEventArgs args ) : void
InternalKeyTextPress ( KeyTextEventArgs args ) : void
InternalKeyUp ( KeyEventArgs args ) : void
InternalLeftMouseClick ( MouseEventArgs args ) : bool
InternalLeftMouseDoubleClick ( MouseEventArgs args ) : bool
InternalLeftMouseDown ( MouseEventArgs args ) : bool
InternalLeftMouseUp ( MouseEventArgs args ) : void
InternalMouseMove ( MouseEventArgs args ) : bool

Wird vom Parent aufgerufen wenn sich die Maus bewegt

InternalMouseScroll ( MouseScrollEventArgs args ) : bool
InternalRightMouseClick ( MouseEventArgs args ) : bool
InternalRightMouseDoubleClick ( MouseEventArgs args ) : bool
InternalRightMouseDown ( MouseEventArgs args ) : bool
InternalRightMouseUp ( MouseEventArgs args ) : void
InternalStartDrag ( DragEventArgs args ) : bool
InternalTabbedBackward ( ) : bool

Tabbt den aktuellen Fokus eines Controls eine Stelle zurück.

InternalTabbedForward ( ) : bool

Tabbt den aktuellen Fokus eines Controls eine Stelle weiter.

InternalTouchDoubleTap ( TouchEventArgs args ) : bool
InternalTouchDown ( TouchEventArgs args ) : bool
InternalTouchMove ( TouchEventArgs args ) : void
InternalTouchTap ( TouchEventArgs args ) : bool
InternalTouchUp ( TouchEventArgs args ) : void
SetFocus ( Control control ) : void

Setzt den Fokus auf das angegebene Control für den kompletten Visual Tree ab diesem Control abwärts.

메소드 상세

ApplySkin() 보호된 메소드

protected ApplySkin ( Type type ) : void
type System.Type
리턴 void

CalculcateRequiredClientSpace() 공개 메소드

Ist für die Berechnung des Client-Contents zuständig und erleichtert das automatische Alignment.
public CalculcateRequiredClientSpace ( Point available ) : Point
available Point
리턴 Point

Control() 공개 메소드

public Control ( BaseScreenComponent manager, string style = "" ) : System
manager BaseScreenComponent
style string
리턴 System

Draw() 공개 메소드

Zeichenauruf für das Control (SpriteBatch ist bereits aktiviert)
public Draw ( SpriteBatch batch, Rectangle renderMask, GameTime gameTime ) : void
batch Microsoft.Xna.Framework.Graphics.SpriteBatch Spritebatch
renderMask Microsoft.Xna.Framework.Rectangle
gameTime Microsoft.Xna.Framework.GameTime Vergangene Spielzeit
리턴 void

Focus() 공개 메소드

Setzt den Fokus auf dieses Control.
public Focus ( ) : void
리턴 void

GetExpectedSize() 공개 메소드

Methode zur Ermittlung des notwendigen Platzes.
public GetExpectedSize ( Point available ) : Point
available Point Verfügbarer Platz für dieses Control
리턴 Point

GetMaxClientSize() 공개 메소드

Ermittelt die maximale Größe des Client Bereichs für dieses Control.
public GetMaxClientSize ( Point containerSize ) : Point
containerSize Point
리턴 Point

GetMinClientSize() 공개 메소드

Ermittelt die minimale Größe des Client Bereichs für dieses Control.
public GetMinClientSize ( Point containerSize ) : Point
containerSize Point
리턴 Point

HasInvalidDimensions() 공개 메소드

Gibt zurück, ob die Größenangaben nicht mehr aktuell sind.
public HasInvalidDimensions ( ) : bool
리턴 bool

InvalidateDimensions() 공개 메소드

Teilt dem Steuerelement mit, dass seine Größe neu berechnet werden muss.
public InvalidateDimensions ( ) : void
리턴 void

InvalidateDrawing() 공개 메소드

public InvalidateDrawing ( ) : void
리턴 void

OnCanFocusChanged() 보호된 메소드

protected OnCanFocusChanged ( PropertyEventArgs args ) : void
args PropertyEventArgs
리턴 void

OnDraw() 보호된 메소드

Malt das komplette Control
protected OnDraw ( SpriteBatch batch, Rectangle controlArea, GameTime gameTime ) : void
batch Microsoft.Xna.Framework.Graphics.SpriteBatch Spritebatch
controlArea Microsoft.Xna.Framework.Rectangle Bereich für das Control in absoluten Koordinaten
gameTime Microsoft.Xna.Framework.GameTime GameTime
리턴 void

OnDrawBackground() 보호된 메소드

Malt den Hintergrund des Controls
protected OnDrawBackground ( SpriteBatch batch, Rectangle backgroundArea, GameTime gameTime, float alpha ) : void
batch Microsoft.Xna.Framework.Graphics.SpriteBatch Spritebatch
backgroundArea Microsoft.Xna.Framework.Rectangle Bereich für den Background in absoluten Koordinaten
gameTime Microsoft.Xna.Framework.GameTime GameTime
alpha float Die Transparenz des Controls.
리턴 void

OnDrawContent() 보호된 메소드

Malt den Content des Controls
protected OnDrawContent ( SpriteBatch batch, Rectangle contentArea, GameTime gameTime, float alpha ) : void
batch Microsoft.Xna.Framework.Graphics.SpriteBatch Spritebatch
contentArea Microsoft.Xna.Framework.Rectangle Bereich für den Content in absoluten Koordinaten
gameTime Microsoft.Xna.Framework.GameTime GameTime
alpha float Die Transparenz des Controls.
리턴 void

OnDrawFocusFrame() 보호된 메소드

Malt den Fokusrahmen des Controls
protected OnDrawFocusFrame ( SpriteBatch batch, Rectangle contentArea, GameTime gameTime, float alpha ) : void
batch Microsoft.Xna.Framework.Graphics.SpriteBatch Spritebatch
contentArea Microsoft.Xna.Framework.Rectangle Bereich für den Content in absoluten Koordinaten
gameTime Microsoft.Xna.Framework.GameTime GameTime
alpha float Die Transparenz des Controls.
리턴 void

OnDropEnter() 보호된 메소드

protected OnDropEnter ( DragEventArgs args ) : void
args DragEventArgs
리턴 void

OnDropLeave() 보호된 메소드

protected OnDropLeave ( DragEventArgs args ) : void
args DragEventArgs
리턴 void

OnDropMove() 보호된 메소드

protected OnDropMove ( DragEventArgs args ) : void
args DragEventArgs
리턴 void

OnEnableChanged() 보호된 메소드

protected OnEnableChanged ( PropertyEventArgs args ) : void
args PropertyEventArgs
리턴 void

OnEndDrop() 보호된 메소드

protected OnEndDrop ( DragEventArgs args ) : void
args DragEventArgs
리턴 void

OnGotFocus() 보호된 메소드

protected OnGotFocus ( EventArgs args ) : void
args System.EventArgs
리턴 void

OnHoveredChanged() 보호된 메소드

protected OnHoveredChanged ( PropertyEventArgs args ) : void
args PropertyEventArgs
리턴 void

OnInsertControl() 보호된 메소드

Ein neues Control wurde in die Children-Liste eingefügt.
protected OnInsertControl ( CollectionEventArgs args ) : void
args CollectionEventArgs
리턴 void

OnKeyDown() 보호된 메소드

Wird aufgerufen, wenn eine Taste gedrückt wird.
protected OnKeyDown ( KeyEventArgs args ) : void
args KeyEventArgs Zusätzliche Daten zum Event.
리턴 void

OnKeyPress() 보호된 메소드

Wird aufgerufen, wenn eine Taste gedrückt ist.
protected OnKeyPress ( KeyEventArgs args ) : void
args KeyEventArgs Zusätzliche Daten zum Event.
리턴 void

OnKeyTextPress() 보호된 메소드

protected OnKeyTextPress ( KeyTextEventArgs args ) : void
args KeyTextEventArgs
리턴 void

OnKeyUp() 보호된 메소드

Wird aufgerufen, wenn eine Taste losgelassen wird.
protected OnKeyUp ( KeyEventArgs args ) : void
args KeyEventArgs Zusätzliche Daten zum Event.
리턴 void

OnLeftMouseClick() 보호된 메소드

Wird aufgerufen, wenn mit der linken Maustaste auf das Steuerelement geklickt wird.
protected OnLeftMouseClick ( MouseEventArgs args ) : void
args MouseEventArgs Weitere Informationen zum Ereignis.
리턴 void

OnLeftMouseDoubleClick() 보호된 메소드

protected OnLeftMouseDoubleClick ( MouseEventArgs args ) : void
args MouseEventArgs
리턴 void

OnLeftMouseDown() 보호된 메소드

Wird aufgerufen, wenn die linke Maustaste heruntergedrückt wird.
protected OnLeftMouseDown ( MouseEventArgs args ) : void
args MouseEventArgs Weitere Informationen zum Event.
리턴 void

OnLeftMouseUp() 보호된 메소드

Wird aufgerufen, wenn die linke Maustaste losgelassen wird.
protected OnLeftMouseUp ( MouseEventArgs args ) : void
args MouseEventArgs Weitere Informationen zum Event.
리턴 void

OnLostFocus() 보호된 메소드

protected OnLostFocus ( EventArgs args ) : void
args System.EventArgs
리턴 void

OnMouseEnter() 보호된 메소드

protected OnMouseEnter ( MouseEventArgs args ) : void
args MouseEventArgs
리턴 void

OnMouseLeave() 보호된 메소드

protected OnMouseLeave ( MouseEventArgs args ) : void
args MouseEventArgs
리턴 void

OnMouseMove() 보호된 메소드

protected OnMouseMove ( MouseEventArgs args ) : void
args MouseEventArgs
리턴 void

OnMouseScroll() 보호된 메소드

protected OnMouseScroll ( MouseScrollEventArgs args ) : void
args MouseScrollEventArgs
리턴 void

OnParentChanged() 보호된 메소드

Der Parent dieses Controls hat sich geändert.
protected OnParentChanged ( PropertyEventArgs args ) : void
args PropertyEventArgs
리턴 void

OnPreDraw() 보호된 메소드

protected OnPreDraw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
리턴 void

OnRemoveControl() 보호된 메소드

Ein Control wurde aus der Children-Liste entfernt.
protected OnRemoveControl ( CollectionEventArgs args ) : void
args CollectionEventArgs
리턴 void

OnResolutionChanged() 공개 메소드

Wird aufgerufen, wenn die Auflösung des Fensters geändert wird.
public OnResolutionChanged ( ) : void
리턴 void

OnRightMouseClick() 보호된 메소드

Wird aufgerufen, wenn mit der rechten Maustaste auf das Steuerelement geklickt wird.
protected OnRightMouseClick ( MouseEventArgs args ) : void
args MouseEventArgs Weitere Informationen zum Ereignis.
리턴 void

OnRightMouseDoubleClick() 보호된 메소드

protected OnRightMouseDoubleClick ( MouseEventArgs args ) : void
args MouseEventArgs
리턴 void

OnRightMouseDown() 보호된 메소드

Wird aufgerufen, wenn die rechte Maustaste heruntergedrückt wird.
protected OnRightMouseDown ( MouseEventArgs args ) : void
args MouseEventArgs Weitere Informationen zum Event.
리턴 void

OnRightMouseUp() 보호된 메소드

Wird aufgerufen, wenn die rechte Maustaste losgelassen wird.
protected OnRightMouseUp ( MouseEventArgs args ) : void
args MouseEventArgs Weitere Informationen zum Event.
리턴 void

OnStartDrag() 보호된 메소드

protected OnStartDrag ( DragEventArgs args ) : void
args DragEventArgs
리턴 void

OnTabOrderChanged() 보호된 메소드

protected OnTabOrderChanged ( PropertyEventArgs args ) : void
args PropertyEventArgs
리턴 void

OnTabStopChanged() 보호된 메소드

protected OnTabStopChanged ( PropertyEventArgs args ) : void
args PropertyEventArgs
리턴 void

OnTouchDoubleTap() 보호된 메소드

protected OnTouchDoubleTap ( TouchEventArgs args ) : void
args TouchEventArgs
리턴 void

OnTouchDown() 보호된 메소드

protected OnTouchDown ( TouchEventArgs args ) : void
args TouchEventArgs
리턴 void

OnTouchMove() 보호된 메소드

protected OnTouchMove ( TouchEventArgs args ) : void
args TouchEventArgs
리턴 void

OnTouchTap() 보호된 메소드

protected OnTouchTap ( TouchEventArgs args ) : void
args TouchEventArgs
리턴 void

OnTouchUp() 보호된 메소드

protected OnTouchUp ( TouchEventArgs args ) : void
args TouchEventArgs
리턴 void

OnUpdate() 보호된 메소드

protected OnUpdate ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
리턴 void

OnVisibleChanged() 보호된 메소드

protected OnVisibleChanged ( PropertyEventArgs args ) : void
args PropertyEventArgs
리턴 void

OnZOrderChanged() 보호된 메소드

protected OnZOrderChanged ( PropertyEventArgs args ) : void
args PropertyEventArgs
리턴 void

PreDraw() 공개 메소드

public PreDraw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
리턴 void

SetActualSize() 공개 메소드

Legt die tatsächliche Größe für dieses Control fest.
public SetActualSize ( Point available ) : void
available Point Erwartete Größe des Controls (inkl. Borders)
리턴 void

SetDimension() 보호된 메소드

Führt eine automatische Anordnung auf Basis der aktuellen Size und den Alignment-Parametern durch.
protected SetDimension ( Point actualSize, Point containerSize ) : void
actualSize Point
containerSize Point
리턴 void

StartTransition() 공개 메소드

public StartTransition ( Transition transition ) : void
transition Transition
리턴 void

Unfocus() 공개 메소드

Entfernt den Fokus.
public Unfocus ( ) : void
리턴 void

Update() 공개 메소드

public Update ( GameTime gameTime ) : void
gameTime GameTime
리턴 void