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
|
// Inicializa los valores
|
||||||
init();
|
init();
|
||||||
|
|
||||||
|
// Deshabilita ciertas opciones de los menus
|
||||||
|
disableMenuEntries();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
@@ -129,6 +132,11 @@ void Title::init()
|
|||||||
options->input[1].name = availableInputDevices[deviceIndex[1]].name;
|
options->input[1].name = availableInputDevices[deviceIndex[1]].name;
|
||||||
options->input[1].deviceType = availableInputDevices[deviceIndex[1]].deviceType;
|
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
|
// Inicializa el bitmap de Coffee
|
||||||
coffeeBitmap->init();
|
coffeeBitmap->init();
|
||||||
@@ -1143,3 +1151,8 @@ void Title::reLoadTextures()
|
|||||||
gradientTexture->reLoad();
|
gradientTexture->reLoad();
|
||||||
createTiledBackground();
|
createTiledBackground();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Deshabilita ciertas opciones de los menus
|
||||||
|
void Title::disableMenuEntries()
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -141,6 +141,9 @@ private:
|
|||||||
// Recarga las texturas
|
// Recarga las texturas
|
||||||
void reLoadTextures();
|
void reLoadTextures();
|
||||||
|
|
||||||
|
// Deshabilita ciertas opciones de los menus
|
||||||
|
void disableMenuEntries();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
Title(SDL_Renderer *renderer, Screen *screen, Input *input, Asset *asset, options_t *options, Lang *lang, section_t section);
|
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