ServiceMenu ja pinta un recuadro de prova

el ServiceMenu el pinta Screen
This commit is contained in:
2025-06-02 11:35:18 +02:00
parent 653bb7dc76
commit 16d9774519
7 changed files with 34 additions and 14 deletions

View File

@@ -18,6 +18,7 @@
#include "notifier.h" // Para Notifier
#include "options.h" // Para Options, options, WindowOptions, Vid...
#include "resource.h" // Para Resource
#include "service_menu.h" // Para ServiceMenu
#include "text.h" // Para Text
// Singleton
@@ -172,7 +173,7 @@ void Screen::update()
fps_.calculate(SDL_GetTicks());
shake_effect_.update(src_rect_, dst_rect_);
flash_effect_.update();
Notifier::get()->update();
notifier_->update();
Mouse::updateCursorVisibility();
}
@@ -277,7 +278,8 @@ void Screen::renderOverlays()
renderShake();
renderFlash();
renderAttenuate();
Notifier::get()->render();
serviceMenu_->render();
notifier_->render();
#ifdef DEBUG
renderInfo();
#endif
@@ -401,4 +403,11 @@ void Screen::toggleVSync()
{
options.video.v_sync = !options.video.v_sync;
SDL_SetRenderVSync(renderer_, options.video.v_sync ? 1 : SDL_RENDERER_VSYNC_DISABLED);
}
// Obtiene los punteros a los singletones
void Screen::getSingletons()
{
serviceMenu_ = ServiceMenu::get();
notifier_ = Notifier::get();
}