forked from jaildesigner-jailgames/jaildoctors_dilemma
Trabajando en el escalado de las notificaciones
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "common/jail_audio.h"
|
||||
#include "common/jscore.h"
|
||||
#include "const.h"
|
||||
#include "enter_id.h"
|
||||
#include <iostream>
|
||||
@@ -118,6 +119,7 @@ void EnterID::checkEventHandler()
|
||||
else if (eventHandler->key.keysym.scancode == SDL_SCANCODE_RETURN)
|
||||
{
|
||||
options->online.jailerID = (std::string)name;
|
||||
initOnline();
|
||||
section.name = SECTION_PROG_INTRO;
|
||||
break;
|
||||
}
|
||||
@@ -195,8 +197,7 @@ void EnterID::render()
|
||||
// Escribe el jailerID
|
||||
const std::string jailerID = (std::string)name + cursor;
|
||||
const color_t color = stringToColor(options->palette, "white");
|
||||
//text->writeCentered(GAMECANVAS_CENTER_X, 97, jailerID);
|
||||
text->writeDX(TXT_CENTER | TXT_COLOR, GAMECANVAS_CENTER_X, 97, jailerID,1,color);
|
||||
text->writeDX(TXT_CENTER | TXT_COLOR, GAMECANVAS_CENTER_X, 97, jailerID, 1, color);
|
||||
|
||||
// Vuelca el contenido del renderizador en pantalla
|
||||
screen->blit();
|
||||
@@ -262,4 +263,27 @@ void EnterID::switchPalette()
|
||||
{
|
||||
options->palette = options->palette == p_zxspectrum ? p_zxarne : p_zxspectrum;
|
||||
fillTexture();
|
||||
}
|
||||
|
||||
// Inicializa los servicios online
|
||||
void EnterID::initOnline()
|
||||
{
|
||||
if (options->online.jailerID == "")
|
||||
{ // Jailer ID no definido
|
||||
|
||||
options->online.enabled = false;
|
||||
}
|
||||
else
|
||||
{ // Jailer ID iniciado
|
||||
|
||||
options->online.enabled = true;
|
||||
jscore::init(options->online.server, options->online.port);
|
||||
|
||||
const std::string caption = options->online.jailerID + " IS LOGGED IN";
|
||||
screen->showText(caption);
|
||||
if (options->console)
|
||||
{
|
||||
std::cout << caption << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user