Añadidos ficheros .gif
This commit is contained in:
BIN
data/pal01.gif
Normal file
BIN
data/pal01.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 273 B |
BIN
data/pal02.gif
Normal file
BIN
data/pal02.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 273 B |
BIN
data/williams.gif
Normal file
BIN
data/williams.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
63
main.cpp
63
main.cpp
@@ -391,29 +391,32 @@ void checkEvents()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SDL_SCANCODE_F3:
|
case SDL_SCANCODE_F3:
|
||||||
|
++fx %= fxTotal;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SDL_SCANCODE_F4:
|
||||||
--fireModifier;
|
--fireModifier;
|
||||||
fireModifier = max(0, fireModifier);
|
fireModifier = max(0, fireModifier);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SDL_SCANCODE_F4:
|
case SDL_SCANCODE_F5:
|
||||||
++fireModifier;
|
++fireModifier;
|
||||||
fireModifier = min(30, fireModifier);
|
fireModifier = min(30, fireModifier);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SDL_SCANCODE_SPACE:
|
case SDL_SCANCODE_F6:
|
||||||
++fx %= fxTotal;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SDL_SCANCODE_N:
|
|
||||||
screen->showNotification("Ejemplo de notificacion", "con 2 lineas de texto", 0);
|
screen->showNotification("Ejemplo de notificacion", "con 2 lineas de texto", 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SDL_SCANCODE_T:
|
case SDL_SCANCODE_F7:
|
||||||
if (osk == nullptr)
|
if (osk == nullptr)
|
||||||
initOnScreenKeyboard();
|
initOnScreenKeyboard();
|
||||||
else
|
else
|
||||||
deleteOnScreenKeyboard();
|
deleteOnScreenKeyboard();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SDL_SCANCODE_F8:
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -628,19 +631,45 @@ void renderFX()
|
|||||||
// Dibuja el texto
|
// Dibuja el texto
|
||||||
void renderText()
|
void renderText()
|
||||||
{
|
{
|
||||||
|
const string text1 = "Jail Engine DEMO";
|
||||||
|
const string text2 = "2023,2024 JailDesigner";
|
||||||
|
|
||||||
|
const string text3 = "Pulsa 'F1' o 'F2' para disminuir o aumentar la ventana";
|
||||||
|
|
||||||
|
const string text4 = "Pulsa 'F3' para cambiar el efecto de fondo: ";
|
||||||
|
const string text5 = "Pulsa 'F4' o 'F5' para modificar el efecto de fuego: ";
|
||||||
|
|
||||||
|
const string text6 = "Pulsa 'F6' para mostrar una notificacion";
|
||||||
|
const string text7 = "Pulsa 'F7' para mostrar u ocultar el teclado";
|
||||||
|
const string text8 = "Pulsa 'F8' para añadir o eliminar sprites";
|
||||||
|
|
||||||
|
const string text9 = "Controles:";
|
||||||
|
|
||||||
|
const string text10 = "Pulsa 'ESCAPE' para terminar el programa";
|
||||||
const string fxName = fx == 0 ? "Degradado" : "Fuego";
|
const string fxName = fx == 0 ? "Degradado" : "Fuego";
|
||||||
|
|
||||||
|
const int center = options->screen.nativeWidth / 2;
|
||||||
|
|
||||||
text->setZoom(2);
|
text->setZoom(2);
|
||||||
text->writeDX(TXT_CENTER | TXT_STROKE, options->screen.nativeWidth / 2, text->getCharacterSize(), "Jail Engine DEMO", 1, {255, 255, 255}, 1, {0, 0, 192});
|
text->writeDX(TXT_CENTER | TXT_STROKE, center, text->getCharacterSize(), text1, 1, {255, 255, 255}, 1, {0, 0, 192});
|
||||||
text->disableZoom();
|
text->disableZoom();
|
||||||
text->writeDX(TXT_CENTER | TXT_COLOR | TXT_STROKE, options->screen.nativeWidth / 2, text->getCharacterSize() * 4, "2023 JailDesigner", 1, {240, 240, 240}, 1, {0, 0, 192});
|
text->writeDX(TXT_CENTER | TXT_COLOR | TXT_STROKE, center, text->getCharacterSize() * 4, text2, 1, {240, 240, 240}, 1, {0, 0, 192});
|
||||||
debugText->writeDX(TXT_CENTER | TXT_COLOR | TXT_STROKE, options->screen.nativeWidth / 2, text->getCharacterSize() * 7, "Pulsa 'F1' o 'F2' para disminuir o aumentar la ventana", 1, {240, 240, 240}, 1, {0, 0, 192});
|
|
||||||
debugText->writeDX(TXT_CENTER | TXT_COLOR | TXT_STROKE, options->screen.nativeWidth / 2, text->getCharacterSize() * 9, "Pulsa 'ESPACIO' para cambiar el efecto de fondo: " + fxName, 1, {240, 240, 240}, 1, {0, 0, 192});
|
debugText->writeDX(TXT_CENTER | TXT_COLOR | TXT_STROKE, center, text->getCharacterSize() * 7, text3, 1, {240, 240, 240}, 1, {0, 0, 192});
|
||||||
|
|
||||||
|
debugText->writeDX(TXT_CENTER | TXT_COLOR | TXT_STROKE, center, text->getCharacterSize() * 9, text4 + fxName, 1, {240, 240, 240}, 1, {0, 0, 192});
|
||||||
if (fxName == "Fuego")
|
if (fxName == "Fuego")
|
||||||
debugText->writeDX(TXT_CENTER | TXT_COLOR | TXT_STROKE, options->screen.nativeWidth / 2, text->getCharacterSize() * 11, "Pulsa 'F3' o 'F4' para modificar el fuego: " + to_string(fireModifier), 1, {240, 240, 240}, 1, {0, 0, 192});
|
debugText->writeDX(TXT_CENTER | TXT_COLOR | TXT_STROKE, center, text->getCharacterSize() * 10, text5 + to_string(fireModifier), 1, {240, 240, 240}, 1, {0, 0, 192});
|
||||||
debugText->writeDX(TXT_CENTER | TXT_COLOR | TXT_STROKE, options->screen.nativeWidth / 2, text->getCharacterSize() * 13, "Pulsa 'N' para mostrar una notificacion", 1, {240, 240, 240}, 1, {0, 0, 192});
|
|
||||||
debugText->writeDX(TXT_CENTER | TXT_COLOR | TXT_STROKE, options->screen.nativeWidth / 2, text->getCharacterSize() * 15, controllerName, 1, {240, 240, 240}, 1, {0, 0, 192});
|
debugText->writeDX(TXT_CENTER | TXT_COLOR | TXT_STROKE, center, text->getCharacterSize() * 12, text6, 1, {240, 240, 240}, 1, {0, 0, 192});
|
||||||
debugText->writeDX(TXT_CENTER | TXT_COLOR | TXT_STROKE, options->screen.nativeWidth / 2, text->getCharacterSize() * 17, inputPressed, 1, {240, 240, 240}, 1, {0, 0, 192});
|
debugText->writeDX(TXT_CENTER | TXT_COLOR | TXT_STROKE, center, text->getCharacterSize() * 13, text7, 1, {240, 240, 240}, 1, {0, 0, 192});
|
||||||
debugText->writeDX(TXT_CENTER | TXT_COLOR | TXT_STROKE, options->screen.nativeWidth / 2, options->screen.nativeHeight - (text->getCharacterSize() * 2), "Pulsa 'ESCAPE' para terminar el programa", 1, {240, 240, 240}, 1, {0, 0, 192});
|
debugText->writeDX(TXT_CENTER | TXT_COLOR | TXT_STROKE, center, text->getCharacterSize() * 14, text8, 1, {240, 240, 240}, 1, {0, 0, 192});
|
||||||
|
|
||||||
|
debugText->writeDX(TXT_CENTER | TXT_COLOR | TXT_STROKE, center, text->getCharacterSize() * 16, text9, 1, {240, 240, 240}, 1, {0, 0, 192});
|
||||||
|
debugText->writeDX(TXT_CENTER | TXT_COLOR | TXT_STROKE, center, text->getCharacterSize() * 17, controllerName, 1, {240, 240, 240}, 1, {0, 0, 192});
|
||||||
|
debugText->writeDX(TXT_CENTER | TXT_COLOR | TXT_STROKE, center, text->getCharacterSize() * 18, inputPressed, 1, {240, 240, 240}, 1, {0, 0, 192});
|
||||||
|
|
||||||
|
debugText->writeDX(TXT_CENTER | TXT_COLOR | TXT_STROKE, center, options->screen.nativeHeight - (text->getCharacterSize() * 2), text10, 1, {240, 240, 240}, 1, {0, 0, 192});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dibuja los elementos del programa en pantalla
|
// Dibuja los elementos del programa en pantalla
|
||||||
@@ -658,7 +687,7 @@ void render()
|
|||||||
|
|
||||||
// Dinuja el texto
|
// Dinuja el texto
|
||||||
renderText();
|
renderText();
|
||||||
|
|
||||||
// Dibuja el teclado en pantalla
|
// Dibuja el teclado en pantalla
|
||||||
renderOnScreenKeyboard();
|
renderOnScreenKeyboard();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user