diff --git a/coffee_crisis b/coffee_crisis deleted file mode 100755 index 7e0563c..0000000 Binary files a/coffee_crisis and /dev/null differ diff --git a/source/title.cpp b/source/title.cpp index c6c3678..71bf210 100644 --- a/source/title.cpp +++ b/source/title.cpp @@ -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() +{ } \ No newline at end of file diff --git a/source/title.h b/source/title.h index a2cf3d9..d496078 100644 --- a/source/title.h +++ b/source/title.h @@ -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);