40 m_oMenu.ProcessInputEvent( a_pInputEvent );
52 else if ( !
m_oMenu.ProcessInputCommand( a_eInputCommand, a_pInputEvent ) )
62static TFLOAT s_fOscillatorAmplitude = 2.0f -
TMath::Sin( s_fOscillatorPeriod );
77 m_oDialog.GetTransform().SetFromScale( fScale, fScale );
88 SetDialogOpacity(
m_oDialog.GetAlpha() + a_fDeltaTime * 5.0f );
98 m_oDialog.GetTransform().SetFromScale( fScale, fScale );
103 SetDialogOpacity(
m_oDialog.GetAlpha() - a_fDeltaTime * 5.0f );
149 m_oMenu.SetMenuAlpha( 0.0f, 0.0f );
178 m_oMenu.GetFocusedMenuItem()->GetTransform().SetScale( fScale, fScale );
181 m_oMenu.Update( a_fDeltaTime );
197 AGUI2::GetSingleton()->GetDimensions( fWidth, fHeight );
242 m_oMenu.SetCallbackUserData(
this );
247 m_oMenu.ReflowChildrenVertically();
250 TFLOAT fMenuWidth, fMenuHeight;
251 m_oMenu.GetDimensions( fMenuWidth, fMenuHeight );
253 if ( fMenuHeight < 128.0f )
254 fMenuHeight = 128.0f;
256 if ( fMenuWidth < 384.0f )
260 m_oDialog.SetDialogSize( fMenuWidth + 128.0f, fMenuHeight + 128.0f );
264 m_oDialog.GetTransform().PreMultiply( oDialogTransform );
269 TFLOAT fGUIRootWidth, fGUIRootHeight;
296 AGUI2::GetSingleton()->SetCursorVisible(
TTRUE );
305 m_oDialog.GetTransform().PreMultiply( oDialogTransform );
317 AGUI2::GetSingleton()->SetCursorVisible(
TFALSE );
342void ABYardMenuState::UpdateMenuOpacity()
348void ABYardMenuState::SetDialogOpacity(
TFLOAT a_fOpacity )
#define TSTATICCAST(POINTERTYPE, VALUE)
#define TOSHI_NAMESPACE_USING
#define TDEFINE_CLASS_NORUNTIME(...)
#define TPSTRING8_DECLARE(STR)
@ AGUI2ATTACHMENT_TOPCENTER
#define AGUI2STYLE_FONT_PRIMARY
TFORCEINLINE void Clip(T &rVal, const T &Min, const T &Max)
TFORCEINLINE const T & Max(const T &a, const T &b)
TFORCEINLINE TFLOAT Sin(TFLOAT fVal)
virtual void OnMenuItemFocused(AGUI2MenuItem &a_rOldFocus, AGUI2MenuItem &a_rNewFocus)
static Toshi::TVector2 ms_vecActivatedButtonTranslation
virtual void OnMenuClose()
virtual void OnActivate() override
TBOOL m_bFocusedElementBloated
AGUI2TextBox m_oDialogTitle
virtual TBOOL OnUpdate(TFLOAT a_fDeltaTime) override
virtual void OnRemoval() override
static TFLOAT ms_fAnimationTime
virtual TBOOL ProcessCommand(AInputCommand a_eInputCommand, const Toshi::TInputInterface::InputEvent *a_pInputEvent, TBOOL &a_rStopEvents) override
virtual void OnMenuOpen()
static Toshi::TVector2 ms_vecActivatedButtonShadow
void OnButtonActivated(AGUI2Button *a_pButton)
AGUI2Element m_oRootElement
TFLOAT m_fOscillatorOffset
TFLOAT * m_pButtonRotations
@ MENUSTATE_MENU_DISAPPEAR
@ MENUSTATE_DIALOG_DISAPPEAR
@ MENUSTATE_DIALOG_APPEAR
virtual TBOOL ProcessInput(const Toshi::TInputInterface::InputEvent *a_pInputEvent) override
AGUI2Rectangle m_oDialogTitleBackground
AGUI2Rectangle m_oRectangle2
virtual void OnDeactivate() override
virtual void OnInsertion() override
virtual TBOOL OnUpdate(TFLOAT a_fDeltaTime)
virtual TBOOL ProcessInput(const Toshi::TInputInterface::InputEvent *a_pInputEvent)
void SetInputMap(const Toshi::TPString8 &a_MapName)
virtual void OnInsertion()
static AGUI2Element * GetRootElement()
AGUI2TextBox & GetTextBox()
AGUI2Transform & GetTransform()
void AddChildTail(AGUI2Element &a_rElement)
virtual void GetDimensions(TFLOAT &a_rWidth, TFLOAT &a_rHeight)
TFLOAT GetTextWidth(const TWCHAR *a_wszText, TFLOAT a_fScale=1.0f)
static AGUI2Font * FindFont(const TCHAR *a_szFontName)
void SetMenuAlpha(TFLOAT a_fAlpha, TFLOAT a_fShadowAlpha=-1.0f)
TFLOAT GetShadowOffsetX() const
TFLOAT GetShadowOffsetY() const
static AGUI2TextureSection * GetTextureSection(const TCHAR *a_szSectionName)
constexpr const Toshi::TVector2 & GetTranslation() const
Toshi::TVector2 m_vecTranslation
Toshi::TVector2 m_aMatrixRows[2]
constexpr void SetTranslation(TFLOAT a_fX, TFLOAT a_fY)
void Scale(TFLOAT a_fScaleX, TFLOAT a_fScaleY)