OpenBarnyard
 
Loading...
Searching...
No Matches
AGUI2Element Class Reference

#include <AGUI2Element.h>

Inheritance diagram for AGUI2Element:
AGUI2ElementNode AGUI2Dialog AGUI2Menu AGUI2MenuGrid AGUI2MenuGridItem AGUI2MenuItem AGUI2Rectangle AGUI2TextBox AGUI2MenuGridTextItem AVolumeSlider AGUI2Button AGUI2MouseCursor

Public Types

using t_PostRender = void ( * )()
 

Public Member Functions

 AGUI2Element ()
 
virtual ~AGUI2Element ()=default
 
virtual void Tick (TFLOAT a_fDeltaTime)
 
virtual void PreRender ()
 
virtual void Render ()
 
virtual void PostRender ()
 
virtual void GetDimensions (TFLOAT &a_rWidth, TFLOAT &a_rHeight)
 
virtual TFLOAT GetWidth ()
 
virtual TFLOAT GetHeight ()
 
virtual void SetWidth (TFLOAT a_fWidth)
 
virtual void SetHeight (TFLOAT a_fHeight)
 
virtual void SetDimensions (TFLOAT a_fWidth, TFLOAT a_fHeight)
 
virtual void GetMins (TFLOAT &a_fX, TFLOAT &a_fY)
 
virtual void GetMaxs (TFLOAT &a_fX, TFLOAT &a_fY)
 
virtual void SetColour (TUINT32 a_uiColour)
 
virtual void SetAlpha (TFLOAT a_fAlpha)
 
virtual void SetShadowAlpha (TFLOAT a_fAlpha)
 
virtual void SetFocus (TBOOL a_bFocused)
 
virtual TBOOL IsPointInside (TFLOAT a_fX, TFLOAT a_fY)
 
void AnchorPos (TFLOAT &a_rX, TFLOAT &a_rY, TFLOAT a_fWidth, TFLOAT a_fHeight)
 
void PivotPos (TFLOAT &a_rX, TFLOAT &a_rY, TFLOAT a_fWidth, TFLOAT a_fHeight)
 
void GetScreenTransform (AGUI2Transform &a_rOutTransform)
 
void GetInvScreenTransform (AGUI2Transform &a_rOutTransform)
 
void Show ()
 
void Hide ()
 
void SetInFront ()
 
void SetRenderBeforeChildren ()
 
TBOOL HasFlags (TUINT32 a_uiFlags) const
 
TBOOL IsVisible () const
 
TBOOL IsFocused () const
 
TBOOL ShouldRenderBeforeChildren ()
 
TBOOL IsInFront () const
 
TFLOAT GetAlpha () const
 
void AddChildTail (AGUI2Element &a_rElement)
 
void AddChildHead (AGUI2Element &a_rElement)
 
void SetTranslation (TFLOAT a_fX, TFLOAT a_fY)
 
void SetTranslation (const Toshi::TVector2 &a_rTranslation)
 
void SetTransform (TFLOAT a_fX, TFLOAT a_fY, float a_fRotAngle=0.0f)
 
void SetAnchor (AGUI2ATTACHMENT a_eAnchor)
 
void SetPivot (AGUI2ATTACHMENT a_ePivot)
 
void SetAttachment (AGUI2ATTACHMENT a_eAnchor, AGUI2ATTACHMENT a_ePivot)
 
t_PostRender SetPostRenderCallback (t_PostRender a_cbNewCallback)
 
AGUI2TransformGetTransform ()
 
AGUI2ElementChildBegin () const
 
AGUI2ElementChildRBegin () const
 
AGUI2ElementGetNextChild (AGUI2Element *a_pCurrentChild)
 
AGUI2ElementGetPrevChild (AGUI2Element *a_pCurrentChild)
 
void RemoveSelf ()
 
void LinkChildBefore (AGUI2Element &a_rNewChildren, AGUI2Element &a_rInsertAfter)
 
- Public Member Functions inherited from AGUI2ElementNode
 AGUI2ElementNode ()
 
virtual ~AGUI2ElementNode ()
 
void Unlink ()
 
void LinkAfter (AGUI2ElementNode &a_rNode)
 
void LinkBefore (AGUI2ElementNode &a_rNode)
 
TBOOL IsLinked () const
 
