mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-08-20 09:57:10 +00:00
format UIController
This commit is contained in:
parent
03355211ca
commit
4486fc7ab4
File diff suppressed because it is too large
Load diff
|
|
@ -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;
|
|
||||||
|
|
||||||
std::unordered_map<std::wstring, byteArray> m_substitutionTextures;
|
static std::uint32_t m_dwTrialTimerLimitSecs;
|
||||||
|
|
||||||
typedef struct _CachedMovieData
|
std::unordered_map<std::wstring, byteArray> m_substitutionTextures;
|
||||||
{
|
|
||||||
byteArray m_ba;
|
|
||||||
__int64 m_expiry;
|
|
||||||
} CachedMovieData;
|
|
||||||
std::unordered_map<std::wstring, CachedMovieData> m_cachedMovieData;
|
|
||||||
|
|
||||||
typedef struct _QueuedMessageBoxData
|
typedef struct _CachedMovieData {
|
||||||
{
|
byteArray m_ba;
|
||||||
MessageBoxInfo info;
|
__int64 m_expiry;
|
||||||
int iPad;
|
} CachedMovieData;
|
||||||
EUILayer layer;
|
std::unordered_map<std::wstring, CachedMovieData> m_cachedMovieData;
|
||||||
} QueuedMessageBoxData;
|
|
||||||
std::vector<QueuedMessageBoxData *> m_queuedMessageBoxData;
|
|
||||||
|
|
||||||
unsigned int m_winUserIndex;
|
typedef struct _QueuedMessageBoxData {
|
||||||
//bool m_bSysUIShowing;
|
MessageBoxInfo info;
|
||||||
bool m_bSystemUIShowing;
|
int iPad;
|
||||||
C4JThread *m_reloadSkinThread;
|
EUILayer layer;
|
||||||
bool m_navigateToHomeOnReload;
|
} QueuedMessageBoxData;
|
||||||
int m_accumulatedTicks;
|
std::vector<QueuedMessageBoxData*> m_queuedMessageBoxData;
|
||||||
|
|
||||||
D3D11_RECT m_customRenderingClearRect;
|
unsigned int m_winUserIndex;
|
||||||
|
// bool m_bSysUIShowing;
|
||||||
|
bool m_bSystemUIShowing;
|
||||||
|
C4JThread* m_reloadSkinThread;
|
||||||
|
bool m_navigateToHomeOnReload;
|
||||||
|
int m_accumulatedTicks;
|
||||||
|
|
||||||
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
|
D3D11_RECT m_customRenderingClearRect;
|
||||||
CRITICAL_SECTION m_registeredCallbackScenesCS;;
|
|
||||||
|
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
|
||||||
|
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:
|
|
||||||
CRITICAL_SECTION m_Allocatorlock;
|
|
||||||
void SetupFont();
|
|
||||||
public:
|
public:
|
||||||
// TICKING
|
CRITICAL_SECTION m_Allocatorlock;
|
||||||
virtual void tick();
|
void SetupFont();
|
||||||
|
|
||||||
|
public:
|
||||||
|
// TICKING
|
||||||
|
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:
|
|
||||||
static rrbool RADLINK ExternalFunctionCallback( void * user_callback_data , Iggy * player , IggyExternalFunctionCallUTF16 * call );
|
|
||||||
|
|
||||||
public:
|
|
||||||
// RENDERING
|
|
||||||
float getScreenWidth() { return m_fScreenWidth; }
|
|
||||||
float getScreenHeight() { return m_fScreenHeight; }
|
|
||||||
void setScreenSize(S32 w, S32 h) { m_fScreenWidth = (float)w; m_fScreenHeight = (float)h; }
|
|
||||||
|
|
||||||
virtual void render() = 0;
|
|
||||||
void getRenderDimensions(C4JRender::eViewportType viewport, S32 &width, S32 &height);
|
|
||||||
void setupRenderPosition(C4JRender::eViewportType viewport);
|
|
||||||
void setupRenderPosition(S32 xOrigin, S32 yOrigin);
|
|
||||||
|
|
||||||
void SetSysUIShowing(bool bVal);
|
|
||||||
static void SetSystemUIShowing(void *lpParam,bool bVal);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void setTileOrigin(S32 xPos, S32 yPos) = 0;
|
static rrbool RADLINK
|
||||||
|
ExternalFunctionCallback(void* user_callback_data, Iggy* player,
|
||||||
|
IggyExternalFunctionCallUTF16* call);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
// RENDERING
|
||||||
|
float getScreenWidth() { return m_fScreenWidth; }
|
||||||
|
float getScreenHeight() { return m_fScreenHeight; }
|
||||||
|
void setScreenSize(S32 w, S32 h) {
|
||||||
|
m_fScreenWidth = (float)w;
|
||||||
|
m_fScreenHeight = (float)h;
|
||||||
|
}
|
||||||
|
|
||||||
virtual CustomDrawData *setupCustomDraw(UIScene *scene, IggyCustomDrawCallbackRegion *region) = 0;
|
virtual void render() = 0;
|
||||||
virtual CustomDrawData *calculateCustomDraw(IggyCustomDrawCallbackRegion *region) = 0;
|
void getRenderDimensions(C4JRender::eViewportType viewport, S32& width,
|
||||||
virtual void endCustomDraw(IggyCustomDrawCallbackRegion *region) = 0;
|
S32& height);
|
||||||
protected:
|
void setupRenderPosition(C4JRender::eViewportType viewport);
|
||||||
// Should be called from the platforms render function
|
void setupRenderPosition(S32 xOrigin, S32 yOrigin);
|
||||||
void renderScenes();
|
|
||||||
|
|
||||||
public:
|
void SetSysUIShowing(bool bVal);
|
||||||
virtual void beginIggyCustomDraw4J(IggyCustomDrawCallbackRegion *region, CustomDrawData *customDrawRegion) = 0;
|
static void SetSystemUIShowing(void* lpParam, bool bVal);
|
||||||
void setupCustomDrawGameState();
|
|
||||||
void endCustomDrawGameState();
|
|
||||||
void setupCustomDrawMatrices(UIScene *scene, CustomDrawData *customDrawRegion);
|
|
||||||
void setupCustomDrawGameStateAndMatrices(UIScene *scene, CustomDrawData *customDrawRegion);
|
|
||||||
void endCustomDrawMatrices();
|
|
||||||
void endCustomDrawGameStateAndMatrices();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
virtual void setTileOrigin(S32 xPos, S32 yPos) = 0;
|
||||||
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:
|
||||||
void registerSubstitutionTexture(const std::wstring &textureName, std::uint8_t *pbData, unsigned int dwLength);
|
virtual CustomDrawData* setupCustomDraw(
|
||||||
void unregisterSubstitutionTexture(const std::wstring &textureName, bool deleteData);
|
UIScene* scene, IggyCustomDrawCallbackRegion* region) = 0;
|
||||||
|
virtual CustomDrawData* calculateCustomDraw(
|
||||||
|
IggyCustomDrawCallbackRegion* region) = 0;
|
||||||
|
virtual void endCustomDraw(IggyCustomDrawCallbackRegion* region) = 0;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// Should be called from the platforms render function
|
||||||
|
void renderScenes();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// NAVIGATION
|
virtual void beginIggyCustomDraw4J(IggyCustomDrawCallbackRegion* region,
|
||||||
bool NavigateToScene(int iPad, EUIScene scene, void *initData = NULL, EUILayer layer = eUILayer_Scene, EUIGroup group = eUIGroup_PAD);
|
CustomDrawData* customDrawRegion) = 0;
|
||||||
bool NavigateBack(int iPad, bool forceUsePad = false, EUIScene eScene = eUIScene_COUNT, EUILayer eLayer = eUILayer_COUNT);
|
void setupCustomDrawGameState();
|
||||||
void NavigateToHomeMenu();
|
void endCustomDrawGameState();
|
||||||
UIScene *GetTopScene(int iPad, EUILayer layer = eUILayer_Scene, EUIGroup group = eUIGroup_PAD);
|
void setupCustomDrawMatrices(UIScene* scene,
|
||||||
|
CustomDrawData* customDrawRegion);
|
||||||
|
void setupCustomDrawGameStateAndMatrices(UIScene* scene,
|
||||||
|
CustomDrawData* customDrawRegion);
|
||||||
|
void endCustomDrawMatrices();
|
||||||
|
void endCustomDrawGameStateAndMatrices();
|
||||||
|
|
||||||
size_t RegisterForCallbackId(UIScene *scene);
|
protected:
|
||||||
void UnregisterCallbackId(size_t id);
|
static void RADLINK
|
||||||
UIScene *GetSceneFromCallbackId(size_t id);
|
CustomDrawCallback(void* user_callback_data, Iggy* player,
|
||||||
void EnterCallbackIdCriticalSection();
|
IggyCustomDrawCallbackRegion* Region);
|
||||||
void LeaveCallbackIdCriticalSection();
|
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:
|
||||||
|
void registerSubstitutionTexture(const std::wstring& textureName,
|
||||||
|
std::uint8_t* pbData,
|
||||||
|
unsigned int dwLength);
|
||||||
|
void unregisterSubstitutionTexture(const std::wstring& textureName,
|
||||||
|
bool deleteData);
|
||||||
|
|
||||||
|
public:
|
||||||
|
// NAVIGATION
|
||||||
|
bool NavigateToScene(int iPad, EUIScene scene, void* initData = NULL,
|
||||||
|
EUILayer layer = eUILayer_Scene,
|
||||||
|
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 IsContainerMenuDisplayed(int iPad);
|
|
||||||
virtual bool IsIgnorePlayerJoinMenuDisplayed(int iPad);
|
|
||||||
virtual bool IsIgnoreAutosaveMenuDisplayed(int iPad);
|
|
||||||
virtual void SetIgnoreAutosaveMenuDisplayed(int iPad, bool displayed);
|
|
||||||
virtual bool IsSceneInStack(int iPad, EUIScene eScene);
|
|
||||||
bool GetMenuDisplayed(int iPad);
|
|
||||||
void SetMenuDisplayed(int iPad,bool bVal);
|
|
||||||
virtual void CheckMenuDisplayed();
|
|
||||||
void AnimateKeyPress(int iPad, int iAction, bool bRepeat, bool bPressed, bool bReleased);
|
|
||||||
void OverrideSFX(int iPad, int iAction,bool bVal);
|
|
||||||
|
|
||||||
// TOOLTIPS
|
virtual bool IsPauseMenuDisplayed(int iPad);
|
||||||
virtual void SetTooltipText( unsigned int iPad, unsigned int tooltip, int iTextID );
|
virtual bool IsContainerMenuDisplayed(int iPad);
|
||||||
virtual void SetEnableTooltips( unsigned int iPad, bool bVal );
|
virtual bool IsIgnorePlayerJoinMenuDisplayed(int iPad);
|
||||||
virtual void ShowTooltip( unsigned int iPad, unsigned int tooltip, bool show );
|
virtual bool IsIgnoreAutosaveMenuDisplayed(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 SetIgnoreAutosaveMenuDisplayed(int iPad, bool displayed);
|
||||||
virtual void EnableTooltip( unsigned int iPad, unsigned int tooltip, bool enable );
|
virtual bool IsSceneInStack(int iPad, EUIScene eScene);
|
||||||
virtual void RefreshTooltips(unsigned int iPad);
|
bool GetMenuDisplayed(int iPad);
|
||||||
|
void SetMenuDisplayed(int iPad, bool bVal);
|
||||||
|
virtual void CheckMenuDisplayed();
|
||||||
|
void AnimateKeyPress(int iPad, int iAction, bool bRepeat, bool bPressed,
|
||||||
|
bool bReleased);
|
||||||
|
void OverrideSFX(int iPad, int iAction, bool bVal);
|
||||||
|
|
||||||
virtual void PlayUISFX(ESoundEffect eSound);
|
// TOOLTIPS
|
||||||
|
virtual void SetTooltipText(unsigned int iPad, unsigned int tooltip,
|
||||||
|
int iTextID);
|
||||||
|
virtual void SetEnableTooltips(unsigned int iPad, bool bVal);
|
||||||
|
virtual void ShowTooltip(unsigned int iPad, unsigned int tooltip,
|
||||||
|
bool show);
|
||||||
|
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 DisplayGamertag(unsigned int iPad, bool show);
|
virtual void PlayUISFX(ESoundEffect eSound);
|
||||||
virtual void SetSelectedItem(unsigned int iPad, const std::wstring &name);
|
|
||||||
virtual void UpdateSelectedItemPos(unsigned int iPad);
|
|
||||||
|
|
||||||
virtual void HandleDLCMountingComplete();
|
virtual void DisplayGamertag(unsigned int iPad, bool show);
|
||||||
virtual void HandleDLCInstalled(int iPad);
|
virtual void SetSelectedItem(unsigned int iPad, const std::wstring& name);
|
||||||
|
virtual void UpdateSelectedItemPos(unsigned int iPad);
|
||||||
|
|
||||||
|
virtual void HandleDLCMountingComplete();
|
||||||
|
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);
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue