Revert "Project modernization (#630)"
This code was not tested and breaks in Release builds, reverting to restore
functionality of the nightly. All in-game menus do not work and generating
a world crashes.
This reverts commit a9be52c41a.
This commit is contained in:
@@ -16,13 +16,13 @@ UIScene_AnvilMenu::UIScene_AnvilMenu(int iPad, void *_initData, UILayer *parentL
|
||||
|
||||
m_labelAnvil.init( app.GetString(IDS_REPAIR_AND_NAME) );
|
||||
|
||||
AnvilScreenInput *initData = static_cast<AnvilScreenInput *>(_initData);
|
||||
AnvilScreenInput *initData = (AnvilScreenInput *)_initData;
|
||||
m_inventory = initData->inventory;
|
||||
|
||||
Minecraft *pMinecraft = Minecraft::GetInstance();
|
||||
if( pMinecraft->localgameModes[iPad] != nullptr )
|
||||
if( pMinecraft->localgameModes[iPad] != NULL )
|
||||
{
|
||||
TutorialMode *gameMode = static_cast<TutorialMode *>(pMinecraft->localgameModes[iPad]);
|
||||
TutorialMode *gameMode = (TutorialMode *)pMinecraft->localgameModes[iPad];
|
||||
m_previousTutorialState = gameMode->getTutorial()->getCurrentState();
|
||||
gameMode->getTutorial()->changeTutorialState(e_Tutorial_State_Anvil_Menu, this);
|
||||
}
|
||||
@@ -263,7 +263,7 @@ void UIScene_AnvilMenu::setSectionSelectedSlot(ESceneSection eSection, int x, in
|
||||
|
||||
int index = (y * cols) + x;
|
||||
|
||||
UIControl_SlotList *slotList = nullptr;
|
||||
UIControl_SlotList *slotList = NULL;
|
||||
switch( eSection )
|
||||
{
|
||||
case eSectionAnvilItem1:
|
||||
@@ -291,7 +291,7 @@ void UIScene_AnvilMenu::setSectionSelectedSlot(ESceneSection eSection, int x, in
|
||||
|
||||
UIControl *UIScene_AnvilMenu::getSection(ESceneSection eSection)
|
||||
{
|
||||
UIControl *control = nullptr;
|
||||
UIControl *control = NULL;
|
||||
switch( eSection )
|
||||
{
|
||||
case eSectionAnvilItem1:
|
||||
@@ -334,7 +334,7 @@ void UIScene_AnvilMenu::onDirectEditFinished(UIControl_TextInput *input, UIContr
|
||||
|
||||
int UIScene_AnvilMenu::KeyboardCompleteCallback(LPVOID lpParam,bool bRes)
|
||||
{
|
||||
UIScene_AnvilMenu *pClass=static_cast<UIScene_AnvilMenu *>(lpParam);
|
||||
UIScene_AnvilMenu *pClass=(UIScene_AnvilMenu *)lpParam;
|
||||
pClass->setIgnoreInput(false);
|
||||
|
||||
if (bRes)
|
||||
@@ -343,8 +343,8 @@ int UIScene_AnvilMenu::KeyboardCompleteCallback(LPVOID lpParam,bool bRes)
|
||||
uint16_t pchText[128];
|
||||
ZeroMemory(pchText, 128 * sizeof(uint16_t));
|
||||
Win64_GetKeyboardText(pchText, 128);
|
||||
pClass->setEditNameValue(reinterpret_cast<wchar_t *>(pchText));
|
||||
pClass->m_itemName = reinterpret_cast<wchar_t *>(pchText);
|
||||
pClass->setEditNameValue((wchar_t *)pchText);
|
||||
pClass->m_itemName = (wchar_t *)pchText;
|
||||
pClass->updateItemName();
|
||||
#else
|
||||
uint16_t pchText[128];
|
||||
@@ -395,7 +395,7 @@ void UIScene_AnvilMenu::handleEditNamePressed()
|
||||
break;
|
||||
}
|
||||
#else
|
||||
InputManager.RequestKeyboard(app.GetString(IDS_TITLE_RENAME),m_textInputAnvil.getLabel(),static_cast<DWORD>(m_iPad),30,&UIScene_AnvilMenu::KeyboardCompleteCallback,this,C_4JInput::EKeyboardMode_Default);
|
||||
InputManager.RequestKeyboard(app.GetString(IDS_TITLE_RENAME),m_textInputAnvil.getLabel(),(DWORD)m_iPad,30,&UIScene_AnvilMenu::KeyboardCompleteCallback,this,C_4JInput::EKeyboardMode_Default);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user