Añadido el cambio de borde, tamaño de ventana y paleta a todas las secciones del juego

This commit is contained in:
2022-10-27 11:49:47 +02:00
parent abbff605c0
commit 4133dfd7c9
11 changed files with 162 additions and 57 deletions

View File

@@ -1,4 +1,5 @@
#include "logo.h"
#include <iostream>
// Constructor
Logo::Logo(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, options_t *options, int subsection)
@@ -78,12 +79,13 @@ void Logo::checkEventHandler()
break;
}
// Cualquier tecla pulsada
if ((eventHandler->type == SDL_KEYDOWN) || (eventHandler->type == SDL_JOYBUTTONDOWN))
// Comprueba las teclas que se han pulsado
if ((eventHandler->type == SDL_KEYDOWN && eventHandler->key.repeat == 0) || (eventHandler->type == SDL_JOYBUTTONDOWN))
{
switch (eventHandler->key.keysym.scancode)
{
case SDL_SCANCODE_ESCAPE:
std::cout << "PULSADO ESCAPE" << std::endl;
section.name = SECTION_PROG_QUIT;
break;