AGUI2ElementNodeGetNext () const
 
AGUI2ElementNodeGetPrev () const
 

Static Public Attributes

static TUINT32 s_uiVisibilityMask = 0xFFFFFFFF
 

Protected Attributes

AGUI2Elementm_pParent
 
AGUI2Transform m_oTransform
 
AGUI2ElementNode m_Children
 
AGUI2ATTACHMENT m_eAnchor
 
AGUI2ATTACHMENT m_ePivot
 
TFLOAT m_fWidth
 
TFLOAT m_fHeight
 
TUINT32 m_uiColour
 
TUINT32 m_eFlags
 
t_PostRender m_cbPostRender
 
TUINT32 m_uiVisibilityMask
 
- Protected Attributes inherited from AGUI2ElementNode
AGUI2ElementNodem_pNext
 
AGUI2ElementNodem_pPrev
 

Additional Inherited Members

- Public Attributes inherited from AGUI2ElementNode
friend AGUI2Element
 

Detailed Description

Definition at line 78 of file AGUI2Element.h.

Member Typedef Documentation

◆ t_PostRender

using AGUI2Element::t_PostRender = void ( * )()

Definition at line 81 of file AGUI2Element.h.

Constructor & Destructor Documentation

◆ AGUI2Element()

AGUI2Element::AGUI2Element ( )

Definition at line 13 of file AGUI2Element.cpp.

14{
16 m_fWidth = 0.0f;
17 m_fHeight = 0.0f;
18 m_uiColour = 0xFFFFFFFF;
19 m_uiVisibilityMask = 0xFFFFFFFF;
23 m_eFlags = 3;
24}
#define TNULL
Definition Typedefs.h:23
@ AGUI2ATTACHMENT_MIDDLECENTER
TUINT32 m_uiVisibilityMask
TUINT32 m_eFlags
TUINT32 m_uiColour
AGUI2ATTACHMENT m_eAnchor
t_PostRender m_cbPostRender
AGUI2Element * m_pParent
AGUI2ATTACHMENT m_ePivot

◆ ~AGUI2Element()

virtual AGUI2Element::~AGUI2Element ( )
virtualdefault

Member Function Documentation

◆ AddChildHead()

void AGUI2Element::AddChildHead ( AGUI2Element & a_rElement)
inline

Definition at line 168 of file AGUI2Element.h.

169 {
170 a_rElement.Unlink();
171 a_rElement.m_pParent = this;
172 a_rElement.LinkAfter( m_Children );
173 }
void LinkAfter(AGUI2ElementNode &a_rNode)
AGUI2ElementNode m_Children

◆ AddChildTail()

void AGUI2Element::AddChildTail ( AGUI2Element & a_rElement)
inline

Definition at line 161 of file AGUI2Element.h.

162 {
163 a_rElement.Unlink();
164 a_rElement.m_pParent = this;
165 a_rElement.LinkBefore( m_Children );
166 }
void LinkBefore(AGUI2ElementNode &a_rNode)

◆ AnchorPos()

void AGUI2Element::AnchorPos ( TFLOAT & a_rX,
TFLOAT & a_rY,
TFLOAT a_fWidth,
TFLOAT a_fHeight )

Definition at line 174 of file AGUI2Element.cpp.

175{
176 switch ( m_eAnchor )
177 {
179 a_rX -= a_fWidth * 0.5f;
180 a_rY -= a_fHeight * 0.5f;
181 break;
183 a_rY -= a_fHeight * 0.5f;
184 break;
186 a_rX += a_fWidth * 0.5f;
187 a_rY -= a_fHeight * 0.5f;
188 break;
190 a_rX -= a_fWidth * 0.5f;
191 break;
193 a_rX += a_fWidth * 0.5f;
194 break;
196 a_rX -= a_fWidth * 0.5f;
197 a_rY += a_fHeight * 0.5f;
198 break;
200 a_rY += a_fHeight * 0.5f;
201 break;
203 a_rX += a_fWidth * 0.5f;
204 a_rY += a_fHeight * 0.5f;
205 break;
206 }
207}
@ AGUI2ATTACHMENT_TOPLEFT
@ AGUI2ATTACHMENT_MIDDLELEFT
@ AGUI2ATTACHMENT_BOTTOMLEFT
@ AGUI2ATTACHMENT_MIDDLERIGHT
@ AGUI2ATTACHMENT_BOTTOMRIGHT
@ AGUI2ATTACHMENT_TOPRIGHT
@ AGUI2ATTACHMENT_BOTTOMCENTER
@ AGUI2ATTACHMENT_TOPCENTER

