Don Melitonitzada la classe Notifier e independitzada de la classe Screen

Ara es poden afegir codis a les notificacions per identificarles
This commit is contained in:
2024-10-15 20:09:09 +02:00
parent e99c2c5265
commit de6508c37c
10 changed files with 506 additions and 463 deletions

View File

@@ -1,24 +1,25 @@
#include "title.h"
#include <SDL2/SDL_events.h> // for SDL_PollEvent, SDL_Event, SDL_KEYDOWN
#include <SDL2/SDL_keycode.h> // for SDLK_1, SDLK_2, SDLK_3
#include <SDL2/SDL_rect.h> // for SDL_Rect
#include <SDL2/SDL_render.h> // for SDL_Renderer
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
#include <string> // for char_traits, operator+, to_string, bas...
#include <utility> // for move
#include <vector> // for vector
#include "asset.h" // for Asset
#include "global_inputs.h" // for check
#include "input.h" // for Input, InputType, INPUT_DO_NOT_ALLOW_R...
#include "jail_audio.h" // for JA_GetMusicState, JA_Music_state, JA_P...
#include "lang.h" // for getText
#include "options.h" // for options
#include "param.h" // for param
#include "screen.h" // for Screen
#include "section.h" // for Options, options, Name, name
#include "texture.h" // for Texture
#include "utils.h" // for Param, OptionsController, Color, Param...
struct JA_Music_t; // lines 17-17
#include <SDL2/SDL_events.h> // for SDL_PollEvent, SDL_Event, SDL_KEYDOWN
#include <SDL2/SDL_keycode.h> // for SDLK_1, SDLK_2, SDLK_3
#include <SDL2/SDL_rect.h> // for SDL_Rect
#include <SDL2/SDL_render.h> // for SDL_Renderer
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
#include <string> // for char_traits, operator+, to_string, bas...
#include <utility> // for move
#include <vector> // for vector
#include "asset.h" // for Asset
#include "global_inputs.h" // for check
#include "input.h" // for Input, InputType, INPUT_DO_NOT_ALLOW_R...
#include "jail_audio.h" // for JA_GetMusicState, JA_Music_state, JA_P...
#include "lang.h" // for getText
#include "notifier.h" // for Notifier
#include "options.h" // for options
#include "param.h" // for param
#include "screen.h" // for Screen
#include "section.h" // for Options, options, Name, name
#include "texture.h" // for Texture
#include "utils.h" // for Param, OptionsController, Color, Param...
struct JA_Music_t; // lines 17-17
// Constructor
Title::Title(JA_Music_t *music)
@@ -354,7 +355,7 @@ void Title::swapControllers()
}
}
screen_->showNotification(text[0], text[1]);
Notifier::get()->showText(text[0], text[1]);
resetCounter();
}