Small Tweaks

This commit is contained in:
TheBrokenRail
2023-11-02 18:55:24 -04:00
committed by iProgramInCpp
parent 118d28910d
commit 7771bc20a7
2 changed files with 7 additions and 7 deletions

View File

@@ -295,12 +295,12 @@ void Screen::mouseReleased(int xPos, int yPos, int d)
if (m_pClickedButton)
{
m_pClickedButton->released(xPos, yPos);
if (m_pMinecraft->isTouchscreen())
if (m_pMinecraft->isTouchscreen() && button->clicked(m_pMinecraft, xPos, yPos))
{
m_pMinecraft->m_pSoundEngine->play("random.click");
buttonClicked(m_pClickedButton);
}
m_pClickedButton->released(xPos, yPos);
m_pClickedButton = nullptr;
}
}