PixelCrushers.DialogueSystem.UnityGUI.GUIImageParams Class Reference

Parameters for using GUI.DrawTexture[WithTexCoords]. More...

Public Member Functions

void Draw (Rect rect)
 Draws the image in the specified rect using full alpha. More...
 
void Draw (Rect rect, bool hasAlpha, float alpha)
 Draw the specified rect, taking alpha into account. More...
 

Public Attributes

Rect pixelRect
 The pixel offset and size of the image. More...
 
Texture2D texture
 The image to display. More...
 
bool useTexCoords = false
 If true, uses texCoords; otherwise scales according to scaleMode and imageAspect. More...
 
Rect texCoords = new Rect(0, 0, 1, 1)
 The tex coords (in the range 0..1) of the source image. More...
 
ScaleMode scaleMode = ScaleMode.ScaleToFit
 The scale mode (if not using tex coords). More...
 
bool alphaBlend = true
 If true, alpha blends the image. More...
 
Color color = Color.white
 The color to tint the image. More...
 
float aspect = 0
 The aspect ratio for the source image. More...
 

Detailed Description

Parameters for using GUI.DrawTexture[WithTexCoords].

Member Function Documentation

◆ Draw() [1/2]

void PixelCrushers.DialogueSystem.UnityGUI.GUIImageParams.Draw ( Rect  rect)

Draws the image in the specified rect using full alpha.

Parameters
rectRect.

◆ Draw() [2/2]

void PixelCrushers.DialogueSystem.UnityGUI.GUIImageParams.Draw ( Rect  rect,
bool  hasAlpha,
float  alpha 
)

Draw the specified rect, taking alpha into account.

Parameters
rectRect.
hasAlphaIf set to true has alpha.
alphaAlpha value of color.

Member Data Documentation

◆ alphaBlend

bool PixelCrushers.DialogueSystem.UnityGUI.GUIImageParams.alphaBlend = true

If true, alpha blends the image.

◆ aspect

float PixelCrushers.DialogueSystem.UnityGUI.GUIImageParams.aspect = 0

The aspect ratio for the source image.

◆ color

Color PixelCrushers.DialogueSystem.UnityGUI.GUIImageParams.color = Color.white

The color to tint the image.

◆ pixelRect

Rect PixelCrushers.DialogueSystem.UnityGUI.GUIImageParams.pixelRect

The pixel offset and size of the image.

If the width and height are zero, it uses the control's scaled rect size.

◆ scaleMode

ScaleMode PixelCrushers.DialogueSystem.UnityGUI.GUIImageParams.scaleMode = ScaleMode.ScaleToFit

The scale mode (if not using tex coords).

◆ texCoords

Rect PixelCrushers.DialogueSystem.UnityGUI.GUIImageParams.texCoords = new Rect(0, 0, 1, 1)

The tex coords (in the range 0..1) of the source image.

Used if useTexCoords is true.

◆ texture

Texture2D PixelCrushers.DialogueSystem.UnityGUI.GUIImageParams.texture

The image to display.

◆ useTexCoords

bool PixelCrushers.DialogueSystem.UnityGUI.GUIImageParams.useTexCoords = false

If true, uses texCoords; otherwise scales according to scaleMode and imageAspect.


The documentation for this class was generated from the following file: