C# Класс Indiefreaks.Xna.Rendering.Gui.Button

The Button control provides a simple control that can be selected and clicked
Наследование: Control
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Normal ButtonSkin
Pressed ButtonSkin
Selected ButtonSkin

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

Метод Описание
Button ( string fontPath, string text ) : System

Creates a new instance

Clone ( ) : Control
LoadContent ( IContentCatalogue catalogue, Microsoft.Xna.Framework.Content.ContentManager manager ) : void

Load all XNA ContentManager content

Refresh ( GraphicsDevice device ) : void

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

Render ( SpriteBatch spriteRenderer ) : void

Renders the control

UnloadContent ( IContentCatalogue catalogue ) : void

Unload all XNA ContentManager content

Приватные методы

Метод Описание
OnButtonClicked ( object button, EventArgs e ) : void

OnFocusAcquired ( object button, EventArgs e ) : void

OnFocusLost ( object button, EventArgs e ) : void

Описание методов

Button() публичный Метод

Creates a new instance
public Button ( string fontPath, string text ) : System
fontPath string The font used by this control and its inner default ButtonSkins
text string The initial text for this button
Результат System

Clone() публичный Метод

public Clone ( ) : Control
Результат Control

LoadContent() публичный Метод

Load all XNA ContentManager content
public LoadContent ( IContentCatalogue catalogue, Microsoft.Xna.Framework.Content.ContentManager manager ) : void
catalogue IContentCatalogue
manager Microsoft.Xna.Framework.Content.ContentManager XNA content manage
Результат void

Refresh() публичный Метод

Refreshes the control properties when it requires to be redrawn to the RenderTarget
public Refresh ( GraphicsDevice device ) : void
device GraphicsDevice
Результат void

Render() публичный Метод

Renders the control
public Render ( SpriteBatch spriteRenderer ) : void
spriteRenderer Microsoft.Xna.Framework.Graphics.SpriteBatch
Результат void

UnloadContent() публичный Метод

Unload all XNA ContentManager content
public UnloadContent ( IContentCatalogue catalogue ) : void
catalogue IContentCatalogue
Результат void

Описание свойств

Normal публичное свойство

The Normal Control skin
public ButtonSkin,Indiefreaks.Xna.Rendering.Gui Normal
Результат ButtonSkin

Pressed публичное свойство

The Pressed Control skin
public ButtonSkin,Indiefreaks.Xna.Rendering.Gui Pressed
Результат ButtonSkin

Selected публичное свойство

The Selected Control skin
public ButtonSkin,Indiefreaks.Xna.Rendering.Gui Selected
Результат ButtonSkin