◆ ChildBegin()

AGUI2Element * AGUI2Element::ChildBegin ( ) const
inline

Definition at line 219 of file AGUI2Element.h.

220 {
221 return ( m_Children.IsLinked() ) ? (AGUI2Element*)m_Children.GetNext() : TNULL;
222 }

◆ ChildRBegin()

AGUI2Element * AGUI2Element::ChildRBegin ( ) const
inline

Definition at line 225 of file AGUI2Element.h.

226 {
227 return ( m_Children.IsLinked() ) ? (AGUI2Element*)m_Children.GetPrev() : TNULL;
228 }

◆ GetAlpha()

TFLOAT AGUI2Element::GetAlpha ( ) const
inline

Definition at line 156 of file AGUI2Element.h.

157 {
158 return ( ( m_uiColour & 0xFF000000 ) >> 24 ) * ( 1.0f / 255.0f );
159 }

◆ GetDimensions()

void AGUI2Element::GetDimensions ( TFLOAT & a_rWidth,
TFLOAT & a_rHeight )
virtual

Reimplemented in AGUI2Button, and AGUI2TextBox.

Definition at line 88 of file AGUI2Element.cpp.

89{
90 a_rWidth = m_fWidth;
91 a_rHeight = m_fHeight;
92}

◆ GetHeight()

TFLOAT AGUI2Element::GetHeight ( )
virtual

Reimplemented in AGUI2TextBox.

Definition at line 99 of file AGUI2Element.cpp.

100{
101 return m_fHeight;
102}

◆ GetInvScreenTransform()

void AGUI2Element::GetInvScreenTransform ( AGUI2Transform & a_rOutTransform)

Definition at line 290 of file AGUI2Element.cpp.

291{
292 AGUI2Transform transform;
293 GetScreenTransform( transform );
294 transform.GetInverse( a_rOutTransform );
295}
void GetScreenTransform(AGUI2Transform &a_rOutTransform)
void GetInverse(AGUI2Transform &a_rInverse) const

◆ GetMaxs()

void AGUI2Element::GetMaxs ( TFLOAT & a_fX,
TFLOAT & a_fY )
virtual

Definition at line 128 of file AGUI2Element.cpp.

129{
130 TFLOAT fWidth, fHeight;
131 GetDimensions( fWidth, fHeight );
132 a_fX = fWidth * 0.5f;
133 a_fY = fHeight * 0.5f;
134}
float TFLOAT
Definition Typedefs.h:4
virtual void GetDimensions(TFLOAT &a_rWidth, TFLOAT &a_rHeight)

◆ GetMins()

void AGUI2Element::GetMins ( TFLOAT & a_fX,
TFLOAT & a_fY )
virtual

Definition at line 120 of file AGUI2Element.cpp.

121{
122 TFLOAT fWidth, fHeight;
123 GetDimensions( fWidth, fHeight );
124 a_fX = fWidth * -0.5f;
125 a_fY = fHeight * -0.5f;
126}

◆ GetNextChild()

AGUI2Element * AGUI2Element::GetNextChild ( AGUI2Element * a_pCurrentChild)
inline

Definition at line 231 of file AGUI2Element.h.

232 {
233 if ( a_pCurrentChild->GetNext() == &m_Children || a_pCurrentChild->GetNext() == a_pCurrentChild )
234 return TNULL;
235
236 return (AGUI2Element*)a_pCurrentChild->GetNext();
237 }
AGUI2ElementNode * GetNext() const

◆ GetPrevChild()

AGUI2Element * AGUI2Element::GetPrevChild ( AGUI2Element * a_pCurrentChild)
inline

Definition at line 240 of file AGUI2Element.h.

241 {
242 if ( a_pCurrentChild->GetPrev() == &m_Children || a_pCurrentChild->GetPrev() == a_pCurrentChild )
243 return TNULL;
244
245 return (AGUI2Element*)a_pCurrentChild->GetPrev();
246 }
AGUI2ElementNode * GetPrev() const

