corregidos varios bugs

This commit is contained in:
2024-09-11 20:42:21 +02:00
parent 41c3e1f32c
commit a435e3ed8c
7 changed files with 29 additions and 27 deletions

View File

@@ -125,14 +125,17 @@ void DefineButtons::checkInput()
}
// Habilita el objeto
void DefineButtons::enable(int index)
bool DefineButtons::enable(int index)
{
if (input->getNumControllers() > 0)
if (index < input->getNumControllers())
{
enabled = true;
indexController = index;
indexButton = 0;
return true;
}
return false;
}
// Comprueba si está habilitado