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
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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