◆ GetScreenTransform()

void AGUI2Element::GetScreenTransform ( AGUI2Transform & a_rOutTransform)

Definition at line 244 of file AGUI2Element.cpp.

245{
246 Toshi::TVector2 vecAnchorPos = { 0.0f, 0.0f };
247 Toshi::TVector2 vecPivotPos = { 0.0f, 0.0f };
248
249 if ( m_pParent != TNULL )
250 {
251 TFLOAT fParentWidth, fParentHeight;
252 m_pParent->GetDimensions( fParentWidth, fParentHeight );
253 AnchorPos( vecAnchorPos.x, vecAnchorPos.y, fParentWidth, fParentHeight );
254 }
255
256 TFLOAT fWidth, fHeight;
257 GetDimensions( fWidth, fHeight );
258 PivotPos( vecPivotPos.x, vecPivotPos.y, fWidth, fHeight );
259
260 AGUI2Transform transform1;
261 AGUI2Transform transform2;
262
263 if ( m_pParent )
264 {
265 m_pParent->GetScreenTransform( transform1 );
266 transform2 = GetTransform();
267 }
268 else
269 {
270 auto pDisplayParams = Toshi::TRenderInterface::GetSingleton()->GetCurrentDisplayParams();
271
272 transform1.m_aMatrixRows[ 0 ] = { 1.0f, 0.0f };
273 transform1.m_aMatrixRows[ 1 ] = { 0.0f, 1.0f };
274 transform1.m_vecTranslation = { pDisplayParams->uiWidth / 2.0f, pDisplayParams->uiHeight / 2.0f };
275
276 transform1.Scale( pDisplayParams->uiWidth / fWidth, pDisplayParams->uiHeight / fHeight );
277 transform2 = GetTransform();
278 }
279
280 Toshi::TVector2 vec;
281 transform1.Transform( vec, vecAnchorPos );
282 transform1.m_vecTranslation = { vec.x, vec.y };
283
284 transform2.Transform( vec, vecPivotPos );
285 transform2.m_vecTranslation = { vec.x, vec.y };
286
287 AGUI2Transform::Multiply( a_rOutTransform, transform1, transform2 );
288}
AGUI2Transform & GetTransform()
void AnchorPos(TFLOAT &a_rX, TFLOAT &a_rY, TFLOAT a_fWidth, TFLOAT a_fHeight)
void PivotPos(TFLOAT &a_rX, TFLOAT &a_rY, TFLOAT a_fWidth, TFLOAT a_fHeight)
void Transform(Toshi::TVector2 &a_rOutVec, const Toshi::TVector2 &a_rTransformVec) const
Toshi::TVector2 m_vecTranslation
Toshi::TVector2 m_aMatrixRows[2]
static void Multiply(AGUI2Transform &a_rOutTransform, const AGUI2Transform &a_rA, const AGUI2Transform &a_rB)
void Scale(TFLOAT a_fScaleX, TFLOAT a_fScaleY)

◆ GetTransform()

AGUI2Transform & AGUI2Element::GetTransform ( )
inline

Definition at line 213 of file AGUI2Element.h.

214 {
215 return m_oTransform;
216 }
AGUI2Transform m_oTransform

◆ GetWidth()

TFLOAT AGUI2Element::GetWidth ( )
virtual

Reimplemented in AGUI2TextBox.

Definition at line 94 of file AGUI2Element.cpp.

95{
96 return m_fWidth;
97}

◆ HasFlags()

TBOOL AGUI2Element::HasFlags ( TUINT32 a_uiFlags) const
inline

Definition at line 131 of file AGUI2Element.h.

132 {
133 return ( m_eFlags & a_uiFlags ) == m_eFlags;
134 }

◆ Hide()

void AGUI2Element::Hide ( )
inline

Definition at line 116 of file AGUI2Element.h.

117 {
118 m_eFlags &= ~1;
119 }

◆ IsFocused()

TBOOL AGUI2Element::IsFocused ( ) const
inline

Definition at line 141 of file AGUI2Element.h.

142 {
143 return m_eFlags & 2;
144 }

◆ IsInFront()

TBOOL AGUI2Element::IsInFront ( ) const
inline

Definition at line 151 of file AGUI2Element.h.

152 {
153 return m_eFlags & 16;
154 }

