GuiBitmapCtrl

consoledoc.h

A gui control that is used to display an image.

More...

Bitmap

filename

The bitmap file to display in the control.

ColorI

color mul

bool

If true, the bitmap is tiled inside the control rather than stretched to fit.

Public Functions

void
setBitmap(String filename)

Assign an image to the control.

void
setBitmap(String filename, bool resize)

Assign an image to the control.

bool
setNamedTexture(String namedtexture)

Set a texture as the image.

void
setValue(int x, int y)

Set the offset of the bitmap within the control.

Detailed Description

A gui control that is used to display an image.

The image is stretched to the constraints of the control by default. However, the control can also tile the image as well.

The image itself is stored inside the GuiBitmapCtrl::bitmap field. The boolean value that decides whether the image is stretched or tiled is stored inside the GuiBitmapCtrl::wrap field.

// Create a tiling GuiBitmapCtrl that displays "myImage.png"
%bitmapCtrl = new GuiBitmapCtrl()
{
   bitmap = "myImage.png";
   wrap = "true";
};

Bitmap

filename bitmap 

The bitmap file to display in the control.

ColorI color 

color mul

bool wrap 

If true, the bitmap is tiled inside the control rather than stretched to fit.

Public Functions

setBitmap(String filename)

Assign an image to the control.

Child controls will resize according to their layout settings. Parameters:

filename

The filename of the image.

resize

A boolean value that decides whether the ctrl refreshes or not.

setBitmap(String filename, bool resize)

Assign an image to the control.

Child controls with resize according to their layout settings. Parameters:

filename

The filename of the image.

resize

Optional parameter. If true, the GUI will resize to fit the image.

setNamedTexture(String namedtexture)

Set a texture as the image.

Parameters:

namedtexture

The name of the texture (NamedTexTarget).

return:

true if the texture exists.

setValue(int x, int y)

Set the offset of the bitmap within the control.

Parameters:

x

The x-axis offset of the image.

y

The y-axis offset of the image.