Si no hay mando conectado, no se puede usar la opción de dos jugadores (Pedido por MasterJail)
This commit is contained in:
BIN
coffee_crisis
BIN
coffee_crisis
Binary file not shown.
@@ -44,6 +44,9 @@ Title::Title(SDL_Renderer *renderer, Screen *screen, Input *input, Asset *asset,
|
||||
|
||||
// Inicializa los valores
|
||||
init();
|
||||
|
||||
// Deshabilita ciertas opciones de los menus
|
||||
disableMenuEntries();
|
||||
}
|
||||
|
||||
// Destructor
|
||||
@@ -129,6 +132,11 @@ void Title::init()
|
||||
options->input[1].name = availableInputDevices[deviceIndex[1]].name;
|
||||
options->input[1].deviceType = availableInputDevices[deviceIndex[1]].deviceType;
|
||||
}
|
||||
else
|
||||
{ // Si no ha encontrado un mando, deshabilita la opción de jugar a 2 jugadores
|
||||
menu.title->setSelectable(1, false);
|
||||
menu.title->setGreyed(1, true);
|
||||
}
|
||||
|
||||
// Inicializa el bitmap de Coffee
|
||||
coffeeBitmap->init();
|
||||
@@ -1142,4 +1150,9 @@ void Title::reLoadTextures()
|
||||
crisisTexture->reLoad();
|
||||
gradientTexture->reLoad();
|
||||
createTiledBackground();
|
||||
}
|
||||
|
||||
// Deshabilita ciertas opciones de los menus
|
||||
void Title::disableMenuEntries()
|
||||
{
|
||||
}
|
||||
@@ -141,6 +141,9 @@ private:
|
||||
// Recarga las texturas
|
||||
void reLoadTextures();
|
||||
|
||||
// Deshabilita ciertas opciones de los menus
|
||||
void disableMenuEntries();
|
||||
|
||||
public:
|
||||
// Constructor
|
||||
Title(SDL_Renderer *renderer, Screen *screen, Input *input, Asset *asset, options_t *options, Lang *lang, section_t section);
|
||||
|
||||
Reference in New Issue
Block a user