C# Class Gonzo.Elements.UIImage

Inheritance: UIElement
ファイルを表示 Open project: Afr0Games/Project-Dollhouse Class Usage Examples

Public Properties

Property Type Description
Slicer NineSlicer
Texture Microsoft.Xna.Framework.Graphics.Texture2D

Public Methods

Method Description
Draw ( SpriteBatch SBatch, Rectangle SourceRect, float LayerDepth ) : void

Draws this UIImage to the screen.

Draw ( SpriteBatch SBatch, Rectangle SourceRect, float LayerDepth, Vector2 ScaleFactor ) : void

Draws this UIImage to the screen.

DrawTextureTo ( SpriteBatch SBatch, Vector2 Scale, Rectangle From, Vector2 To, float LayerDepth ) : void

Draws a part of this image's texture to a specific point in screen space. Used for drawing dialogs (see UIDialog.cs).

SetSize ( int Width, int Height ) : void

Sets the size of this UIImage instance.

UIImage ( DefineImageNode Node, UIScreen Screen ) : Files.Manager

Constructs a new UIImage instance.

UIImage ( Microsoft.Xna.Framework.Graphics.Texture2D Tex, UIScreen Screen, UIElement Parent = null ) : Files.Manager

Constructs a new UIImage instance.

UIImage ( UIImage Image ) : Files.Manager

Copy constructor.

Method Details

Draw() public method

Draws this UIImage to the screen.
public Draw ( SpriteBatch SBatch, Rectangle SourceRect, float LayerDepth ) : void
SBatch Microsoft.Xna.Framework.Graphics.SpriteBatch A SpriteBatch instance to draw with.
SourceRect Microsoft.Xna.Framework.Rectangle A rectangle controlling which part of the image to draw. May be null.
LayerDepth float
return void

Draw() public method

Draws this UIImage to the screen.
public Draw ( SpriteBatch SBatch, Rectangle SourceRect, float LayerDepth, Vector2 ScaleFactor ) : void
SBatch Microsoft.Xna.Framework.Graphics.SpriteBatch A SpriteBatch instance to draw with.
SourceRect Microsoft.Xna.Framework.Rectangle A rectangle controlling which part of the image to draw. May be null.
LayerDepth float Depth at which to draw, may be null.
ScaleFactor Microsoft.Xna.Framework.Vector2 Scale at which to draw, may be null.
return void

DrawTextureTo() public method

Draws a part of this image's texture to a specific point in screen space. Used for drawing dialogs (see UIDialog.cs).
public DrawTextureTo ( SpriteBatch SBatch, Vector2 Scale, Rectangle From, Vector2 To, float LayerDepth ) : void
SBatch Microsoft.Xna.Framework.Graphics.SpriteBatch The SpriteBatch used for drawing.
Scale Microsoft.Xna.Framework.Vector2 The scale at which to draw.
From Microsoft.Xna.Framework.Rectangle A source rectangle that controls which part of the texture is drawn.
To Microsoft.Xna.Framework.Vector2 Point in screen space to draw to.
LayerDepth float Depth at which to render, from 0-1. Set to 0.10f by default.
return void

SetSize() public method

Sets the size of this UIImage instance.
public SetSize ( int Width, int Height ) : void
Width int The width of this UIImage instance.
Height int The height of this UIImage instance.
return void

UIImage() public method

Constructs a new UIImage instance.
public UIImage ( DefineImageNode Node, UIScreen Screen ) : Files.Manager
Node DefineImageNode A DefineImageNode instance, as generated by an Abstract Syntax Tree (see UIScreen.cs).
Screen UIScreen A UIScreen instance.
return Files.Manager

UIImage() public method

Constructs a new UIImage instance.
public UIImage ( Microsoft.Xna.Framework.Graphics.Texture2D Tex, UIScreen Screen, UIElement Parent = null ) : Files.Manager
Tex Microsoft.Xna.Framework.Graphics.Texture2D Texture to create image from.
Screen UIScreen UIScreen instance.
Parent UIElement Parent of this UIImage instance, may be null.
return Files.Manager

UIImage() public method

Copy constructor.
public UIImage ( UIImage Image ) : Files.Manager
Image UIImage A UIImage instance to copy.
return Files.Manager

Property Details

Slicer public_oe property

Initialize this to get nine rectangles with which to draw the texture.
public NineSlicer,Gonzo.Elements Slicer
return NineSlicer

Texture public_oe property

public Texture2D,Microsoft.Xna.Framework.Graphics Texture
return Microsoft.Xna.Framework.Graphics.Texture2D