mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-08-03 10:32:25 +00:00
Remove Win32 types from UI message boxes
This commit is contained in:
parent
d89db4917a
commit
4e975540a9
|
|
@ -2414,11 +2414,11 @@ void UIController::ClearPressStart()
|
||||||
|
|
||||||
// 4J Stu - For the different StringTable classes. Should really fix the libraries.
|
// 4J Stu - For the different StringTable classes. Should really fix the libraries.
|
||||||
#ifndef __PS3__
|
#ifndef __PS3__
|
||||||
C4JStorage::EMessageResult UIController::RequestMessageBox(UINT uiTitle, UINT uiText, UINT *uiOptionA,UINT uiOptionC, DWORD dwPad,
|
C4JStorage::EMessageResult UIController::RequestMessageBox(unsigned int uiTitle, unsigned int uiText, unsigned int *uiOptionA, unsigned int uiOptionC, unsigned int dwPad,
|
||||||
int( *Func)(LPVOID,int,const C4JStorage::EMessageResult),LPVOID lpParam, C4JStringTable *pStringTable, WCHAR *pwchFormatString,DWORD dwFocusButton, bool bIsError)
|
int( *Func)(void *,int,const C4JStorage::EMessageResult), void *lpParam, C4JStringTable *pStringTable, wchar_t *pwchFormatString, unsigned int dwFocusButton, bool bIsError)
|
||||||
#else
|
#else
|
||||||
C4JStorage::EMessageResult UIController::RequestMessageBox(UINT uiTitle, UINT uiText, UINT *uiOptionA,UINT uiOptionC, DWORD dwPad,
|
C4JStorage::EMessageResult UIController::RequestMessageBox(unsigned int uiTitle, unsigned int uiText, unsigned int *uiOptionA, unsigned int uiOptionC, unsigned int dwPad,
|
||||||
int( *Func)(LPVOID,int,const C4JStorage::EMessageResult),LPVOID lpParam, StringTable *pStringTable, WCHAR *pwchFormatString,DWORD dwFocusButton, bool bIsError)
|
int( *Func)(void *,int,const C4JStorage::EMessageResult), void *lpParam, StringTable *pStringTable, wchar_t *pwchFormatString, unsigned int dwFocusButton, bool bIsError)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
MessageBoxInfo param;
|
MessageBoxInfo param;
|
||||||
|
|
@ -2440,8 +2440,8 @@ C4JStorage::EMessageResult UIController::RequestMessageBox(UINT uiTitle, UINT ui
|
||||||
// Queue this message box
|
// Queue this message box
|
||||||
QueuedMessageBoxData *queuedData = new QueuedMessageBoxData();
|
QueuedMessageBoxData *queuedData = new QueuedMessageBoxData();
|
||||||
queuedData->info = param;
|
queuedData->info = param;
|
||||||
queuedData->info.uiOptionA = new UINT[param.uiOptionC];
|
queuedData->info.uiOptionA = new unsigned int[param.uiOptionC];
|
||||||
memcpy(queuedData->info.uiOptionA, param.uiOptionA, param.uiOptionC * sizeof(UINT));
|
memcpy(queuedData->info.uiOptionA, param.uiOptionA, param.uiOptionC * sizeof(unsigned int));
|
||||||
queuedData->iPad = dwPad;
|
queuedData->iPad = dwPad;
|
||||||
queuedData->layer = eUILayer_Error; // Ensures that these don't get wiped out by a CloseAllScenes call
|
queuedData->layer = eUILayer_Error; // Ensures that these don't get wiped out by a CloseAllScenes call
|
||||||
m_queuedMessageBoxData.push_back(queuedData);
|
m_queuedMessageBoxData.push_back(queuedData);
|
||||||
|
|
@ -2462,7 +2462,7 @@ C4JStorage::EMessageResult UIController::RequestMessageBox(UINT uiTitle, UINT ui
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
C4JStorage::EMessageResult UIController::RequestUGCMessageBox(UINT title/* = -1 */, UINT message/* = -1 */, int iPad/* = -1*/, int( *Func)(LPVOID,int,const C4JStorage::EMessageResult)/* = NULL*/, LPVOID lpParam/* = NULL*/)
|
C4JStorage::EMessageResult UIController::RequestUGCMessageBox(int title/* = -1 */, int message/* = -1 */, int iPad/* = -1*/, int( *Func)(void *,int,const C4JStorage::EMessageResult)/* = NULL*/, void *lpParam/* = NULL*/)
|
||||||
{
|
{
|
||||||
// Default title / messages
|
// Default title / messages
|
||||||
if (title == -1)
|
if (title == -1)
|
||||||
|
|
@ -2484,17 +2484,17 @@ C4JStorage::EMessageResult UIController::RequestUGCMessageBox(UINT title/* = -1
|
||||||
return C4JStorage::EMessage_ResultAccept;
|
return C4JStorage::EMessage_ResultAccept;
|
||||||
#elif defined(__PSVITA__)
|
#elif defined(__PSVITA__)
|
||||||
ProfileManager.ShowSystemMessage( SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_CHAT_RESTRICTION, iPad );
|
ProfileManager.ShowSystemMessage( SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_CHAT_RESTRICTION, iPad );
|
||||||
UINT uiIDA[1];
|
unsigned int uiIDA[1];
|
||||||
uiIDA[0]=IDS_CONFIRM_OK;
|
uiIDA[0]=IDS_CONFIRM_OK;
|
||||||
return ui.RequestMessageBox( title, IDS_CHAT_RESTRICTION_UGC, uiIDA, 1, iPad, Func, lpParam, app.GetStringTable(), NULL, 0, false);
|
return ui.RequestMessageBox( title, IDS_CHAT_RESTRICTION_UGC, uiIDA, 1, iPad, Func, lpParam, app.GetStringTable(), NULL, 0, false);
|
||||||
#else
|
#else
|
||||||
UINT uiIDA[1];
|
unsigned int uiIDA[1];
|
||||||
uiIDA[0]=IDS_CONFIRM_OK;
|
uiIDA[0]=IDS_CONFIRM_OK;
|
||||||
return ui.RequestMessageBox( title, message, uiIDA, 1, iPad, Func, lpParam, app.GetStringTable(), NULL, 0, false);
|
return ui.RequestMessageBox( title, message, uiIDA, 1, iPad, Func, lpParam, app.GetStringTable(), NULL, 0, false);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
C4JStorage::EMessageResult UIController::RequestContentRestrictedMessageBox(UINT title/* = -1 */, UINT message/* = -1 */, int iPad/* = -1*/, int( *Func)(LPVOID,int,const C4JStorage::EMessageResult)/* = NULL*/, LPVOID lpParam/* = NULL*/)
|
C4JStorage::EMessageResult UIController::RequestContentRestrictedMessageBox(int title/* = -1 */, int message/* = -1 */, int iPad/* = -1*/, int( *Func)(void *,int,const C4JStorage::EMessageResult)/* = NULL*/, void *lpParam/* = NULL*/)
|
||||||
{
|
{
|
||||||
// Default title / messages
|
// Default title / messages
|
||||||
if (title == -1)
|
if (title == -1)
|
||||||
|
|
@ -2522,7 +2522,7 @@ C4JStorage::EMessageResult UIController::RequestContentRestrictedMessageBox(UINT
|
||||||
ProfileManager.ShowSystemMessage( SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_AGE_RESTRICTION, iPad );
|
ProfileManager.ShowSystemMessage( SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_AGE_RESTRICTION, iPad );
|
||||||
return C4JStorage::EMessage_ResultAccept;
|
return C4JStorage::EMessage_ResultAccept;
|
||||||
#else
|
#else
|
||||||
UINT uiIDA[1];
|
unsigned int uiIDA[1];
|
||||||
uiIDA[0]=IDS_CONFIRM_OK;
|
uiIDA[0]=IDS_CONFIRM_OK;
|
||||||
return ui.RequestMessageBox( title, message, uiIDA, 1, iPad, Func, lpParam, app.GetStringTable(), NULL, 0, false);
|
return ui.RequestMessageBox( title, message, uiIDA, 1, iPad, Func, lpParam, app.GetStringTable(), NULL, 0, false);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -345,15 +345,15 @@ public:
|
||||||
|
|
||||||
// 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(UINT uiTitle, UINT uiText, UINT *uiOptionA,UINT uiOptionC, DWORD dwPad=XUSER_INDEX_ANY,
|
virtual C4JStorage::EMessageResult RequestMessageBox(unsigned int uiTitle, unsigned int uiText, unsigned int *uiOptionA, unsigned int uiOptionC, unsigned int dwPad = XUSER_INDEX_ANY,
|
||||||
int( *Func)(LPVOID,int,const C4JStorage::EMessageResult)=NULL,LPVOID lpParam=NULL, C4JStringTable *pStringTable=NULL, WCHAR *pwchFormatString=NULL,DWORD dwFocusButton=0, bool bIsError = true);
|
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(UINT uiTitle, UINT uiText, UINT *uiOptionA,UINT uiOptionC, DWORD dwPad=XUSER_INDEX_ANY,
|
virtual C4JStorage::EMessageResult RequestMessageBox(unsigned int uiTitle, unsigned int uiText, unsigned int *uiOptionA, unsigned int uiOptionC, unsigned int dwPad = XUSER_INDEX_ANY,
|
||||||
int( *Func)(LPVOID,int,const C4JStorage::EMessageResult)=NULL,LPVOID lpParam=NULL, StringTable *pStringTable=NULL, WCHAR *pwchFormatString=NULL,DWORD dwFocusButton=0, bool bIsError = true);
|
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(UINT title = -1, UINT message = -1, int iPad = -1, int( *Func)(LPVOID,int,const C4JStorage::EMessageResult) = NULL, LPVOID lpParam = NULL);
|
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 RequestContentRestrictedMessageBox(UINT title = -1, UINT message = -1, int iPad = -1, int( *Func)(LPVOID,int,const C4JStorage::EMessageResult) = NULL, LPVOID 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();
|
||||||
|
|
|
||||||
|
|
@ -365,16 +365,16 @@ SCreditTextItemDef;
|
||||||
// Message box
|
// Message box
|
||||||
typedef struct _MessageBoxInfo
|
typedef struct _MessageBoxInfo
|
||||||
{
|
{
|
||||||
UINT uiTitle;
|
unsigned int uiTitle;
|
||||||
UINT uiText;
|
unsigned int uiText;
|
||||||
UINT *uiOptionA;
|
unsigned int *uiOptionA;
|
||||||
UINT uiOptionC;
|
unsigned int uiOptionC;
|
||||||
DWORD dwPad;
|
unsigned int dwPad;
|
||||||
int( *Func)(void *,int,const C4JStorage::EMessageResult);
|
int( *Func)(void *,int,const C4JStorage::EMessageResult);
|
||||||
void *lpParam;
|
void *lpParam;
|
||||||
//C4JStringTable *pStringTable; // 4J Stu - We don't need this for our internal message boxes
|
//C4JStringTable *pStringTable; // 4J Stu - We don't need this for our internal message boxes
|
||||||
WCHAR *pwchFormatString;
|
wchar_t *pwchFormatString;
|
||||||
DWORD dwFocusButton;
|
unsigned int dwFocusButton;
|
||||||
} MessageBoxInfo;
|
} MessageBoxInfo;
|
||||||
|
|
||||||
typedef struct _DLCOffersParam
|
typedef struct _DLCOffersParam
|
||||||
|
|
|
||||||
|
|
@ -313,13 +313,13 @@ void ConsoleUIController::SetWinUserIndex(unsigned int iPad)
|
||||||
CScene_Win::setWinUserIndex( iPad );
|
CScene_Win::setWinUserIndex( iPad );
|
||||||
}
|
}
|
||||||
|
|
||||||
C4JStorage::EMessageResult ConsoleUIController::RequestMessageBox(UINT uiTitle, UINT uiText, UINT *uiOptionA,UINT uiOptionC, DWORD dwPad,
|
C4JStorage::EMessageResult ConsoleUIController::RequestMessageBox(unsigned int uiTitle, unsigned int uiText, unsigned int *uiOptionA, unsigned int uiOptionC, unsigned int dwPad,
|
||||||
int( *Func)(LPVOID,int,const C4JStorage::EMessageResult),LPVOID lpParam, CXuiStringTable *pStringTable, WCHAR *pwchFormatString,DWORD dwFocusButton,bool bIsError)
|
int( *Func)(void *,int,const C4JStorage::EMessageResult), void *lpParam, CXuiStringTable *pStringTable, wchar_t *pwchFormatString, unsigned int dwFocusButton, bool bIsError)
|
||||||
{
|
{
|
||||||
return StorageManager.RequestMessageBox(uiTitle, uiText, uiOptionA, uiOptionC, dwPad, Func, lpParam, pStringTable, pwchFormatString, dwFocusButton);
|
return StorageManager.RequestMessageBox(uiTitle, uiText, uiOptionA, uiOptionC, dwPad, Func, lpParam, pStringTable, pwchFormatString, dwFocusButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
C4JStorage::EMessageResult ConsoleUIController::RequestUGCMessageBox(UINT title/* = -1 */, UINT message/* = -1 */, int iPad/* = -1*/, int( *Func)(LPVOID,int,const C4JStorage::EMessageResult)/* = NULL*/, LPVOID lpParam/* = NULL*/)
|
C4JStorage::EMessageResult ConsoleUIController::RequestUGCMessageBox(int title/* = -1 */, int message/* = -1 */, int iPad/* = -1*/, int( *Func)(void *,int,const C4JStorage::EMessageResult)/* = NULL*/, void *lpParam/* = NULL*/)
|
||||||
{
|
{
|
||||||
// Default title / messages
|
// Default title / messages
|
||||||
if (title == -1)
|
if (title == -1)
|
||||||
|
|
@ -335,7 +335,7 @@ C4JStorage::EMessageResult ConsoleUIController::RequestUGCMessageBox(UINT title/
|
||||||
// Default pad to primary player
|
// Default pad to primary player
|
||||||
if (iPad == -1) iPad = ProfileManager.GetPrimaryPad();
|
if (iPad == -1) iPad = ProfileManager.GetPrimaryPad();
|
||||||
|
|
||||||
UINT uiIDA[1];
|
unsigned int uiIDA[1];
|
||||||
uiIDA[0]=IDS_CONFIRM_OK;
|
uiIDA[0]=IDS_CONFIRM_OK;
|
||||||
return ui.RequestMessageBox(title, message, uiIDA, 1, iPad, Func, lpParam, app.GetStringTable(), NULL, 0, false);
|
return ui.RequestMessageBox(title, message, uiIDA, 1, iPad, Func, lpParam, app.GetStringTable(), NULL, 0, false);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -70,10 +70,10 @@ public:
|
||||||
|
|
||||||
virtual void SetWinUserIndex(unsigned int iPad);
|
virtual void SetWinUserIndex(unsigned int iPad);
|
||||||
|
|
||||||
virtual C4JStorage::EMessageResult RequestMessageBox(UINT uiTitle, UINT uiText, UINT *uiOptionA,UINT uiOptionC, DWORD dwPad=XUSER_INDEX_ANY,
|
virtual C4JStorage::EMessageResult RequestMessageBox(unsigned int uiTitle, unsigned int uiText, unsigned int *uiOptionA, unsigned int uiOptionC, unsigned int dwPad = XUSER_INDEX_ANY,
|
||||||
int( *Func)(LPVOID,int,const C4JStorage::EMessageResult)=NULL,LPVOID lpParam=NULL, CXuiStringTable *pStringTable=NULL, WCHAR *pwchFormatString=NULL,DWORD dwFocusButton=0, bool bIsError = true);
|
int( *Func)(void *,int,const C4JStorage::EMessageResult)=NULL, void *lpParam=NULL, CXuiStringTable *pStringTable=NULL, wchar_t *pwchFormatString=NULL, unsigned int dwFocusButton=0, bool bIsError = true);
|
||||||
|
|
||||||
C4JStorage::EMessageResult RequestUGCMessageBox(UINT title = -1, UINT message = -1, int iPad = -1, int( *Func)(LPVOID,int,const C4JStorage::EMessageResult) = NULL, LPVOID lpParam = NULL);
|
C4JStorage::EMessageResult RequestUGCMessageBox(int title = -1, int message = -1, int iPad = -1, int( *Func)(void *,int,const C4JStorage::EMessageResult) = NULL, void *lpParam = NULL);
|
||||||
};
|
};
|
||||||
|
|
||||||
extern ConsoleUIController ui;
|
extern ConsoleUIController ui;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue