30 it->Tick( a_fDeltaTime );
36 Toshi::TVector2 vecAnchorPos = { 0.0f, 0.0f };
37 Toshi::TVector2 vecPivotPos = { 0.0f, 0.0f };
41 TFLOAT fParentWidth, fParentHeight;
42 m_pParent->GetDimensions( fParentWidth, fParentHeight );
43 AnchorPos( vecAnchorPos.x, vecAnchorPos.y, fParentWidth, fParentHeight );
48 PivotPos( vecPivotPos.x, vecPivotPos.y, fWidth, fHeight );
60 Toshi::TVector2 pos1 = { -fWidth / 2, -fHeight / 2 };
61 Toshi::TVector2 pos2 = { pos1.x + fWidth - 1, pos1.y + fHeight - 1 };
69 if ( it->IsVisible() )
124 a_fX = fWidth * -0.5f;
125 a_fY = fHeight * -0.5f;
132 a_fX = fWidth * 0.5f;
133 a_fY = fHeight * 0.5f;
171 return ( minX <= a_fX && a_fX <= maxX ) && ( minY <= a_fY && a_fY <= maxY );
179 a_rX -= a_fWidth * 0.5f;
180 a_rY -= a_fHeight * 0.5f;
183 a_rY -= a_fHeight * 0.5f;
186 a_rX += a_fWidth * 0.5f;
187 a_rY -= a_fHeight * 0.5f;
190 a_rX -= a_fWidth * 0.5f;
193 a_rX += a_fWidth * 0.5f;
196 a_rX -= a_fWidth * 0.5f;
197 a_rY += a_fHeight * 0.5f;
200 a_rY += a_fHeight * 0.5f;
203 a_rX += a_fWidth * 0.5f;
204 a_rY += a_fHeight * 0.5f;
214 a_rX += a_fWidth * 0.5f;
215 a_rY += a_fHeight * 0.5f;
218 a_rY += a_fHeight * 0.5f;
221 a_rX -= a_fWidth * 0.5f;
222 a_rY += a_fHeight * 0.5f;
225 a_rX += a_fWidth * 0.5f;
228 a_rX -= a_fWidth * 0.5f;
231 a_rX += a_fWidth * 0.5f;
232 a_rY -= a_fHeight * 0.5f;
235 a_rY -= a_fHeight * 0.5f;
238 a_rX -= a_fWidth * 0.5f;
239 a_rY -= a_fHeight * 0.5f;
246 Toshi::TVector2 vecAnchorPos = { 0.0f, 0.0f };
247 Toshi::TVector2 vecPivotPos = { 0.0f, 0.0f };
251 TFLOAT fParentWidth, fParentHeight;
252 m_pParent->GetDimensions( fParentWidth, fParentHeight );
253 AnchorPos( vecAnchorPos.x, vecAnchorPos.y, fParentWidth, fParentHeight );
258 PivotPos( vecPivotPos.x, vecPivotPos.y, fWidth, fHeight );
265 m_pParent->GetScreenTransform( transform1 );
270 auto pDisplayParams = Toshi::TRenderInterface::GetSingleton()->GetCurrentDisplayParams();
274 transform1.
m_vecTranslation = { pDisplayParams->uiWidth / 2.0f, pDisplayParams->uiHeight / 2.0f };
276 transform1.
Scale( pDisplayParams->uiWidth / fWidth, pDisplayParams->uiHeight / fHeight );
281 transform1.
Transform( vec, vecAnchorPos );
284 transform2.
Transform( vec, vecPivotPos );
Rendering system interface for the Toshi engine.
@ AGUI2ATTACHMENT_TOPLEFT
@ AGUI2ATTACHMENT_MIDDLELEFT
@ AGUI2ATTACHMENT_MIDDLECENTER
@ AGUI2ATTACHMENT_BOTTOMLEFT
@ AGUI2ATTACHMENT_MIDDLERIGHT
@ AGUI2ATTACHMENT_BOTTOMRIGHT
@ AGUI2ATTACHMENT_TOPRIGHT
@ AGUI2ATTACHMENT_BOTTOMCENTER
@ AGUI2ATTACHMENT_TOPCENTER
static AGUI2Renderer * GetRenderer()
AGUI2Transform & GetTransform()
TUINT32 m_uiVisibilityMask
void AnchorPos(TFLOAT &a_rX, TFLOAT &a_rY, TFLOAT a_fWidth, TFLOAT a_fHeight)
virtual void GetMaxs(TFLOAT &a_fX, TFLOAT &a_fY)
virtual void SetWidth(TFLOAT a_fWidth)
AGUI2ATTACHMENT m_eAnchor
AGUI2Transform m_oTransform
AGUI2ElementNode m_Children
void PivotPos(TFLOAT &a_rX, TFLOAT &a_rY, TFLOAT a_fWidth, TFLOAT a_fHeight)
virtual void GetMins(TFLOAT &a_fX, TFLOAT &a_fY)
virtual TFLOAT GetHeight()
virtual TFLOAT GetWidth()
virtual void GetDimensions(TFLOAT &a_rWidth, TFLOAT &a_rHeight)
void GetScreenTransform(AGUI2Transform &a_rOutTransform)
AGUI2Element * GetPrevChild(AGUI2Element *a_pCurrentChild)
virtual void PostRender()
virtual void SetColour(TUINT32 a_uiColour)
virtual void Tick(TFLOAT a_fDeltaTime)
virtual void SetShadowAlpha(TFLOAT a_fAlpha)
t_PostRender m_cbPostRender
void GetInvScreenTransform(AGUI2Transform &a_rOutTransform)
AGUI2Element * ChildRBegin() const
virtual TBOOL IsPointInside(TFLOAT a_fX, TFLOAT a_fY)
virtual void SetDimensions(TFLOAT a_fWidth, TFLOAT a_fHeight)
virtual void SetHeight(TFLOAT a_fHeight)
virtual void SetFocus(TBOOL a_bFocused)
virtual void SetAlpha(TFLOAT a_fAlpha)
virtual void PopTransform()=0
virtual void PushTransform(const AGUI2Transform &a_rTransform, const Toshi::TVector2 &a_rVec1, const Toshi::TVector2 &a_rVec2)=0
virtual void RenderOutlineRectangle(const Toshi::TVector2 &a, const Toshi::TVector2 &b)=0
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)
void GetInverse(AGUI2Transform &a_rInverse) const