C# 클래스 Indiefreaks.Xna.Rendering.Gui.Screen

A screen contains multiple controls and supports direct rendering to screen or to a texture for a latter usage such as using a 3D quad
상속: IGuiElement, IUpdate
파일 보기 프로젝트 열기: Indiefreaks/igf 1 사용 예제들

공개 메소드들

메소드 설명
Add ( Control control ) : void

Adds a control to the screen

HandleInput ( PlayerInput input, GameTime gameTime ) : void

Handles the input events from the player controlling the current control

Invalidate ( ) : void

Marks this Screen as requiring to be refreshed

LoseFocus ( ) : void

Removes focus from the current control

OnFocusAcquired ( ) : void

OnFocusLost ( ) : void

PrepareRenderTarget ( GraphicsDevice device ) : void

Creates or recreate the RenderTarget where the screen will be rendered

Refresh ( GraphicsDevice device ) : void

Refreshes the Screen properties when it requires to be redrawn to the RenderTarget

Remove ( Control control ) : void

Removes a control from the screen

RemoveAll ( ) : void
Screen ( ) : System

Creates a new instance that renders to screen

Screen ( bool renderToScreen ) : System

Creates a new instance without input support

Screen ( bool renderToScreen, bool isMenu, PlayerInput playerInput ) : System

Creates a new instance which width and height are set to the current Viewport Width and Height

Screen ( bool renderToScreen, bool isMenu, PlayerInput playerInput, int width, int height ) : System

Creates a new instance

SetFocus ( ) : void

Sets focus to the current control

Update ( GameTime gameTime ) : void

Update loop call

비공개 메소드들

메소드 설명
IGuiElement ( GraphicsDevice device ) : void

Refreshes the Screen properties when it requires to be redrawn to the RenderTarget

IGuiElement ( SpriteBatch spriteRenderer ) : void

Renders the Screen

메소드 상세

Add() 공개 메소드

Adds a control to the screen
public Add ( Control control ) : void
control Control
리턴 void

HandleInput() 공개 메소드

Handles the input events from the player controlling the current control
public HandleInput ( PlayerInput input, GameTime gameTime ) : void
input Indiefreaks.Xna.Input.PlayerInput The current player input states
gameTime Microsoft.Xna.Framework.GameTime The GameTime instance
리턴 void

Invalidate() 공개 메소드

Marks this Screen as requiring to be refreshed
public Invalidate ( ) : void
리턴 void

LoseFocus() 공개 메소드

Removes focus from the current control
public LoseFocus ( ) : void
리턴 void

OnFocusAcquired() 공개 메소드

public OnFocusAcquired ( ) : void
리턴 void

OnFocusLost() 공개 메소드

public OnFocusLost ( ) : void
리턴 void

PrepareRenderTarget() 공개 메소드

Creates or recreate the RenderTarget where the screen will be rendered
public PrepareRenderTarget ( GraphicsDevice device ) : void
device GraphicsDevice
리턴 void

Refresh() 공개 메소드

Refreshes the Screen properties when it requires to be redrawn to the RenderTarget
public Refresh ( GraphicsDevice device ) : void
device GraphicsDevice
리턴 void

Remove() 공개 메소드

Removes a control from the screen
public Remove ( Control control ) : void
control Control
리턴 void

RemoveAll() 공개 메소드

public RemoveAll ( ) : void
리턴 void

Screen() 공개 메소드

Creates a new instance that renders to screen
public Screen ( ) : System
리턴 System

Screen() 공개 메소드

Creates a new instance without input support
public Screen ( bool renderToScreen ) : System
renderToScreen bool Set it to true to render directly to screen; false to use the Texture property and render the Screen content elsewhere
리턴 System

Screen() 공개 메소드

Creates a new instance which width and height are set to the current Viewport Width and Height
public Screen ( bool renderToScreen, bool isMenu, PlayerInput playerInput ) : System
renderToScreen bool Set it to true to render directly to screen; false to use the Texture property and render the Screen content elsewhere
isMenu bool If set to true, the inner Buttons will react as in a standard menu; false means that you'll control how inner controls react to input events within their Control.HandleInput() method
playerInput Indiefreaks.Xna.Input.PlayerInput The player input state instance. One Screen can only be controlled by One PlayerInput instance
리턴 System

Screen() 공개 메소드

Creates a new instance
public Screen ( bool renderToScreen, bool isMenu, PlayerInput playerInput, int width, int height ) : System
renderToScreen bool Set it to true to render directly to screen; false to use the Texture property and render the Screen content elsewhere
isMenu bool If set to true, the inner Buttons will react as in a standard menu; false means that you'll control how inner controls react to input events within their Control.HandleInput() method
playerInput Indiefreaks.Xna.Input.PlayerInput The player input state instance. One Screen can only be controlled by One PlayerInput instance
width int The width of the screen, this will be also be used for the inner RenderTarget2D if renderToScreen is set to true
height int The height of the screen, this will be also be used for the inner RenderTarget2D if renderToScreen is set to true
리턴 System

SetFocus() 공개 메소드

Sets focus to the current control
public SetFocus ( ) : void
리턴 void

Update() 공개 메소드

Update loop call
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
리턴 void