◆ IsPointInside()

TBOOL AGUI2Element::IsPointInside ( TFLOAT a_fX,
TFLOAT a_fY )
virtual

Definition at line 163 of file AGUI2Element.cpp.

164{
165 TFLOAT minX, minY;
166 TFLOAT maxX, maxY;
167
168 GetMins( minX, minY );
169 GetMaxs( maxX, maxY );
170
171 return ( minX <= a_fX && a_fX <= maxX ) && ( minY <= a_fY && a_fY <= maxY );
172}
virtual void GetMaxs(TFLOAT &a_fX, TFLOAT &a_fY)
virtual void GetMins(TFLOAT &a_fX, TFLOAT &a_fY)

◆ IsVisible()

TBOOL AGUI2Element::IsVisible ( ) const
inline

Definition at line 136 of file AGUI2Element.h.

137 {
138 return ( m_eFlags & 1 ) && ( m_uiVisibilityMask & s_uiVisibilityMask ) != 0;
139 }
static TUINT32 s_uiVisibilityMask

◆ LinkChildBefore()

void AGUI2Element::LinkChildBefore ( AGUI2Element & a_rNewChildren,
AGUI2Element & a_rInsertAfter )
inline

Definition at line 254 of file AGUI2Element.h.

255 {
256 a_rNewChildren.LinkBefore( a_rInsertAfter );
257 }

◆ PivotPos()

void AGUI2Element::PivotPos ( TFLOAT & a_rX,
TFLOAT & a_rY,
TFLOAT a_fWidth,
TFLOAT a_fHeight )

Definition at line 209 of file AGUI2Element.cpp.

210{
211 switch ( m_ePivot )
212 {
214 a_rX += a_fWidth * 0.5f;
215 a_rY += a_fHeight * 0.5f;
216 break;
218 a_rY += a_fHeight * 0.5f;
219 break;
221 a_rX -= a_fWidth * 0.5f;
222 a_rY += a_fHeight * 0.5f;
223 break;
225 a_rX += a_fWidth * 0.5f;
226 break;
228 a_rX -= a_fWidth * 0.5f;
229 break;
231 a_rX += a_fWidth * 0.5f;
232 a_rY -= a_fHeight * 0.5f;
233 break;
235 a_rY -= a_fHeight * 0.5f;
236 break;
238 a_rX -= a_fWidth * 0.5f;
239 a_rY -= a_fHeight * 0.5f;
240 break;
241 }
242}

◆ PostRender()

void AGUI2Element::PostRender ( )
virtual

Definition at line 83 of file AGUI2Element.cpp.

84{
86}
static AGUI2Renderer * GetRenderer()
Definition AGUI2.cpp:239
virtual void PopTransform()=0

◆ PreRender()

void AGUI2Element::PreRender ( )
virtual

Definition at line 34 of file AGUI2Element.cpp.

35{
36 Toshi::TVector2 vecAnchorPos = { 0.0f, 0.0f };
37 Toshi::TVector2 vecPivotPos = { 0.0f, 0.0f };
38
39 if ( m_pParent != TNULL )
40 {
41 TFLOAT fParentWidth, fParentHeight;
42 m_pParent->GetDimensions( fParentWidth, fParentHeight );
43 AnchorPos( vecAnchorPos.x, vecAnchorPos.y, fParentWidth, fParentHeight );
44 }
45
46 TFLOAT fWidth, fHeight;
47 GetDimensions( fWidth, fHeight );
48 PivotPos( vecPivotPos.x, vecPivotPos.y, fWidth, fHeight );
49
50 AGUI2::GetRenderer()->PushTransform( m_oTransform, vecAnchorPos, vecPivotPos );
51}
virtual void PushTransform(const AGUI2Transform &a_rTransform, const Toshi::TVector2 &a_rVec1, const Toshi::TVector2 &a_rVec2)=0

◆ RemoveSelf()

void AGUI2Element::RemoveSelf ( )
inline

Definition at line 248 of file AGUI2Element.h.

249 {
252 }

◆ Render()

void AGUI2Element::Render ( )
virtual

Reimplemented in AGUI2Dialog, AGUI2Rectangle, and AGUI2TextBox.

Definition at line 53 of file AGUI2Element.cpp.

