OpenBarnyard
 
Loading...
Searching...
No Matches
AGUI2MenuGridTextItem.h
Go to the documentation of this file.
1#pragma once
2#include "AGUI2MenuGrid.h"
3#include "AGUI2Rectangle.h"
4#include "AGUI2TextBox.h"
5
7{
8public:
11
12 void Create( AGUI2Font* a_pFont, TFLOAT a_fWidth, const TWCHAR* a_wszText, TFLOAT a_fGap );
13
14 void SetId( TINT a_iID ) { m_iID = a_iID; }
15 TINT GetId() const { return m_iID; }
16
17 void SetScaleOnFocus( TBOOL a_bScaleOnFocus ) { m_bScaleOnFocus = a_bScaleOnFocus; }
18 void SetFocusedScale( TFLOAT a_fScale ) { m_fFocusedScale = a_fScale; }
19 void SetFocusedColour( TUINT a_uiColour ) { m_uiFocusedColour = a_uiColour; }
20 void SetEnabledColour( TUINT a_uiColour ) { m_uiEnabledColour = a_uiColour; }
21 void SetDisabledColour( TUINT a_uiColour ) { m_uiDisabledColour = a_uiColour; }
22
23 void SetTextShadow( TBOOL a_bEnabled, TUINT32 a_uiColour, TFLOAT a_fAlpha )
24 {
25 m_oTextBox.SetShadow( a_bEnabled, a_uiColour );
26 m_oTextBox.SetShadowAlpha( a_fAlpha );
27 }
28
29 void SetTextShadowOffset( TFLOAT a_fOffset ) { m_oTextBox.SetShadowOffset( a_fOffset, a_fOffset ); }
30 void SetTextShadowOffset( TFLOAT a_fOffsetX, TFLOAT a_fOffsetY ) { m_oTextBox.SetShadowOffset( a_fOffsetX, a_fOffsetY ); }
31
32 AGUI2TextBox& GetTextBox() { return m_oTextBox; }
33
34 //-----------------------------------------------------------------------------
35 // AGUI2Element
36 //-----------------------------------------------------------------------------
37 virtual void SetDimensions( TFLOAT a_fWidth, TFLOAT a_fHeight ) OVERRIDE;
38 virtual void SetAlpha( TFLOAT a_fAlpha ) OVERRIDE;
39 virtual void SetShadowAlpha( TFLOAT a_fAlpha ) OVERRIDE;
40
41 //-----------------------------------------------------------------------------
42 // AGUI2MenuGridItem
43 //-----------------------------------------------------------------------------
44 virtual void OnFocus() OVERRIDE;
45 virtual void OnFocusLost() OVERRIDE;
46 virtual void SetEnabled( TBOOL a_bEnabled );
49
50private:
51 TINT m_iID;
52 TBOOL m_bScaleOnFocus;
53 TBOOL m_bFocused;
54 TFLOAT m_fRectangle1Width;
55 TFLOAT m_fRectangle1Height;
56 TBOOL m_bUseRectangle1;
57 TINT m_Unk1;
58 AGUI2Rectangle m_oRectangle1;
59 TUINT m_uiFocusedColour;
60 TUINT m_uiEnabledColour;
61 TUINT m_uiDisabledColour;
62 TFLOAT m_fFocusedScale;
63 TFLOAT m_fScale;
64 AGUI2Font* m_pFont;
65 AGUI2TextBox m_oTextBox;
66 TFLOAT m_fGap;
67 TWCHAR* m_wszText;
68 TFLOAT m_fWidth;
69 AGUI2Rectangle m_oRectangle2;
70};
#define OVERRIDE
Definition Defines.h:12
wchar_t TWCHAR
Definition Typedefs.h:21
unsigned int TUINT
Definition Typedefs.h:8
float TFLOAT
Definition Typedefs.h:4
uint32_t TUINT32
Definition Typedefs.h:13
int TINT
Definition Typedefs.h:7
bool TBOOL
Definition Typedefs.h:6
virtual void SetDimensions(TFLOAT a_fWidth, TFLOAT a_fHeight) override
virtual void SetShadowAlpha(TFLOAT a_fAlpha) override
void SetEnabledColour(TUINT a_uiColour)
void SetFocusedScale(TFLOAT a_fScale)
void SetTextShadowOffset(TFLOAT a_fOffsetX, TFLOAT a_fOffsetY)
virtual void OnFocusLost() override
void Create(AGUI2Font *a_pFont, TFLOAT a_fWidth, const TWCHAR *a_wszText, TFLOAT a_fGap)
virtual void SetAlpha(TFLOAT a_fAlpha) override
virtual TFLOAT GetFlowVisualOffset() override
void SetFocusedColour(TUINT a_uiColour)
void SetScaleOnFocus(TBOOL a_bScaleOnFocus)
void SetDisabledColour(TUINT a_uiColour)
virtual void SetEnabled(TBOOL a_bEnabled)
void SetTextShadowOffset(TFLOAT a_fOffset)
void SetTextShadow(TBOOL a_bEnabled, TUINT32 a_uiColour, TFLOAT a_fAlpha)
virtual void OnFocus() override
virtual TFLOAT GetFlowOffset() override