147 virtual void getColor(
float* r,
float* g,
float* b,
float* a)
const;
156 virtual void setColor(
float r,
float g,
float b,
float a);
222 virtual void setText(
const std::string& text);
283 virtual void getSize(
float* w,
float* h)
const;
std::string myImagePath
Path to the image file.
Definition hudItem.h:302
virtual void setSize(float w, float h)
Sets the image size.
virtual float getWidth() const
Gets the width of the image.
virtual void setImagePath(const std::string &path)
Sets the image path.
virtual ~HudImageItem() override
Virtual destructor for HudImageItem.
HudImageItem()
Constructor for HudImageItem.
float mySize[2]
Size of the image [width, height].
Definition hudItem.h:305
virtual void getSize(float *w, float *h) const
Gets the current image size.
virtual float getHeight() const
Gets the height of the image.
virtual std::string getImagePath() const
Gets the current image path.
int myDirtyKey
Key that tracks whether the item needs to be redrawn.
Definition hudItem.h:181
virtual void setVisible(bool visible)
Sets the visibility of the HUD item.
virtual float getAlpha() const
Gets the alpha component of the item's color.
virtual void getPosition(float *x, float *y) const
Gets the current position of the HUD item.
virtual AlignHorizontal getHorizontalAlignment() const
Gets the current horizontal alignment.
Type myType
The type of this HUD item.
Definition hudItem.h:176
virtual void setPosition(float x, float y)
Sets the position of the HUD item.
float myPosition[2]
Position of the item in normalized screen space [x, y].
Definition hudItem.h:184
virtual AlignVertical getVerticalAlignment() const
Gets the current vertical alignment.
virtual void setColor(float r, float g, float b, float a)
Sets the color of the HUD item.
AlignHorizontal
Horizontal alignment options for HUD items.
Definition hudItem.h:42
@ LEFT
Align to the left edge.
Definition hudItem.h:44
@ RIGHT
Align to the right edge.
Definition hudItem.h:50
@ CENTER
Align to the horizontal center.
Definition hudItem.h:47
virtual int dirtyKey() const
Gets the current dirty key value.
virtual void getColor(float *r, float *g, float *b, float *a) const
Gets the current color of the HUD item.
AlignVertical myVerticalAlignment
Vertical alignment of the item.
Definition hudItem.h:190
virtual void setVerticalAlignment(AlignVertical align)
Sets the vertical alignment.
virtual float getGreen() const
Gets the green component of the item's color.
virtual bool getVisible() const
Gets whether the HUD item is currently visible.
float myColor[4]
Color of the item [r, g, b, a] with components in range 0.0 to 1.0.
Definition hudItem.h:196
Type
Enumeration of supported HUD item types.
Definition hudItem.h:29
@ TEXT
Text-based HUD item.
Definition hudItem.h:34
@ ILLEGAL_TYPE_UNDEFINED
Invalid or uninitialized HUD item type.
Definition hudItem.h:31
@ IMAGE
Image-based HUD item.
Definition hudItem.h:37
virtual Type type() const
Gets the type of this HUD item.
virtual void makeDirty()
Forces the item to be marked as dirty.
HudItem()
Constructor for HudItem.
virtual float getBlue() const
Gets the blue component of the item's color.
virtual float getRed() const
Gets the red component of the item's color.
AlignHorizontal myHorizontalAlignment
Horizontal alignment of the item.
Definition hudItem.h:187
virtual ~HudItem()
Virtual destructor for HudItem.
AlignVertical
Vertical alignment options for HUD items.
Definition hudItem.h:55
@ MIDDLE
Align to the vertical middle.
Definition hudItem.h:60
@ TOP
Align to the top edge.
Definition hudItem.h:57
@ BOTTOM
Align to the bottom edge.
Definition hudItem.h:63
virtual void setHorizontalAlignment(AlignHorizontal align)
Sets the horizontal alignment.
bool myVisible
Visibility flag for the item.
Definition hudItem.h:193
virtual float getX() const
Gets the x-coordinate of the item's position.
virtual float getY() const
Gets the y-coordinate of the item's position.
virtual void setText(const std::string &text)
Sets the text content.
std::string myText
The text content to display.
Definition hudItem.h:246
virtual void setFontPath(const std::string &path)
Sets the font path.
float myFontSize
Font size for rendering.
Definition hudItem.h:252
HudTextItem()
Constructor for HudTextItem.
virtual float getFontSize() const
Gets the current font size.
virtual std::string getText() const
Gets the current text content.
virtual ~HudTextItem() override
Virtual destructor for HudTextItem.
virtual std::string getFontPath() const
Gets the current font path.
virtual void setFontSize(float size)
Sets the font size.
std::string myFontPath
Path to the font file.
Definition hudItem.h:249
Defines export/import macros for the vreCommonComponents library.
#define VRECOMMONCOMPONENTS_DLL
DLL export/import macro for the vreCommonComponents library.
Definition export.h:28
Include export definitions for this library.
Definition glsVreMessageUtil.h:49