54{
55#if 0
56 {
57 TFLOAT fWidth;
58 TFLOAT fHeight;
59 GetDimensions(fWidth, fHeight);
60 Toshi::TVector2 pos1 = { -fWidth / 2, -fHeight / 2 };
61 Toshi::TVector2 pos2 = { pos1.x + fWidth - 1, pos1.y + fHeight - 1 };
62
64 }
65#endif
66
67 for ( AGUI2Element* it = ChildRBegin(); it != TNULL && it != &m_Children; it = GetPrevChild( it ) )
68 {
69 if ( it->IsVisible() )
70 {
71 it->PreRender();
72 it->Render();
73 it->PostRender();
74 }
75 }
76
77 if ( m_cbPostRender )
78 {
80 }
81}
AGUI2Element * GetPrevChild(AGUI2Element *a_pCurrentChild)
AGUI2Element * ChildRBegin() const
virtual void RenderOutlineRectangle(const Toshi::TVector2 &a, const Toshi::TVector2 &b)=0

◆ SetAlpha()

void AGUI2Element::SetAlpha ( TFLOAT a_fAlpha)
virtual

Reimplemented in AGUI2Button, AGUI2Dialog, AGUI2MenuGridTextItem, and AGUI2MenuItem.

Definition at line 141 of file AGUI2Element.cpp.

142{
143 TUINT8 alpha8 = (TUINT8)( a_fAlpha * 255.0f );
144 m_uiColour = ( m_uiColour & 0x00FFFFFF ) | alpha8 << 24;
145}
uint8_t TUINT8
Definition Typedefs.h:17

◆ SetAnchor()

void AGUI2Element::SetAnchor ( AGUI2ATTACHMENT a_eAnchor)
inline

Definition at line 192 of file AGUI2Element.h.

193 {
194 m_eAnchor = a_eAnchor;
195 }

◆ SetAttachment()

void AGUI2Element::SetAttachment ( AGUI2ATTACHMENT a_eAnchor,
AGUI2ATTACHMENT a_ePivot )
inline

Definition at line 202 of file AGUI2Element.h.

203 {
204 m_eAnchor = a_eAnchor;
205 m_ePivot = a_ePivot;
206 }

◆ SetColour()

void AGUI2Element::SetColour ( TUINT32 a_uiColour)
virtual

Reimplemented in AGUI2Dialog.

Definition at line 136 of file AGUI2Element.cpp.

137{
138 m_uiColour = a_uiColour;
139}

◆ SetDimensions()

void AGUI2Element::SetDimensions ( TFLOAT a_fWidth,
TFLOAT a_fHeight )
virtual

Reimplemented in AGUI2Dialog, and AGUI2MenuGridTextItem.

Definition at line 114 of file AGUI2Element.cpp.

115{
116 m_fWidth = a_fWidth;
117 m_fHeight = a_fHeight;
118}

◆ SetFocus()

void AGUI2Element::SetFocus ( TBOOL a_bFocused)
virtual

Reimplemented in AGUI2Dialog.

Definition at line 151 of file AGUI2Element.cpp.

152{
153 if ( a_bFocused )
154 {
155 m_eFlags |= 2;
156 }
157 else
158 {
159 m_eFlags &= ~2;
160 }
161}

◆ SetHeight()

void AGUI2Element::SetHeight ( TFLOAT a_fHeight)
virtual

Definition at line 109 of file AGUI2Element.cpp.

110{
111 m_fHeight = a_fHeight;
112}

◆ SetInFront()

void AGUI2Element::SetInFront ( )
inline

Definition at line 121 of file AGUI2Element.h.

122 {
123 m_eFlags |= 16;
124 }

◆ SetPivot()

void AGUI2Element::SetPivot ( AGUI2ATTACHMENT a_ePivot)
inline

Definition at line 197 of file AGUI2Element.h.

198 {
199 m_ePivot = a_ePivot;
200 }

◆ SetPostRenderCallback()

t_PostRender AGUI2Element::SetPostRenderCallback ( t_PostRender a_cbNewCallback)
inline

Definition at line 208 of file AGUI2Element.h.

209 {
210 return std::exchange( m_cbPostRender, a_cbNewCallback );
211 }

◆ SetRenderBeforeChildren()

void AGUI2Element::SetRenderBeforeChildren ( )
inline

