OpenBarnyard
 
Loading...
Searching...
No Matches
AGUISystem.h
Go to the documentation of this file.
1#pragma once
2#include "Render/ARenderer.h"
3#include "AGUIMatlibPicture.h"
4
6#include <Toshi/TPString8.h>
7
8class AGUISystem : public Toshi::TTask
9 , public Toshi::TSingleton<AGUISystem>
10{
11public:
12 TDECLARE_CLASS( AGUISystem, Toshi::TTask );
13 static constexpr TUINT NUM_RENDER_OBJECTS = 2;
14
15public:
16 AGUISystem();
17
18 virtual TBOOL OnCreate() override;
19 virtual void OnDestroy() override;
20
21 void SetPicture( const Toshi::TPString8& a_rName );
22 void ResetPicture();
23
25 {
26 TASSERT( a_uiIndex < NUM_RENDER_OBJECTS );
27 return m_pRenderObjects[ a_uiIndex ];
28 }
29
31 {
32 return m_MatLibPicture;
33 }
34
35public:
36 static void AllowBackgroundClear( TBOOL a_bAllow );
37
38private:
39 static TBOOL __stdcall OnGUIRender( AGUISystem* a_pGUISystem, ARenderer* a_pRenderer, TINT* a_pUnknown );
40
41private:
42 TUINT m_Unk1;
43 Toshi::TGenericListener m_SomeListener;
44 Toshi::TListener<ARenderer, TINT, AGUISystem> m_RenderGUIListener;
45 Toshi::TPString8* m_pStrings;
46 AGUIMatlibPicture m_MatLibPicture;
47 TUINT m_Unk2;
48 TUINT m_Unk3;
49 PGUITRRenderObject* m_pRenderObjects[ NUM_RENDER_OBJECTS ];
50};
#define TASSERT(X,...)
Definition Defines.h:138
#define TDECLARE_CLASS(THIS_CLASS, PARENT_CLASS)
Definition TObject.h:38
unsigned int TUINT
Definition Typedefs.h:8
int TINT
Definition Typedefs.h:7
bool TBOOL
Definition Typedefs.h:6
static constexpr TUINT NUM_RENDER_OBJECTS
Definition AGUISystem.h:13
static void AllowBackgroundClear(TBOOL a_bAllow)
void ResetPicture()
PGUITRRenderObject * GetRenderObject(TUINT a_uiIndex)
Definition AGUISystem.h:24
virtual TBOOL OnCreate() override
void SetPicture(const Toshi::TPString8 &a_rName)
virtual void OnDestroy() override
AGUIMatlibPicture & GetMatlibPicture()
Definition AGUISystem.h:30