format UIController

This commit is contained in:
Tropical 2026-03-22 03:15:07 -05:00
parent 03355211ca
commit 4486fc7ab4
2 changed files with 2766 additions and 2626 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
#pragma once #pragma once
//using namespace std; // using namespace std;
#include <cstdint> #include <cstdint>
#include "IUIController.h" #include "IUIController.h"
@ -14,359 +14,417 @@ class UIComponent_DebugUIMarketingGuide;
class UIControl; class UIControl;
// Base class for all shared functions between UIControllers // Base class for all shared functions between UIControllers
class UIController : public IUIController class UIController : public IUIController {
{
public: public:
static __int64 iggyAllocCount; static __int64 iggyAllocCount;
// MGH - added to prevent crash loading Iggy movies while the skins were being reloaded // MGH - added to prevent crash loading Iggy movies while the skins were
static CRITICAL_SECTION ms_reloadSkinCS; // being reloaded
static bool ms_bReloadSkinCSInitialised; static CRITICAL_SECTION ms_reloadSkinCS;
static bool ms_bReloadSkinCSInitialised;
protected: protected:
UIComponent_DebugUIConsole *m_uiDebugConsole; UIComponent_DebugUIConsole* m_uiDebugConsole;
UIComponent_DebugUIMarketingGuide *m_uiDebugMarketingGuide; UIComponent_DebugUIMarketingGuide* m_uiDebugMarketingGuide;
private: private:
CRITICAL_SECTION m_navigationLock; CRITICAL_SECTION m_navigationLock;
static const int UI_REPEAT_KEY_DELAY_MS = 300; // How long from press until the first repeat static const int UI_REPEAT_KEY_DELAY_MS =
static const int UI_REPEAT_KEY_REPEAT_RATE_MS = 100; // How long in between repeats 300; // How long from press until the first repeat
std::uint32_t m_actionRepeatTimer[XUSER_MAX_COUNT][ACTION_MAX_MENU+1]; static const int UI_REPEAT_KEY_REPEAT_RATE_MS =
100; // How long in between repeats
std::uint32_t m_actionRepeatTimer[XUSER_MAX_COUNT][ACTION_MAX_MENU + 1];
float m_fScreenWidth; float m_fScreenWidth;
float m_fScreenHeight; float m_fScreenHeight;
bool m_bScreenWidthSetup; bool m_bScreenWidthSetup;
S32 m_tileOriginX, m_tileOriginY; S32 m_tileOriginX, m_tileOriginY;
UIAbstractBitmapFont *m_mcBitmapFont; UIAbstractBitmapFont* m_mcBitmapFont;
UITTFFont *m_mcTTFFont; UITTFFont* m_mcTTFFont;
UIBitmapFont *m_moj7, *m_moj11; UIBitmapFont *m_moj7, *m_moj11;
// 4J-PB - ui element type for PSVita touch control // 4J-PB - ui element type for PSVita touch control
#ifdef __PSVITA__ #ifdef __PSVITA__
typedef struct typedef struct {
{ UIControl* pControl;
UIControl *pControl; S32 x1, y1, x2, y2;
S32 x1,y1,x2,y2; } UIELEMENT;
} // E3 - Fine for now, but we need to make this better!
UIELEMENT; std::vector<UIELEMENT*> m_TouchBoxes[eUIGroup_COUNT][eUILayer_COUNT]
// E3 - Fine for now, but we need to make this better! [eUIScene_COUNT];
std::vector<UIELEMENT *> m_TouchBoxes[eUIGroup_COUNT][eUILayer_COUNT][eUIScene_COUNT]; bool m_bTouchscreenPressed;
bool m_bTouchscreenPressed;
#endif #endif
// 4J Stu - These should be in the order that they reference each other (i.e. they can only reference one with a lower value in the enum) // 4J Stu - These should be in the order that they reference each other
enum ELibraries // (i.e. they can only reference one with a lower value in the enum)
{ enum ELibraries {
eLibrary_Platform, eLibrary_Platform,
eLibrary_GraphicsDefault, eLibrary_GraphicsDefault,
eLibrary_GraphicsHUD, eLibrary_GraphicsHUD,
eLibrary_GraphicsInGame, eLibrary_GraphicsInGame,
eLibrary_GraphicsTooltips, eLibrary_GraphicsTooltips,
eLibrary_GraphicsLabels, eLibrary_GraphicsLabels,
eLibrary_Labels, eLibrary_Labels,
eLibrary_InGame, eLibrary_InGame,
eLibrary_HUD, eLibrary_HUD,
eLibrary_Tooltips, eLibrary_Tooltips,
eLibrary_Default, eLibrary_Default,
#if ( defined(_WINDOWS64) ) #if (defined(_WINDOWS64))
// 4J Stu - Load the 720/480 skins so that we have something to fallback on during development // 4J Stu - Load the 720/480 skins so that we have something to fallback on
// during development
#ifndef _FINAL_BUILD #ifndef _FINAL_BUILD
eLibraryFallback_Platform, eLibraryFallback_Platform,
eLibraryFallback_GraphicsDefault, eLibraryFallback_GraphicsDefault,
eLibraryFallback_GraphicsHUD, eLibraryFallback_GraphicsHUD,
eLibraryFallback_GraphicsInGame, eLibraryFallback_GraphicsInGame,
eLibraryFallback_GraphicsTooltips, eLibraryFallback_GraphicsTooltips,
eLibraryFallback_GraphicsLabels, eLibraryFallback_GraphicsLabels,
eLibraryFallback_Labels, eLibraryFallback_Labels,
eLibraryFallback_InGame, eLibraryFallback_InGame,
eLibraryFallback_HUD, eLibraryFallback_HUD,
eLibraryFallback_Tooltips, eLibraryFallback_Tooltips,
eLibraryFallback_Default, eLibraryFallback_Default,
#endif #endif
#endif #endif
eLibrary_Count, eLibrary_Count,
}; };
IggyLibrary m_iggyLibraries[eLibrary_Count]; IggyLibrary m_iggyLibraries[eLibrary_Count];
protected: protected:
GDrawFunctions *gdraw_funcs; GDrawFunctions* gdraw_funcs;
private: private:
HIGGYEXP iggy_explorer; HIGGYEXP iggy_explorer;
HIGGYPERFMON iggy_perfmon; HIGGYPERFMON iggy_perfmon;
bool m_iggyPerfmonEnabled; bool m_iggyPerfmonEnabled;
bool m_bMenuDisplayed[XUSER_MAX_COUNT]; // track each players menu displayed bool
bool m_bMenuToBeClosed[XUSER_MAX_COUNT]; // actioned at the end of the game loop m_bMenuDisplayed[XUSER_MAX_COUNT]; // track each players menu displayed
int m_iCountDown[XUSER_MAX_COUNT]; // ticks to block input bool m_bMenuToBeClosed[XUSER_MAX_COUNT]; // actioned at the end of the game
// loop
int m_iCountDown[XUSER_MAX_COUNT]; // ticks to block input
bool m_bCloseAllScenes[eUIGroup_COUNT]; bool m_bCloseAllScenes[eUIGroup_COUNT];
int m_iPressStartQuadrantsMask; int m_iPressStartQuadrantsMask;
C4JRender::eViewportType m_currentRenderViewport; C4JRender::eViewportType m_currentRenderViewport;
bool m_bCustomRenderPosition; bool m_bCustomRenderPosition;
static std::uint32_t m_dwTrialTimerLimitSecs; static std::uint32_t m_dwTrialTimerLimitSecs;
std::unordered_map<std::wstring, byteArray> m_substitutionTextures; std::unordered_map<std::wstring, byteArray> m_substitutionTextures;
typedef struct _CachedMovieData typedef struct _CachedMovieData {
{ byteArray m_ba;
byteArray m_ba; __int64 m_expiry;
__int64 m_expiry; } CachedMovieData;
} CachedMovieData; std::unordered_map<std::wstring, CachedMovieData> m_cachedMovieData;
std::unordered_map<std::wstring, CachedMovieData> m_cachedMovieData;
typedef struct _QueuedMessageBoxData typedef struct _QueuedMessageBoxData {
{ MessageBoxInfo info;
MessageBoxInfo info; int iPad;
int iPad; EUILayer layer;
EUILayer layer; } QueuedMessageBoxData;
} QueuedMessageBoxData; std::vector<QueuedMessageBoxData*> m_queuedMessageBoxData;
std::vector<QueuedMessageBoxData *> m_queuedMessageBoxData;
unsigned int m_winUserIndex; unsigned int m_winUserIndex;
//bool m_bSysUIShowing; // bool m_bSysUIShowing;
bool m_bSystemUIShowing; bool m_bSystemUIShowing;
C4JThread *m_reloadSkinThread; C4JThread* m_reloadSkinThread;
bool m_navigateToHomeOnReload; bool m_navigateToHomeOnReload;
int m_accumulatedTicks; int m_accumulatedTicks;
D3D11_RECT m_customRenderingClearRect; D3D11_RECT m_customRenderingClearRect;
std::unordered_map<size_t, UIScene *> m_registeredCallbackScenes; // A collection of scenes and unique id's that are used in async callbacks so we can safely handle when they get destroyed std::unordered_map<size_t, UIScene*>
CRITICAL_SECTION m_registeredCallbackScenesCS;; m_registeredCallbackScenes; // A collection of scenes and unique id's
// that are used in async callbacks so we
// can safely handle when they get
// destroyed
CRITICAL_SECTION m_registeredCallbackScenesCS;
;
public: public:
UIController(); UIController();
#ifdef __PSVITA__ #ifdef __PSVITA__
void TouchBoxAdd(UIControl *pControl,UIScene *pUIScene); void TouchBoxAdd(UIControl* pControl, UIScene* pUIScene);
bool TouchBoxHit(UIScene *pUIScene,S32 x, S32 y); bool TouchBoxHit(UIScene* pUIScene, S32 x, S32 y);
void TouchBoxesClear(UIScene *pUIScene); void TouchBoxesClear(UIScene* pUIScene);
void TouchBoxRebuild(UIScene *pUIScene); void TouchBoxRebuild(UIScene* pUIScene);
void HandleTouchInput(unsigned int iPad, unsigned int key, bool bPressed, bool bRepeat, bool bReleased); void HandleTouchInput(unsigned int iPad, unsigned int key, bool bPressed,
void SendTouchInput(unsigned int iPad, unsigned int key, bool bPressed, bool bRepeat, bool bReleased); bool bRepeat, bool bReleased);
void SendTouchInput(unsigned int iPad, unsigned int key, bool bPressed,
bool bRepeat, bool bReleased);
private: private:
void TouchBoxAdd(UIControl *pControl,EUIGroup eUIGroup,EUILayer eUILayer,EUIScene eUIscene, UIControl *pMainPanelControl); void TouchBoxAdd(UIControl* pControl, EUIGroup eUIGroup, EUILayer eUILayer,
UIELEMENT *m_ActiveUIElement; EUIScene eUIscene, UIControl* pMainPanelControl);
UIELEMENT *m_HighlightedUIElement; UIELEMENT* m_ActiveUIElement;
UIELEMENT* m_HighlightedUIElement;
#endif #endif
protected: protected:
UIGroup *m_groups[eUIGroup_COUNT]; UIGroup* m_groups[eUIGroup_COUNT];
public: public:
void showComponent(int iPad, EUIScene scene, EUILayer layer, EUIGroup group, bool show) void showComponent(int iPad, EUIScene scene, EUILayer layer, EUIGroup group,
{ bool show) {
m_groups[group]->showComponent(iPad, scene, layer, show); m_groups[group]->showComponent(iPad, scene, layer, show);
} }
void removeComponent(EUIScene scene, EUILayer layer, EUIGroup group) void removeComponent(EUIScene scene, EUILayer layer, EUIGroup group) {
{ m_groups[group]->removeComponent(scene, layer);
m_groups[group]->removeComponent(scene, layer); }
}
protected: protected:
// Should be called from the platforms init function // Should be called from the platforms init function
void preInit(S32 width, S32 height); void preInit(S32 width, S32 height);
void postInit(); void postInit();
public: public:
CRITICAL_SECTION m_Allocatorlock; CRITICAL_SECTION m_Allocatorlock;
void SetupFont(); void SetupFont();
public: public:
// TICKING // TICKING
virtual void tick(); virtual void tick();
private: private:
void loadSkins(); void loadSkins();
IggyLibrary loadSkin(const std::wstring &skinPath, const std::wstring &skinName); IggyLibrary loadSkin(const std::wstring& skinPath,
const std::wstring& skinName);
public: public:
void ReloadSkin(); void ReloadSkin();
virtual void StartReloadSkinThread(); virtual void StartReloadSkinThread();
virtual bool IsReloadingSkin(); virtual bool IsReloadingSkin();
virtual bool IsExpectingOrReloadingSkin(); virtual bool IsExpectingOrReloadingSkin();
virtual void CleanUpSkinReload(); virtual void CleanUpSkinReload();
private: private:
static int reloadSkinThreadProc(void* lpParam); static int reloadSkinThreadProc(void* lpParam);
public: public:
byteArray getMovieData(const std::wstring &filename); byteArray getMovieData(const std::wstring& filename);
// INPUT // INPUT
private: private:
void tickInput(); void tickInput();
void handleInput(); void handleInput();
void handleKeyPress(unsigned int iPad, unsigned int key); void handleKeyPress(unsigned int iPad, unsigned int key);
protected: protected:
static rrbool RADLINK ExternalFunctionCallback( void * user_callback_data , Iggy * player , IggyExternalFunctionCallUTF16 * call ); static rrbool RADLINK
ExternalFunctionCallback(void* user_callback_data, Iggy* player,
IggyExternalFunctionCallUTF16* call);
public: public:
// RENDERING // RENDERING
float getScreenWidth() { return m_fScreenWidth; } float getScreenWidth() { return m_fScreenWidth; }
float getScreenHeight() { return m_fScreenHeight; } float getScreenHeight() { return m_fScreenHeight; }
void setScreenSize(S32 w, S32 h) { m_fScreenWidth = (float)w; m_fScreenHeight = (float)h; } void setScreenSize(S32 w, S32 h) {
m_fScreenWidth = (float)w;
m_fScreenHeight = (float)h;
}
virtual void render() = 0; virtual void render() = 0;
void getRenderDimensions(C4JRender::eViewportType viewport, S32 &width, S32 &height); void getRenderDimensions(C4JRender::eViewportType viewport, S32& width,
void setupRenderPosition(C4JRender::eViewportType viewport); S32& height);
void setupRenderPosition(S32 xOrigin, S32 yOrigin); void setupRenderPosition(C4JRender::eViewportType viewport);
void setupRenderPosition(S32 xOrigin, S32 yOrigin);
void SetSysUIShowing(bool bVal); void SetSysUIShowing(bool bVal);
static void SetSystemUIShowing(void *lpParam,bool bVal); static void SetSystemUIShowing(void* lpParam, bool bVal);
protected: protected:
virtual void setTileOrigin(S32 xPos, S32 yPos) = 0; virtual void setTileOrigin(S32 xPos, S32 yPos) = 0;
public: public:
virtual CustomDrawData* setupCustomDraw(
virtual CustomDrawData *setupCustomDraw(UIScene *scene, IggyCustomDrawCallbackRegion *region) = 0; UIScene* scene, IggyCustomDrawCallbackRegion* region) = 0;
virtual CustomDrawData *calculateCustomDraw(IggyCustomDrawCallbackRegion *region) = 0; virtual CustomDrawData* calculateCustomDraw(
virtual void endCustomDraw(IggyCustomDrawCallbackRegion *region) = 0; IggyCustomDrawCallbackRegion* region) = 0;
protected: virtual void endCustomDraw(IggyCustomDrawCallbackRegion* region) = 0;
// Should be called from the platforms render function
void renderScenes();
public:
virtual void beginIggyCustomDraw4J(IggyCustomDrawCallbackRegion *region, CustomDrawData *customDrawRegion) = 0;
void setupCustomDrawGameState();
void endCustomDrawGameState();
void setupCustomDrawMatrices(UIScene *scene, CustomDrawData *customDrawRegion);
void setupCustomDrawGameStateAndMatrices(UIScene *scene, CustomDrawData *customDrawRegion);
void endCustomDrawMatrices();
void endCustomDrawGameStateAndMatrices();
protected: protected:
// Should be called from the platforms render function
static void RADLINK CustomDrawCallback(void *user_callback_data, Iggy *player, IggyCustomDrawCallbackRegion *Region); void renderScenes();
static GDrawTexture * RADLINK TextureSubstitutionCreateCallback( void * user_callback_data , IggyUTF16 * texture_name , S32 * width , S32 * height , void **destroy_callback_data );
static void RADLINK TextureSubstitutionDestroyCallback( void * user_callback_data , void * destroy_callback_data , GDrawTexture * handle );
virtual GDrawTexture *getSubstitutionTexture(int textureId) { return NULL; }
virtual void destroySubstitutionTexture(void *destroyCallBackData, GDrawTexture *handle) {}
public: public:
void registerSubstitutionTexture(const std::wstring &textureName, std::uint8_t *pbData, unsigned int dwLength); virtual void beginIggyCustomDraw4J(IggyCustomDrawCallbackRegion* region,
void unregisterSubstitutionTexture(const std::wstring &textureName, bool deleteData); CustomDrawData* customDrawRegion) = 0;
void setupCustomDrawGameState();
void endCustomDrawGameState();
void setupCustomDrawMatrices(UIScene* scene,
CustomDrawData* customDrawRegion);
void setupCustomDrawGameStateAndMatrices(UIScene* scene,
CustomDrawData* customDrawRegion);
void endCustomDrawMatrices();
void endCustomDrawGameStateAndMatrices();
protected:
static void RADLINK
CustomDrawCallback(void* user_callback_data, Iggy* player,
IggyCustomDrawCallbackRegion* Region);
static GDrawTexture* RADLINK TextureSubstitutionCreateCallback(
void* user_callback_data, IggyUTF16* texture_name, S32* width,
S32* height, void** destroy_callback_data);
static void RADLINK TextureSubstitutionDestroyCallback(
void* user_callback_data, void* destroy_callback_data,
GDrawTexture* handle);
virtual GDrawTexture* getSubstitutionTexture(int textureId) { return NULL; }
virtual void destroySubstitutionTexture(void* destroyCallBackData,
GDrawTexture* handle) {}
public: public:
// NAVIGATION void registerSubstitutionTexture(const std::wstring& textureName,
bool NavigateToScene(int iPad, EUIScene scene, void *initData = NULL, EUILayer layer = eUILayer_Scene, EUIGroup group = eUIGroup_PAD); std::uint8_t* pbData,
bool NavigateBack(int iPad, bool forceUsePad = false, EUIScene eScene = eUIScene_COUNT, EUILayer eLayer = eUILayer_COUNT); unsigned int dwLength);
void NavigateToHomeMenu(); void unregisterSubstitutionTexture(const std::wstring& textureName,
UIScene *GetTopScene(int iPad, EUILayer layer = eUILayer_Scene, EUIGroup group = eUIGroup_PAD); bool deleteData);
size_t RegisterForCallbackId(UIScene *scene); public:
void UnregisterCallbackId(size_t id); // NAVIGATION
UIScene *GetSceneFromCallbackId(size_t id); bool NavigateToScene(int iPad, EUIScene scene, void* initData = NULL,
void EnterCallbackIdCriticalSection(); EUILayer layer = eUILayer_Scene,
void LeaveCallbackIdCriticalSection(); EUIGroup group = eUIGroup_PAD);
bool NavigateBack(int iPad, bool forceUsePad = false,
EUIScene eScene = eUIScene_COUNT,
EUILayer eLayer = eUILayer_COUNT);
void NavigateToHomeMenu();
UIScene* GetTopScene(int iPad, EUILayer layer = eUILayer_Scene,
EUIGroup group = eUIGroup_PAD);
size_t RegisterForCallbackId(UIScene* scene);
void UnregisterCallbackId(size_t id);
UIScene* GetSceneFromCallbackId(size_t id);
void EnterCallbackIdCriticalSection();
void LeaveCallbackIdCriticalSection();
private: private:
void setFullscreenMenuDisplayed(bool displayed); void setFullscreenMenuDisplayed(bool displayed);
public: public:
void CloseAllPlayersScenes(); void CloseAllPlayersScenes();
void CloseUIScenes(int iPad, bool forceIPad = false); void CloseUIScenes(int iPad, bool forceIPad = false);
virtual bool IsPauseMenuDisplayed(int iPad); virtual bool IsPauseMenuDisplayed(int iPad);
virtual bool IsContainerMenuDisplayed(int iPad); virtual bool IsContainerMenuDisplayed(int iPad);
virtual bool IsIgnorePlayerJoinMenuDisplayed(int iPad); virtual bool IsIgnorePlayerJoinMenuDisplayed(int iPad);
virtual bool IsIgnoreAutosaveMenuDisplayed(int iPad); virtual bool IsIgnoreAutosaveMenuDisplayed(int iPad);
virtual void SetIgnoreAutosaveMenuDisplayed(int iPad, bool displayed); virtual void SetIgnoreAutosaveMenuDisplayed(int iPad, bool displayed);
virtual bool IsSceneInStack(int iPad, EUIScene eScene); virtual bool IsSceneInStack(int iPad, EUIScene eScene);
bool GetMenuDisplayed(int iPad); bool GetMenuDisplayed(int iPad);
void SetMenuDisplayed(int iPad,bool bVal); void SetMenuDisplayed(int iPad, bool bVal);
virtual void CheckMenuDisplayed(); virtual void CheckMenuDisplayed();
void AnimateKeyPress(int iPad, int iAction, bool bRepeat, bool bPressed, bool bReleased); void AnimateKeyPress(int iPad, int iAction, bool bRepeat, bool bPressed,
void OverrideSFX(int iPad, int iAction,bool bVal); bool bReleased);
void OverrideSFX(int iPad, int iAction, bool bVal);
// TOOLTIPS // TOOLTIPS
virtual void SetTooltipText( unsigned int iPad, unsigned int tooltip, int iTextID ); virtual void SetTooltipText(unsigned int iPad, unsigned int tooltip,
virtual void SetEnableTooltips( unsigned int iPad, bool bVal ); int iTextID);
virtual void ShowTooltip( unsigned int iPad, unsigned int tooltip, bool show ); virtual void SetEnableTooltips(unsigned int iPad, bool bVal);
virtual void SetTooltips( unsigned int iPad, int iA, int iB=-1, int iX=-1, int iY=-1 , int iLT=-1, int iRT=-1, int iLB=-1, int iRB=-1, int iLS=-1, bool forceUpdate = false); virtual void ShowTooltip(unsigned int iPad, unsigned int tooltip,
virtual void EnableTooltip( unsigned int iPad, unsigned int tooltip, bool enable ); bool show);
virtual void RefreshTooltips(unsigned int iPad); virtual void SetTooltips(unsigned int iPad, int iA, int iB = -1,
int iX = -1, int iY = -1, int iLT = -1,
int iRT = -1, int iLB = -1, int iRB = -1,
int iLS = -1, bool forceUpdate = false);
virtual void EnableTooltip(unsigned int iPad, unsigned int tooltip,
bool enable);
virtual void RefreshTooltips(unsigned int iPad);
virtual void PlayUISFX(ESoundEffect eSound); virtual void PlayUISFX(ESoundEffect eSound);
virtual void DisplayGamertag(unsigned int iPad, bool show); virtual void DisplayGamertag(unsigned int iPad, bool show);
virtual void SetSelectedItem(unsigned int iPad, const std::wstring &name); virtual void SetSelectedItem(unsigned int iPad, const std::wstring& name);
virtual void UpdateSelectedItemPos(unsigned int iPad); virtual void UpdateSelectedItemPos(unsigned int iPad);
virtual void HandleDLCMountingComplete(); virtual void HandleDLCMountingComplete();
virtual void HandleDLCInstalled(int iPad); virtual void HandleDLCInstalled(int iPad);
#ifdef _XBOX_ONE #ifdef _XBOX_ONE
virtual void HandleDLCLicenseChange(); virtual void HandleDLCLicenseChange();
#endif #endif
virtual void HandleTMSDLCFileRetrieved(int iPad); virtual void HandleTMSDLCFileRetrieved(int iPad);
virtual void HandleTMSBanFileRetrieved(int iPad); virtual void HandleTMSBanFileRetrieved(int iPad);
virtual void HandleInventoryUpdated(int iPad); virtual void HandleInventoryUpdated(int iPad);
virtual void HandleGameTick(); virtual void HandleGameTick();
virtual void SetTutorial(int iPad, Tutorial *tutorial); virtual void SetTutorial(int iPad, Tutorial* tutorial);
virtual void SetTutorialDescription(int iPad, TutorialPopupInfo *info); virtual void SetTutorialDescription(int iPad, TutorialPopupInfo* info);
virtual void RemoveInteractSceneReference(int iPad, UIScene *scene); virtual void RemoveInteractSceneReference(int iPad, UIScene* scene);
virtual void SetTutorialVisible(int iPad, bool visible); virtual void SetTutorialVisible(int iPad, bool visible);
virtual bool IsTutorialVisible(int iPad); virtual bool IsTutorialVisible(int iPad);
virtual void UpdatePlayerBasePositions(); virtual void UpdatePlayerBasePositions();
virtual void SetEmptyQuadrantLogo(int iSection); virtual void SetEmptyQuadrantLogo(int iSection);
virtual void HideAllGameUIElements(); virtual void HideAllGameUIElements();
virtual void ShowOtherPlayersBaseScene(unsigned int iPad, bool show); virtual void ShowOtherPlayersBaseScene(unsigned int iPad, bool show);
virtual void ShowTrialTimer(bool show); virtual void ShowTrialTimer(bool show);
virtual void SetTrialTimerLimitSecs(unsigned int uiSeconds); virtual void SetTrialTimerLimitSecs(unsigned int uiSeconds);
virtual void UpdateTrialTimer(unsigned int iPad); virtual void UpdateTrialTimer(unsigned int iPad);
virtual void ReduceTrialTimerValue(); virtual void ReduceTrialTimerValue();
virtual void ShowAutosaveCountdownTimer(bool show); virtual void ShowAutosaveCountdownTimer(bool show);
virtual void UpdateAutosaveCountdownTimer(unsigned int uiSeconds); virtual void UpdateAutosaveCountdownTimer(unsigned int uiSeconds);
virtual void ShowSavingMessage(unsigned int iPad, C4JStorage::ESavingMessage eVal); virtual void ShowSavingMessage(unsigned int iPad,
C4JStorage::ESavingMessage eVal);
virtual void ShowPlayerDisplayname(bool show); virtual void ShowPlayerDisplayname(bool show);
virtual bool PressStartPlaying(unsigned int iPad); virtual bool PressStartPlaying(unsigned int iPad);
virtual void ShowPressStart(unsigned int iPad); virtual void ShowPressStart(unsigned int iPad);
virtual void HidePressStart(); virtual void HidePressStart();
void ClearPressStart(); void ClearPressStart();
// 4J Stu - Only because of the different StringTable type, should really fix the libraries // 4J Stu - Only because of the different StringTable type, should really
// fix the libraries
#ifndef __PS3__ #ifndef __PS3__
virtual C4JStorage::EMessageResult RequestMessageBox(unsigned int uiTitle, unsigned int uiText, unsigned int *uiOptionA, unsigned int uiOptionC, unsigned int dwPad = XUSER_INDEX_ANY, virtual C4JStorage::EMessageResult RequestMessageBox(
int( *Func)(void *,int,const C4JStorage::EMessageResult)=NULL, void *lpParam=NULL, C4JStringTable *pStringTable=NULL, wchar_t *pwchFormatString=NULL, unsigned int dwFocusButton=0, bool bIsError = true); unsigned int uiTitle, unsigned int uiText, unsigned int* uiOptionA,
unsigned int uiOptionC, unsigned int dwPad = XUSER_INDEX_ANY,
int (*Func)(void*, int, const C4JStorage::EMessageResult) = NULL,
void* lpParam = NULL, C4JStringTable* pStringTable = NULL,
wchar_t* pwchFormatString = NULL, unsigned int dwFocusButton = 0,
bool bIsError = true);
#else #else
virtual C4JStorage::EMessageResult RequestMessageBox(unsigned int uiTitle, unsigned int uiText, unsigned int *uiOptionA, unsigned int uiOptionC, unsigned int dwPad = XUSER_INDEX_ANY, virtual C4JStorage::EMessageResult RequestMessageBox(
int( *Func)(void *,int,const C4JStorage::EMessageResult)=NULL, void *lpParam=NULL, StringTable *pStringTable=NULL, wchar_t *pwchFormatString=NULL, unsigned int dwFocusButton=0, bool bIsError = true); unsigned int uiTitle, unsigned int uiText, unsigned int* uiOptionA,
unsigned int uiOptionC, unsigned int dwPad = XUSER_INDEX_ANY,
int (*Func)(void*, int, const C4JStorage::EMessageResult) = NULL,
void* lpParam = NULL, StringTable* pStringTable = NULL,
wchar_t* pwchFormatString = NULL, unsigned int dwFocusButton = 0,
bool bIsError = true);
#endif #endif
C4JStorage::EMessageResult RequestUGCMessageBox(int title = -1, int message = -1, int iPad = -1, int( *Func)(void *,int,const C4JStorage::EMessageResult) = NULL, void *lpParam = NULL); C4JStorage::EMessageResult RequestUGCMessageBox(
C4JStorage::EMessageResult RequestContentRestrictedMessageBox(int title = -1, int message = -1, int iPad = -1, int( *Func)(void *,int,const C4JStorage::EMessageResult) = NULL, void *lpParam = NULL); int title = -1, int message = -1, int iPad = -1,
int (*Func)(void*, int, const C4JStorage::EMessageResult) = NULL,
void* lpParam = NULL);
C4JStorage::EMessageResult RequestContentRestrictedMessageBox(
int title = -1, int message = -1, int iPad = -1,
int (*Func)(void*, int, const C4JStorage::EMessageResult) = NULL,
void* lpParam = NULL);
virtual void SetWinUserIndex(unsigned int iPad); virtual void SetWinUserIndex(unsigned int iPad);
unsigned int GetWinUserIndex(); unsigned int GetWinUserIndex();
virtual void ShowUIDebugConsole(bool show); virtual void ShowUIDebugConsole(bool show);
virtual void ShowUIDebugMarketingGuide(bool show); virtual void ShowUIDebugMarketingGuide(bool show);
void logDebugString(const std::string &text); void logDebugString(const std::string& text);
UIScene* FindScene(EUIScene sceneType); UIScene* FindScene(EUIScene sceneType);
public: public:
char *m_defaultBuffer, *m_tempBuffer; char *m_defaultBuffer, *m_tempBuffer;
void setFontCachingCalculationBuffer(int length); void setFontCachingCalculationBuffer(int length);
}; };