* Fix errors caused by #30

This commit is contained in:
iProgramInCpp
2023-08-06 12:59:46 +03:00
parent 9e9d2110e3
commit 2b105fe1eb
14 changed files with 137 additions and 90 deletions

View File

@@ -80,9 +80,9 @@ void PauseScreen::updateServerVisibilityText()
ServerSideNetworkHandler* pSSNH = (ServerSideNetworkHandler*)m_pMinecraft->m_pNetEventCallback;
if (pSSNH->m_bAllowIncoming)
m_btnVisible.field_18 = "Server is visible";
m_btnVisible.m_text = "Server is visible";
else
m_btnVisible.field_18 = "Server is invisible";
m_btnVisible.m_text = "Server is invisible";
}
void PauseScreen::tick()
@@ -100,16 +100,16 @@ void PauseScreen::render(int a, int b, float c)
void PauseScreen::buttonClicked(Button* pButton)
{
if (pButton->buttonId == m_btnBack.buttonId)
if (pButton->m_buttonId == m_btnBack.m_buttonId)
m_pMinecraft->setScreen(nullptr);
if (pButton->buttonId == m_btnQuit.buttonId)
if (pButton->m_buttonId == m_btnQuit.m_buttonId)
m_pMinecraft->leaveGame(false);
if (pButton->buttonId == m_btnQuitAndCopy.buttonId)
if (pButton->m_buttonId == m_btnQuitAndCopy.m_buttonId)
m_pMinecraft->leaveGame(true);
if (pButton->buttonId == m_btnVisible.buttonId)
if (pButton->m_buttonId == m_btnVisible.m_buttonId)
{
if (m_pMinecraft->m_pRakNetInstance && m_pMinecraft->m_pRakNetInstance->m_bIsHost)
{
@@ -121,7 +121,7 @@ void PauseScreen::buttonClicked(Button* pButton)
}
#ifdef ENH_ADD_OPTIONS_PAUSE
if (pButton->buttonId == m_btnOptions.buttonId)
if (pButton->m_buttonId == m_btnOptions.m_buttonId)
m_pMinecraft->setScreen(new OptionsScreen);
#endif
}