Text: revisada la classe
window_message: correcions
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
#include "mouse.h" // Para updateCursorVisibility
|
||||
#include "options.h" // Para VideoOptions, video, WindowOptions, window
|
||||
#include "param.h" // Para Param, param, ParamGame, ParamDebug
|
||||
#include "text.h" // Para Text, TEXT_COLOR, TEXT_STROKE
|
||||
#include "text.h" // Para Text, Text::COLOR, Text::STROKE
|
||||
#include "texture.h" // Para Texture
|
||||
#include "ui/notifier.h" // Para Notifier
|
||||
#include "ui/service_menu.h" // Para ServiceMenu
|
||||
@@ -81,7 +81,7 @@ void Screen::start() { SDL_SetRenderTarget(renderer_, game_canvas_); }
|
||||
void Screen::render() {
|
||||
fps_.increment();
|
||||
renderOverlays(); // Renderiza todos los overlays y efectos
|
||||
renderScreen(); // Renderiza el contenido del game_canvas_
|
||||
renderPresent(); // Renderiza el contenido del game_canvas_
|
||||
}
|
||||
|
||||
// Vuelca el contenido del renderizador en pantalla exceptuando ciertas partes
|
||||
@@ -90,11 +90,11 @@ void Screen::coreRender() {
|
||||
#ifdef _DEBUG
|
||||
renderInfo();
|
||||
#endif
|
||||
renderScreen(); // Renderiza el contenido del game_canvas_
|
||||
renderPresent(); // Renderiza el contenido del game_canvas_
|
||||
}
|
||||
|
||||
// Renderiza el contenido del game_canvas_
|
||||
void Screen::renderScreen() {
|
||||
void Screen::renderPresent() {
|
||||
SDL_SetRenderTarget(renderer_, nullptr);
|
||||
clean();
|
||||
|
||||
@@ -212,11 +212,11 @@ void Screen::renderShake() {
|
||||
void Screen::renderInfo() {
|
||||
if (debug_info_.show) {
|
||||
// Resolution
|
||||
debug_info_.text->writeDX(TEXT_COLOR | TEXT_STROKE, param.game.width - debug_info_.text->lenght(Options::video.info) - 2, 1, Options::video.info, 1, param.debug.color, 1, param.debug.color.DARKEN(150));
|
||||
debug_info_.text->writeDX(Text::COLOR | Text::STROKE, param.game.width - debug_info_.text->length(Options::video.info) - 2, 1, Options::video.info, 1, param.debug.color, 1, param.debug.color.DARKEN(150));
|
||||
|
||||
// FPS
|
||||
const std::string FPS_TEXT = std::to_string(fps_.last_value) + " FPS";
|
||||
debug_info_.text->writeDX(TEXT_COLOR | TEXT_STROKE, param.game.width - debug_info_.text->lenght(FPS_TEXT) - 2, 1 + debug_info_.text->getCharacterSize(), FPS_TEXT, 1, param.debug.color, 1, param.debug.color.DARKEN(150));
|
||||
debug_info_.text->writeDX(Text::COLOR | Text::STROKE, param.game.width - debug_info_.text->length(FPS_TEXT) - 2, 1 + debug_info_.text->getCharacterSize(), FPS_TEXT, 1, param.debug.color, 1, param.debug.color.DARKEN(150));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user