From cc8ef6e927a75829843d9c029cbfcb26a1a07d7e Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Sat, 28 Aug 2021 00:55:27 +0200 Subject: [PATCH] working on text notifications --- source/director.cpp | 3 +-- source/title.cpp | 21 +++++++++++++++++---- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/source/director.cpp b/source/director.cpp index 8ea2fae..9b44dca 100644 --- a/source/director.cpp +++ b/source/director.cpp @@ -166,8 +166,7 @@ bool Director::initSDL() else { // Crea un renderizador para la ventana con vsync - //mRenderer = SDL_CreateRenderer(mWindow, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC); - mRenderer = SDL_CreateRenderer(mWindow, -1, SDL_RENDERER_ACCELERATED); + mRenderer = SDL_CreateRenderer(mWindow, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC); if (mRenderer == NULL) { printf("Renderer could not be created!\nSDL Error: %s\n", SDL_GetError()); diff --git a/source/title.cpp b/source/title.cpp index 468fcad..3b9e65f 100644 --- a/source/title.cpp +++ b/source/title.cpp @@ -257,12 +257,25 @@ void Title::init(bool demo, Uint8 subsection) mMenu.title->centerMenu(SCREEN_CENTER_X); mMenu.title->centerMenuElements(); - mMenu.options->init("OPTIONS", 0, 14 * BLOCK, MENU_BACKGROUND_SOLID); - mMenu.options->addItem(mTextStrings[4]); + //mMenu.options->init("OPTIONS", 0, 14 * BLOCK, MENU_BACKGROUND_SOLID); + //mMenu.options->addItem(mTextStrings[4]); + //mMenu.options->addItem(mTextStrings[7]); + //mMenu.options->addItem(mTextStrings[8], 0, 5); + //mMenu.options->addItem(mTextStrings[9]); + //mMenu.options->addItem(mTextStrings[10]); + //mMenu.options->setDefaultActionWhenCancel(4); + //mMenu.options->setBackgroundColor(0x30, 0x30, 0x40, 192); + //mMenu.options->setSelectorColor(0xe5, 0x1c, 0x23, 255); + //mMenu.options->setSelectorTextColor(0xFF, 0xF1, 0x76); + //mMenu.options->centerMenu(SCREEN_CENTER_X); + //mMenu.options->centerMenuElements(); + + mMenu.options->init("OPTIONS", 0, BLOCK, MENU_BACKGROUND_SOLID); + mMenu.options->addItem(mTextStrings[4]); // WINDOW mMenu.options->addItem(mTextStrings[7]); mMenu.options->addItem(mTextStrings[8], 0, 5); - mMenu.options->addItem(mTextStrings[9]); - mMenu.options->addItem(mTextStrings[10]); + mMenu.options->addItem(mTextStrings[9]); // ACCEPT + mMenu.options->addItem(mTextStrings[10]); // CANCEL mMenu.options->setDefaultActionWhenCancel(4); mMenu.options->setBackgroundColor(0x30, 0x30, 0x40, 192); mMenu.options->setSelectorColor(0xe5, 0x1c, 0x23, 255);