Done - LoadCreateJoinMenu | Iggy Game UI to RmlUi
199
Minecraft.Client/Assets/UI/LoadCreateJoinMenu.rcss
Normal file
@@ -0,0 +1,199 @@
|
||||
body
|
||||
{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-family: Minecraft Default;
|
||||
font-size: 14dp;
|
||||
font-effect: shadow(1dp 1dp #000000);
|
||||
color: #ffffff;
|
||||
background: transparent;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
div#lcj_menu
|
||||
{
|
||||
width: 650dp;
|
||||
height: 600dp;
|
||||
margin: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
div#tab_bar
|
||||
{
|
||||
width: 682dp;
|
||||
height: 56dp;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin-bottom: 0;
|
||||
z-index: 2;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
button.tab
|
||||
{
|
||||
display: block;
|
||||
height: 56dp;
|
||||
flex: 0;
|
||||
color: #ffffff;
|
||||
font-size: 22dp;
|
||||
font-weight: normal;
|
||||
text-align: center;
|
||||
line-height: 63dp;
|
||||
cursor: pointer;
|
||||
background: transparent;
|
||||
border-width: 0px;
|
||||
image-color: #ffffff;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
button.tab:hover,
|
||||
button.tab.selected
|
||||
{
|
||||
line-height: 58dp;
|
||||
}
|
||||
|
||||
button.tab_left
|
||||
{
|
||||
flex: 2;
|
||||
decorator: image(images/lce/LoadCreateJoinMenu/tab_left.png);
|
||||
}
|
||||
|
||||
button.tab_left:hover,
|
||||
button.tab_left.selected
|
||||
{
|
||||
decorator: image(images/lce/LoadCreateJoinMenu/tab_left_havon.png);
|
||||
}
|
||||
|
||||
button.tab_medium
|
||||
{
|
||||
flex: 2;
|
||||
decorator: image(images/lce/LoadCreateJoinMenu/tab_medium.png);
|
||||
}
|
||||
|
||||
button.tab_medium:hover,
|
||||
button.tab_medium.selected
|
||||
{
|
||||
decorator: image(images/lce/LoadCreateJoinMenu/tab_medium_havon.png);
|
||||
}
|
||||
|
||||
button.tab_right
|
||||
{
|
||||
flex: 2;
|
||||
decorator: image(images/lce/LoadCreateJoinMenu/tab_right.png);
|
||||
}
|
||||
|
||||
button.tab_right:hover,
|
||||
button.tab_right.selected
|
||||
{
|
||||
decorator: image(images/lce/LoadCreateJoinMenu/tab_right_havon.png);
|
||||
}
|
||||
|
||||
div#panel_container
|
||||
{
|
||||
width: 100%;
|
||||
flex-grow: 1;
|
||||
decorator: image(images/lce/LoadCreateJoinMenu/gui_load.png);
|
||||
padding: 12dp 16dp;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div.tab_panel
|
||||
{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
div.list_container
|
||||
{
|
||||
width: 100%;
|
||||
flex-grow: 1;
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-top: 10dp;
|
||||
}
|
||||
|
||||
div.list_item
|
||||
{
|
||||
width: 100%;
|
||||
height: 48dp;
|
||||
margin-bottom: 4dp;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div.list_item:hover
|
||||
{
|
||||
image-color: #ffff00;
|
||||
}
|
||||
|
||||
div.list_item button
|
||||
{
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
padding-left: 16dp;
|
||||
padding-right: 16dp;
|
||||
margin: 0 20dp;
|
||||
gap: 8dp;
|
||||
color: #ffffff;
|
||||
font-size: 20dp;
|
||||
background: transparent;
|
||||
border-width: 0px;
|
||||
cursor: pointer;
|
||||
decorator: image(images/lce/button/ListButton_Norm.png);
|
||||
}
|
||||
|
||||
div.list_item button:hover,
|
||||
div.list_item button.selected
|
||||
{
|
||||
color: #ffff00;
|
||||
decorator: image(images/lce/button/ListButton_Over.png);
|
||||
}
|
||||
|
||||
div.list_item button img.thumb
|
||||
{
|
||||
width: 32dp;
|
||||
height: 32dp;
|
||||
}
|
||||
|
||||
div.timer
|
||||
{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 18dp;
|
||||
color: #aaaaaa;
|
||||
padding: 20dp 0;
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.no_games
|
||||
{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 18dp;
|
||||
color: #aaaaaa;
|
||||
padding: 40dp 0;
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.size_bar
|
||||
{
|
||||
width: 100%;
|
||||
height: 8dp;
|
||||
margin-top: 8dp;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
display: none;
|
||||
}
|
||||
31
Minecraft.Client/Assets/UI/LoadCreateJoinMenu.rml
Normal file
@@ -0,0 +1,31 @@
|
||||
<rml>
|
||||
<head>
|
||||
<title>Load/Create/Join Menu</title>
|
||||
<link type="text/rcss" href="LoadCreateJoinMenu.rcss"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="lcj_menu">
|
||||
<div id="tab_bar">
|
||||
<button id="tab_load" class="tab tab_left selected">[IDS_LOAD]</button>
|
||||
<button id="tab_create" class="tab tab_medium">[IDS_CREATE]</button>
|
||||
<button id="tab_join" class="tab tab_right">[IDS_JOIN]</button>
|
||||
</div>
|
||||
<div id="panel_container">
|
||||
<div id="panel_load" class="tab_panel">
|
||||
<div id="load_list" class="list_container"></div>
|
||||
<div id="load_timer" class="timer">[IDS_LOADING]</div>
|
||||
<div id="save_size_bar" class="size_bar"></div>
|
||||
</div>
|
||||
<div id="panel_create" class="tab_panel" style="display: none;">
|
||||
<div id="create_list" class="list_container"></div>
|
||||
<div id="create_timer" class="timer">[IDS_LOADING]</div>
|
||||
</div>
|
||||
<div id="panel_join" class="tab_panel" style="display: none;">
|
||||
<div id="join_list" class="list_container"></div>
|
||||
<div id="join_timer" class="timer">[IDS_LOADING]</div>
|
||||
<div id="no_games_label" class="no_games">[IDS_NO_GAMES_AVAILABLE]</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</rml>
|
||||
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
@@ -84,6 +84,8 @@ if(PLATFORM_NAME STREQUAL "Windows64")
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/Common/UI/UIScene_SettingsMenu.h"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/Common/UI/UIScene_SkinSelectMenu.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/Common/UI/UIScene_SkinSelectMenu.h"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/Common/UI/UIScene_LoadCreateJoinMenu.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/Common/UI/UIScene_LoadCreateJoinMenu.h"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/Windows64/RmlUi_Renderer_D3D11.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/Windows64/RmlUi_Renderer_D3D11.h"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/Windows64/RmlUi_SystemInterface_Win64.cpp"
|
||||
|
||||
@@ -1,6 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
#pragma push_macro("byte")
|
||||
#pragma push_macro("GetNextSibling")
|
||||
#pragma push_macro("GetFirstChild")
|
||||
#undef byte
|
||||
#undef GetNextSibling
|
||||
#undef GetFirstChild
|
||||
|
||||
#include "UIScene.h"
|
||||
#include <RmlUi/Core/EventListener.h>
|
||||
#include <RmlUi/Core/ElementDocument.h>
|
||||
|
||||
// NOTE: pop_macro at end of file
|
||||
|
||||
class LevelGenerationOptions;
|
||||
class C4JThread;
|
||||
@@ -12,7 +23,7 @@ class C4JThread;
|
||||
#define SONY_REMOTE_STORAGE_UPLOAD
|
||||
#endif
|
||||
|
||||
class UIScene_LoadCreateJoinMenu : public UIScene
|
||||
class UIScene_LoadCreateJoinMenu : public UIScene, public Rml::EventListener
|
||||
{
|
||||
private:
|
||||
enum EControls
|
||||
@@ -58,66 +69,6 @@ private:
|
||||
int m_iSaveDetailsCount;
|
||||
|
||||
protected:
|
||||
UIControl m_controlMainPanel;
|
||||
UIControl m_controlLoadGame;
|
||||
UIControl m_controlLoadGamePanel;
|
||||
UIControl m_controlNewGame;
|
||||
UIControl m_controlNewGamePanel;
|
||||
UIControl m_controlJoinGame;
|
||||
UIControl m_controlJoinGamePanel;
|
||||
UIControl_SaveList m_buttonListSaves;
|
||||
UIControl_SaveList m_buttonListNewGames;
|
||||
UIControl_SaveList m_buttonListGames;
|
||||
UIControl_Label m_labelSavesListTitle, m_labelCreateListTitle, m_labelJoinListTitle, m_labelNoGames;
|
||||
UIControl m_controlSavesTimer, m_controlNewGameTimer, m_controlJoinTimer;
|
||||
#if defined(_XBOX_ONE) || defined(__ORBIS__) || defined(_WINDOWS64)
|
||||
UIControl_SpaceIndicatorBar m_spaceIndicatorSaves;
|
||||
#endif
|
||||
|
||||
IggyName m_funcSetActiveTab, m_funcSetMatchesAvailable, m_funcShowSaveSizeBar;
|
||||
bool m_hasMainPanel;
|
||||
bool m_hasNewGameList;
|
||||
bool m_hasNoGamesLabel;
|
||||
bool m_hasTabButtons;
|
||||
ELoadCreateJoinTab m_activeTab;
|
||||
IggyValuePath m_loadGamePath;
|
||||
IggyValuePath m_newGamePath;
|
||||
IggyValuePath m_joinGamePath;
|
||||
bool m_hasLoadGamePath;
|
||||
bool m_hasNewGamePath;
|
||||
bool m_hasJoinGamePath;
|
||||
|
||||
private:
|
||||
UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene)
|
||||
UI_MAP_ELEMENT( m_controlLoadGame, "LoadGame")
|
||||
UI_BEGIN_MAP_CHILD_ELEMENTS( m_controlLoadGame )
|
||||
UI_MAP_ELEMENT( m_buttonListSaves, "LoadGameList")
|
||||
UI_MAP_ELEMENT( m_controlSavesTimer, "LoadGameTimer")
|
||||
#if defined(_XBOX_ONE) || defined(__ORBIS__) || defined(_WINDOWS64)
|
||||
UI_MAP_ELEMENT( m_spaceIndicatorSaves, "SaveSizeBar")
|
||||
#endif
|
||||
UI_END_MAP_CHILD_ELEMENTS()
|
||||
|
||||
UI_MAP_ELEMENT( m_controlNewGame, "NewGame")
|
||||
UI_BEGIN_MAP_CHILD_ELEMENTS( m_controlNewGame )
|
||||
UI_MAP_ELEMENT( m_buttonListNewGames, "NewGameList")
|
||||
UI_MAP_ELEMENT( m_controlNewGameTimer, "NewGameTimer")
|
||||
UI_END_MAP_CHILD_ELEMENTS()
|
||||
|
||||
UI_MAP_ELEMENT( m_controlJoinGame, "JoinGame")
|
||||
UI_BEGIN_MAP_CHILD_ELEMENTS( m_controlJoinGame )
|
||||
UI_MAP_ELEMENT( m_buttonListGames, "JoinGameGamesList")
|
||||
UI_MAP_ELEMENT( m_controlJoinTimer, "JoinGamesTimer")
|
||||
UI_END_MAP_CHILD_ELEMENTS()
|
||||
|
||||
UI_MAP_ELEMENT( m_labelSavesListTitle, "LoadGameTabTitle")
|
||||
UI_MAP_ELEMENT( m_labelCreateListTitle, "NewGameTabTitle")
|
||||
UI_MAP_ELEMENT( m_labelJoinListTitle, "JoinGameTabTitle")
|
||||
UI_MAP_NAME( m_funcSetActiveTab, L"SetActiveTab")
|
||||
UI_MAP_NAME( m_funcSetMatchesAvailable, L"SetMatchesAvailable")
|
||||
UI_MAP_NAME( m_funcShowSaveSizeBar, L"ShowSaveSizeBar")
|
||||
UI_END_MAP_ELEMENTS_AND_NAMES()
|
||||
|
||||
int m_iDefaultButtonsC;
|
||||
int m_iMashUpButtonsC;
|
||||
int m_iState;
|
||||
@@ -144,7 +95,6 @@ private:
|
||||
int m_iSaveInfoC;
|
||||
int m_iSaveListIndex;
|
||||
int m_iGameListIndex;
|
||||
//int *m_iConfigA; // track the texture packs that we don't have installed
|
||||
#ifndef _XBOX_ONE
|
||||
bool m_bSaveTransferInProgress;
|
||||
bool m_bSaveTransferCancelled;
|
||||
@@ -154,8 +104,8 @@ private:
|
||||
bool m_bPendingJoinTabAvailabilityRefresh;
|
||||
bool m_bPendingJoinVisualRefresh;
|
||||
bool m_bRebuildingJoinVisual;
|
||||
bool m_bHasNoGamesLabel;
|
||||
int m_iNewGameListIndex;
|
||||
bool m_bHasNoGamesLabel;
|
||||
int m_iNewGameListIndex;
|
||||
#ifdef _WINDOWS64
|
||||
int m_lastHoverMouseX;
|
||||
int m_lastHoverMouseY;
|
||||
@@ -165,6 +115,8 @@ int m_iNewGameListIndex;
|
||||
int m_hoverBaseIndexJoin;
|
||||
#endif
|
||||
|
||||
ELoadCreateJoinTab m_activeTab;
|
||||
|
||||
public:
|
||||
UIScene_LoadCreateJoinMenu(int iPad, void *initData, UILayer *parentLayer);
|
||||
virtual ~UIScene_LoadCreateJoinMenu();
|
||||
@@ -190,6 +142,14 @@ public:
|
||||
#endif
|
||||
virtual void tick();
|
||||
|
||||
// Override focus/movie lifecycle for RmlUi (no Iggy movie)
|
||||
virtual void gainFocus() override;
|
||||
virtual void reloadMovie(bool force) override;
|
||||
virtual void render(S32 width, S32 height, C4JRender::eViewportType viewport) override;
|
||||
|
||||
// Rml::EventListener
|
||||
void ProcessEvent(Rml::Event& event) override;
|
||||
|
||||
private:
|
||||
void Initialise();
|
||||
void GetSaveInfo();
|
||||
@@ -208,8 +168,15 @@ private:
|
||||
void UpdateJoinTabAvailability();
|
||||
void UpdateSaveSizeBarVisibility();
|
||||
|
||||
// RmlUi helper methods
|
||||
void ShowTabPanel(const char* panelId, bool show);
|
||||
void SetTabButtonState(int tabIndex);
|
||||
void ClearList(const char* listId);
|
||||
void AddListItem(const char* listId, const wstring& text, const wchar_t* textureName = nullptr);
|
||||
void SetListTexture(int itemIndex, const char* listId, const wchar_t* textureName);
|
||||
int GetListItemCount(const char* listId);
|
||||
|
||||
protected:
|
||||
// TODO: This should be pure virtual in this class
|
||||
virtual wstring getMoviePath();
|
||||
|
||||
public:
|
||||
@@ -250,6 +217,7 @@ private:
|
||||
eAddServerPhase m_addServerPhase;
|
||||
wstring m_addServerIP;
|
||||
wstring m_addServerPort;
|
||||
wstring m_addServerName;
|
||||
void BeginAddServer();
|
||||
void AppendServerToFile(const wstring& ip, const wstring& port, const wstring& name);
|
||||
static int AddServerKeyboardCallback(LPVOID lpParam, bool bRes);
|
||||
@@ -261,6 +229,7 @@ private:
|
||||
static void remoteStorageGetSaveCallback(LPVOID lpParam, SonyRemoteStorage::Status s, int error_code);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __ORBIS__
|
||||
//static int PSPlusReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
#endif
|
||||
@@ -385,4 +354,12 @@ private:
|
||||
static void CancelCopySaveCallback(LPVOID lpParam);
|
||||
static int CopySaveErrorDialogFinishedCallback(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
#endif
|
||||
};
|
||||
|
||||
// RmlUi document
|
||||
private:
|
||||
Rml::ElementDocument* m_document;
|
||||
};
|
||||
|
||||
#pragma pop_macro("GetFirstChild")
|
||||
#pragma pop_macro("GetNextSibling")
|
||||
#pragma pop_macro("byte")
|
||||
|
||||
@@ -1,315 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "UIScene.h"
|
||||
|
||||
class LevelGenerationOptions;
|
||||
|
||||
|
||||
#if defined __PS3__ || defined __ORBIS__ || defined(__PSVITA__)
|
||||
#define SONY_REMOTE_STORAGE_DOWNLOAD
|
||||
#endif
|
||||
#if defined __PS3__ || __PSVITA__
|
||||
#define SONY_REMOTE_STORAGE_UPLOAD
|
||||
#endif
|
||||
|
||||
|
||||
class UIScene_LoadCreateJoinMenu : public UIScene
|
||||
{
|
||||
private:
|
||||
enum EControls
|
||||
{
|
||||
eControl_LoadList, //eControl_CreateList
|
||||
eControl_NewList,
|
||||
eControl_JoinList, //eControl_GamesList
|
||||
#if defined(_XBOX_ONE) || defined(__ORBIS__) || defined(_WINDOWS64)
|
||||
eControl_SpaceIndicator,
|
||||
#endif
|
||||
};
|
||||
|
||||
enum EState
|
||||
{
|
||||
e_SavesIdle,
|
||||
e_SavesRepopulate,
|
||||
e_SavesRepopulateAfterMashupHide,
|
||||
e_SavesRepopulateAfterDelete,
|
||||
e_SavesRepopulateAfterTransferDownload,
|
||||
};
|
||||
|
||||
enum eActions
|
||||
{
|
||||
eAction_None=0,
|
||||
eAction_ViewInvites,
|
||||
eAction_JoinGame,
|
||||
};
|
||||
eActions m_eAction;
|
||||
|
||||
static const int JOIN_LOAD_CREATE_BUTTON_INDEX = 0;
|
||||
|
||||
SaveListDetails *m_saveDetails;
|
||||
int m_iSaveDetailsCount;
|
||||
|
||||
protected:
|
||||
UIControl_LeftIconButtonList m_buttonListLoad, m_buttonListNew, m_buttonListJoin;
|
||||
UIControl_Label m_labelLoadListTitle, m_labelNewListTitle, m_labelJoinListTitle;
|
||||
UIControl m_controlLoadTimer, m_controlNewTimer, m_controlJoinTimer;
|
||||
#if defined(_XBOX_ONE) || defined(__ORBIS__) || defined(_WINDOWS64)
|
||||
UIControl_SpaceIndicatorBar m_spaceIndicatorSaves;
|
||||
#endif
|
||||
|
||||
private:
|
||||
UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene)
|
||||
UI_MAP_ELEMENT( m_buttonListLoad, "LoadGameList")
|
||||
UI_MAP_ELEMENT( m_buttonListNew, "NewGameList")
|
||||
UI_MAP_ELEMENT( m_buttonListJoin, "JoinGameGamesList")
|
||||
|
||||
UI_MAP_ELEMENT( m_labelLoadListTitle, "LoadGameTabTitle")
|
||||
UI_MAP_ELEMENT( m_labelNewListTitle, "NewGameTabTitle")
|
||||
UI_MAP_ELEMENT( m_labelJoinListTitle, "JoinGameTabTitle")
|
||||
|
||||
UI_MAP_ELEMENT( m_controlLoadTimer, "LoadGameTimer")
|
||||
UI_MAP_ELEMENT( m_controlNewTimer, "NewGameTimer")
|
||||
UI_MAP_ELEMENT( m_controlJoinTimer, "JoinGamesTimer")
|
||||
|
||||
#if defined(_XBOX_ONE) || defined(__ORBIS__) || defined(_WINDOWS64)
|
||||
UI_MAP_ELEMENT( m_spaceIndicatorSaves, "SaveSizeBar")
|
||||
#endif
|
||||
UI_END_MAP_ELEMENTS_AND_NAMES()
|
||||
|
||||
int m_iDefaultButtonsC;
|
||||
int m_iMashUpButtonsC;
|
||||
int m_iState;
|
||||
|
||||
vector<FriendSessionInfo *> *m_currentSessions;
|
||||
vector<LevelGenerationOptions *> m_generators;
|
||||
vector<File *> *m_saves;
|
||||
|
||||
bool m_bIgnoreInput;
|
||||
bool m_bAllLoaded;
|
||||
bool m_bRetrievingSaveThumbnails;
|
||||
bool m_bSaveThumbnailReady;
|
||||
bool m_bShowingPartyGamesOnly;
|
||||
bool m_bInParty;
|
||||
JoinMenuInitData *m_initData;
|
||||
bool m_bMultiplayerAllowed;
|
||||
int m_iTexturePacksNotInstalled;
|
||||
int m_iRequestingThumbnailId;
|
||||
SAVE_DETAILS *m_pSaveDetails;
|
||||
bool m_bSavesDisplayed;
|
||||
bool m_bExitScene;
|
||||
bool m_bCopying;
|
||||
bool m_bCopyingCancelled;
|
||||
int m_iSaveInfoC;
|
||||
int m_iSaveListIndex;
|
||||
int m_iGameListIndex;
|
||||
//int *m_iConfigA; // track the texture packs that we don't have installed
|
||||
#ifndef _XBOX_ONE
|
||||
bool m_bSaveTransferInProgress;
|
||||
bool m_bSaveTransferCancelled;
|
||||
#endif
|
||||
bool m_bUpdateSaveSize;
|
||||
|
||||
public:
|
||||
UIScene_LoadCreateJoinMenu(int iPad, void *initData, UILayer *parentLayer);
|
||||
virtual ~UIScene_LoadCreateJoinMenu();
|
||||
|
||||
virtual void updateTooltips();
|
||||
virtual void updateComponents();
|
||||
|
||||
virtual void handleDestroy();
|
||||
virtual void handleLoseFocus();
|
||||
virtual void handleGainFocus(bool navBack);
|
||||
virtual void handleTimerComplete(int id);
|
||||
// INPUT
|
||||
virtual void handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled);
|
||||
virtual void handleFocusChange(F64 controlId, F64 childId);
|
||||
virtual void handleInitFocus(F64 controlId, F64 childId);
|
||||
|
||||
virtual EUIScene getSceneType() { return eUIScene_LoadCreateJoinMenu;}
|
||||
|
||||
static void UpdateGamesListCallback(LPVOID pParam);
|
||||
#ifdef _XBOX_ONE
|
||||
void HandleDLCLicenseChange();
|
||||
#endif
|
||||
virtual void tick();
|
||||
|
||||
private:
|
||||
void Initialise();
|
||||
void GetSaveInfo();
|
||||
void UpdateGamesList();
|
||||
void AddDefaultButtons();
|
||||
bool DoesSavesListHaveFocus();
|
||||
bool DoesMashUpWorldHaveFocus();
|
||||
bool DoesGamesListHaveFocus();
|
||||
|
||||
protected:
|
||||
// TODO: This should be pure virtual in this class
|
||||
virtual wstring getMoviePath();
|
||||
|
||||
public:
|
||||
|
||||
static int LoadSaveDataThumbnailReturned(LPVOID lpParam,PBYTE pbThumbnail,DWORD dwThumbnailBytes);
|
||||
static int LoadSaveCallback(LPVOID lpParam,bool bRes);
|
||||
static int DeleteSaveDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int SaveOptionsDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int TexturePackDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int DeleteSaveDataReturned(LPVOID lpParam,bool bRes);
|
||||
static int RenameSaveDataReturned(LPVOID lpParam,bool bRes);
|
||||
static int KeyboardCompleteWorldNameCallback(LPVOID lpParam,bool bRes);
|
||||
#ifdef __PSVITA__
|
||||
static int MustSignInTexturePack(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int MustSignInReturnedTexturePack(void *pParam,bool bContinue, int iPad);
|
||||
static int SignInAdhocReturned(void *pParam,bool bContinue, int iPad);
|
||||
#endif
|
||||
|
||||
protected:
|
||||
void handlePress(F64 controlId, F64 childId);
|
||||
void LoadLevelGen(LevelGenerationOptions *levelGen);
|
||||
void LoadSaveFromDisk(File *saveFile, ESavePlatform savePlatform = SAVE_FILE_PLATFORM_LOCAL);
|
||||
#if defined(__PS3__) || defined(__PSVITA__) || defined(__ORBIS__)
|
||||
void LoadSaveFromCloud();
|
||||
#endif
|
||||
public:
|
||||
virtual void HandleDLCMountingComplete();
|
||||
|
||||
#ifdef __ORBIS__
|
||||
void LoadRemoteFileFromDisk(char* remoteFilename);
|
||||
#endif
|
||||
|
||||
private:
|
||||
void CheckAndJoinGame(int gameIndex);
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
static const int ADD_SERVER_BUTTON_INDEX = 0;
|
||||
enum eAddServerPhase { eAddServer_Idle, eAddServer_IP, eAddServer_Port, eAddServer_Name };
|
||||
eAddServerPhase m_addServerPhase;
|
||||
wstring m_addServerIP;
|
||||
wstring m_addServerPort;
|
||||
void BeginAddServer();
|
||||
void AppendServerToFile(const wstring& ip, const wstring& port, const wstring& name);
|
||||
static int AddServerKeyboardCallback(LPVOID lpParam, bool bRes);
|
||||
#endif
|
||||
|
||||
#ifdef _XBOX_ONE
|
||||
typedef struct _SaveTransferStateContainer
|
||||
{
|
||||
int m_iProgress;
|
||||
bool m_bSaveTransferInProgress;
|
||||
bool m_bSaveTransferCancelled;
|
||||
int m_iPad;
|
||||
C4JStorage::eSaveTransferState m_eSaveTransferState;
|
||||
UIScene_LoadCreateJoinMenu *m_pClass;
|
||||
} SaveTransferStateContainer;
|
||||
enum ESaveTransferFiles
|
||||
{
|
||||
eSaveTransferFile_Marker,
|
||||
eSaveTransferFile_Metadata,
|
||||
eSaveTransferFile_SaveData,
|
||||
};
|
||||
static ESaveTransferFiles s_eSaveTransferFile;
|
||||
static unsigned long s_ulFileSize;
|
||||
static byteArray s_transferData;
|
||||
static wstring m_wstrStageText;
|
||||
LoadMenuInitData *m_loadMenuInitData;
|
||||
|
||||
#ifdef _DEBUG_MENUS_ENABLED
|
||||
static C4JStorage::SAVETRANSFER_FILE_DETAILS m_debugTransferDetails;
|
||||
#endif
|
||||
|
||||
void LaunchSaveTransfer();
|
||||
static int DownloadXbox360SaveThreadProc( LPVOID lpParameter );
|
||||
static void RequestFileSize( SaveTransferStateContainer *pClass, wchar_t *filename );
|
||||
static void RequestFileData( SaveTransferStateContainer *pClass, wchar_t *filename );
|
||||
static int SaveTransferReturned(LPVOID lpParam,C4JStorage::SAVETRANSFER_FILE_DETAILS *pSaveTransferDetails);
|
||||
static int SaveTransferUpdateProgress(LPVOID lpParam,unsigned long ulBytesReceived);
|
||||
static void CancelSaveTransferCallback(LPVOID lpParam);
|
||||
static int NeedSyncMessageReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int CancelSaveTransferCompleteCallback(LPVOID lpParam);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef SONY_REMOTE_STORAGE_DOWNLOAD
|
||||
enum eSaveTransferState
|
||||
{
|
||||
eSaveTransfer_Idle,
|
||||
eSaveTransfer_Busy,
|
||||
eSaveTransfer_GetRemoteSaveInfo,
|
||||
eSaveTransfer_GettingRemoteSaveInfo,
|
||||
eSaveTransfer_CreateDummyFile,
|
||||
eSaveTransfer_CreatingDummyFile,
|
||||
eSaveTransfer_GettingFileSize,
|
||||
eSaveTransfer_FileSizeRetrieved,
|
||||
eSaveTransfer_GetFileData,
|
||||
eSaveTransfer_GettingFileData,
|
||||
eSaveTransfer_FileDataRetrieved,
|
||||
eSaveTransfer_GetSavesInfo,
|
||||
eSaveTransfer_GettingSavesInfo,
|
||||
eSaveTransfer_LoadSaveFromDisc,
|
||||
eSaveTransfer_LoadingSaveFromDisc,
|
||||
eSaveTransfer_CreatingNewSave,
|
||||
eSaveTransfer_Converting,
|
||||
eSaveTransfer_Saving,
|
||||
eSaveTransfer_Succeeded,
|
||||
eSaveTransfer_Cancelled,
|
||||
eSaveTransfer_Error,
|
||||
eSaveTransfer_ErrorDeletingSave,
|
||||
eSaveTransfer_ErrorMesssage,
|
||||
eSaveTransfer_Finished,
|
||||
|
||||
};
|
||||
eSaveTransferState m_eSaveTransferState;
|
||||
static unsigned long m_ulFileSize;
|
||||
static wstring m_wstrStageText;
|
||||
static bool m_bSaveTransferRunning;
|
||||
int m_iProgress;
|
||||
char m_downloadedUniqueFilename[64];//SCE_SAVE_DATA_DIRNAME_DATA_MAXSIZE];
|
||||
bool m_saveTransferDownloadCancelled;
|
||||
void LaunchSaveTransfer();
|
||||
static int CreateDummySaveDataCallback(LPVOID lpParam,bool bRes);
|
||||
static int CrossSaveGetSavesInfoCallback(LPVOID lpParam, SAVE_DETAILS *pSaveDetails,bool bRes);
|
||||
static int LoadCrossSaveDataCallback(void *pParam,bool bIsCorrupt, bool bIsOwner);
|
||||
static int CrossSaveFinishedCallback(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int CrossSaveDeleteOnErrorReturned(LPVOID lpParam,bool bRes);
|
||||
static int RemoteSaveNotFoundCallback(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int DownloadSonyCrossSaveThreadProc( LPVOID lpParameter );
|
||||
static void SaveTransferReturned(LPVOID lpParam, SonyRemoteStorage::Status s, int error_code);
|
||||
static ConsoleSaveFile* SonyCrossSaveConvert();
|
||||
|
||||
static void CancelSaveTransferCallback(LPVOID lpParam);
|
||||
public:
|
||||
static bool isSaveTransferRunning() { return m_bSaveTransferRunning; }
|
||||
private:
|
||||
#endif
|
||||
|
||||
#ifdef SONY_REMOTE_STORAGE_UPLOAD
|
||||
enum eSaveUploadState
|
||||
{
|
||||
eSaveUpload_Idle,
|
||||
eSaveUpload_UploadingFileData,
|
||||
eSaveUpload_FileDataUploaded,
|
||||
eSaveUpload_Cancelled,
|
||||
eSaveUpload_Error,
|
||||
esaveUpload_Finished
|
||||
};
|
||||
|
||||
eSaveUploadState m_eSaveUploadState;
|
||||
bool m_saveTransferUploadCancelled;
|
||||
|
||||
void LaunchSaveUpload();
|
||||
static int UploadSonyCrossSaveThreadProc( LPVOID lpParameter );
|
||||
static void SaveUploadReturned(LPVOID lpParam, SonyRemoteStorage::Status s, int error_code);
|
||||
static void CancelSaveUploadCallback(LPVOID lpParam);
|
||||
static int SaveTransferDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int CrossSaveUploadFinishedCallback(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
#endif
|
||||
|
||||
#if defined _XBOX_ONE || defined __ORBIS__
|
||||
static int CopySaveDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int CopySaveThreadProc( LPVOID lpParameter );
|
||||
static int CopySaveDataReturned( LPVOID lpParameter, bool success, C4JStorage::ESaveGameState state );
|
||||
static bool CopySaveDataProgress(LPVOID lpParam, int percent);
|
||||
static void CancelCopySaveCallback(LPVOID lpParam);
|
||||
static int CopySaveErrorDialogFinishedCallback(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
#endif
|
||||
};
|
||||
9
build.bat
Normal file
@@ -0,0 +1,9 @@
|
||||
@echo off
|
||||
call "C:\Program Files\Microsoft Visual Studio\18\Community\VC\Auxiliary\Build\vcvars64.bat"
|
||||
|
||||
rem Regenerate build system using the windows64 preset (clears stale cache)
|
||||
if exist build\windows64\CMakeCache.txt del build\windows64\CMakeCache.txt
|
||||
cmake --preset windows64
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
cmake --build build\windows64 --config Release --target Minecraft.Client
|
||||