Definition at line 126 of file AGUI2Element.h.

127 {
128 m_eFlags |= 8;
129 }

◆ SetShadowAlpha()

void AGUI2Element::SetShadowAlpha ( TFLOAT a_fAlpha)
virtual

Reimplemented in AGUI2Button, AGUI2MenuGridTextItem, and AGUI2TextBox.

Definition at line 147 of file AGUI2Element.cpp.

148{
149}

◆ SetTransform()

void AGUI2Element::SetTransform ( TFLOAT a_fX,
TFLOAT a_fY,
float a_fRotAngle = 0.0f )
inline

Definition at line 185 of file AGUI2Element.h.

186 {
187 m_oTransform = AGUI2Transform();
188 m_oTransform.Rotate( a_fRotAngle );
189 m_oTransform.SetTranslation( a_fX, a_fY );
190 }

◆ SetTranslation() [1/2]

void AGUI2Element::SetTranslation ( const Toshi::TVector2 & a_rTranslation)
inline

Definition at line 180 of file AGUI2Element.h.

181 {
182 m_oTransform.SetTranslation( a_rTranslation );
183 }

◆ SetTranslation() [2/2]

void AGUI2Element::SetTranslation ( TFLOAT a_fX,
TFLOAT a_fY )
inline

Definition at line 175 of file AGUI2Element.h.

176 {
177 m_oTransform.SetTranslation( a_fX, a_fY );
178 }

◆ SetWidth()

void AGUI2Element::SetWidth ( TFLOAT a_fWidth)
virtual

Reimplemented in AGUI2TextBox.

Definition at line 104 of file AGUI2Element.cpp.

105{
106 m_fWidth = a_fWidth;
107}

◆ ShouldRenderBeforeChildren()

TBOOL AGUI2Element::ShouldRenderBeforeChildren ( )
inline

Definition at line 146 of file AGUI2Element.h.

147 {
148 return m_eFlags & 8;
149 }

◆ Show()

void AGUI2Element::Show ( )
inline

Definition at line 111 of file AGUI2Element.h.

112 {
113 m_eFlags |= 1;
114 }

◆ Tick()

void AGUI2Element::Tick ( TFLOAT a_fDeltaTime)
virtual

Definition at line 26 of file AGUI2Element.cpp.

27{
28 for ( AGUI2Element* it = ChildRBegin(); it != TNULL; it = GetPrevChild( it ) )
29 {
30 it->Tick( a_fDeltaTime );
31 }
32}

Member Data Documentation

◆ m_cbPostRender

t_PostRender AGUI2Element::m_cbPostRender
protected

Definition at line 272 of file AGUI2Element.h.

◆ m_Children

AGUI2ElementNode AGUI2Element::m_Children
protected

Definition at line 265 of file AGUI2Element.h.

◆ m_eAnchor

AGUI2ATTACHMENT AGUI2Element::m_eAnchor
protected

Definition at line 266 of file AGUI2Element.h.

◆ m_eFlags

TUINT32 AGUI2Element::m_eFlags
protected

Definition at line 271 of file AGUI2Element.h.

◆ m_ePivot

AGUI2ATTACHMENT AGUI2Element::m_ePivot
protected

Definition at line 267 of file AGUI2Element.h.

◆ m_fHeight

TFLOAT AGUI2Element::m_fHeight
protected

Definition at line 269 of file AGUI2Element.h.

◆ m_fWidth

TFLOAT AGUI2Element::m_fWidth
protected

Definition at line 268 of file AGUI2Element.h.

◆ m_oTransform

AGUI2Transform AGUI2Element::m_oTransform
protected

Definition at line 264 of file AGUI2Element.h.

◆ m_pParent

AGUI2Element* AGUI2Element::m_pParent
protected

Definition at line 263 of file AGUI2Element.h.

◆ m_uiColour

TUINT32 AGUI2Element::m_uiColour
protected

Definition at line 270 of file AGUI2Element.h.

◆ m_uiVisibilityMask

TUINT32 AGUI2Element::m_uiVisibilityMask
protected

Definition at line 273 of file AGUI2Element.h.

◆ s_uiVisibilityMask

TUINT32 AGUI2Element::s_uiVisibilityMask = 0xFFFFFFFF
inlinestatic

Definition at line 260 of file AGUI2Element.h.


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