Bubba-3D
0.9.0
Awesome game engine!
|
#include <HUDGraphic.h>
Classes | |
class | Color |
struct | TexturePosition |
Public Member Functions | |
HUDGraphic (Texture *texture) | |
HUDGraphic (Color color) | |
HUDGraphic * | setCenterOffset (Dimension offsetX, Dimension offsetY) |
HUDGraphic * | setTexturePosition (TexturePosition< int > texturePosition) |
TexturePosition< float > | getTexturePosition () |
chag::float3 | getCenterOffset (float width, float height) |
Texture * | getTexture () |
chag::float4 | getColor () |
bool | isTextureElseColor () |
int * | getRoundedCorners () |
int * | getBorders () |
chag::float4 | getBorderColor () |
HUDGraphic * | setRoundedCorners (int pixels) |
HUDGraphic * | setRoundedCorners (int topLeft, int topRight, int botRight, int botLeft) |
HUDGraphic * | setBorder (int pixels, Color borderColor) |
HUDGraphic * | setBorder (int botAndTop, int leftAndRight, Color borderColor) |
HUDGraphic * | setBorder (int top, int right, int bot, int left, Color borderColor) |
HUDGraphic * | setBorderSize (int top, int right, int bot, int left) |
HUDGraphic * | setBorderColor (Color borderColor) |
HUDGraphic * | setBackground (Color color) |
HUDGraphic * | setBackground (Texture *texture) |
Protected Attributes | |
Dimension | offsetX |
Dimension | offsetY |
Texture * | texture = nullptr |
chag::float4 | color |
TexturePosition< int > | texturePosition |
bool | textureElseColor |
int | roundedCorners [4] = {0, 0, 0, 0} |
int | borders [4] = {0, 0, 0, 0} |
chag::float4 | borderColor |
A class used to specify the background graphics of Layout implementations.
Definition at line 29 of file HUDGraphic.h.
HUDGraphic::HUDGraphic | ( | Texture * | texture | ) |
Creates a graphic that has a texture as a background. If a portion of the texture is required, use HUDGraphic::setTexturePosition()
Definition at line 29 of file HUDGraphic.cpp.
HUDGraphic::HUDGraphic | ( | Color | color | ) |
Creates a graphic with a solid color as a background.
Definition at line 32 of file HUDGraphic.cpp.
float4 HUDGraphic::getBorderColor | ( | ) |
Returns the raw color of the border in RGBA
Definition at line 102 of file HUDGraphic.cpp.
int * HUDGraphic::getBorders | ( | ) |
Returns an array of size four. The sizes of the borders are in the following order: top, right, bot, left
Definition at line 106 of file HUDGraphic.cpp.
float4 HUDGraphic::getColor | ( | ) |
Returns the color of this graphic, or throws a runtime_error if it only contains a texture.
Definition at line 79 of file HUDGraphic.cpp.
int * HUDGraphic::getRoundedCorners | ( | ) |
Returns an array of size four. The sizes of the rounded corners are int he following order: top left, top right, bot right, bot left.
Definition at line 122 of file HUDGraphic.cpp.
Texture * HUDGraphic::getTexture | ( | ) |
Returns the texture of this graphic, or throws a runtime_error if it only contains a color.
Definition at line 69 of file HUDGraphic.cpp.
bool HUDGraphic::isTextureElseColor | ( | ) |
Returns true if this contains a texture
Definition at line 75 of file HUDGraphic.cpp.
HUDGraphic * HUDGraphic::setCenterOffset | ( | Dimension | offsetX, |
Dimension | offsetY | ||
) |
Set the offset from the actual center that the rotational center should be.
Definition at line 38 of file HUDGraphic.cpp.
HUDGraphic * HUDGraphic::setTexturePosition | ( | HUDGraphic::TexturePosition< int > | texturePosition | ) |
Sets the portion of the texture that should be used.
Definition at line 44 of file HUDGraphic.cpp.