varies millores en el hud de debug
This commit is contained in:
@@ -313,6 +313,17 @@ void TextRenderer::printAbsolute(int physical_x, int physical_y, const std::stri
|
||||
printAbsolute(physical_x, physical_y, text.c_str(), color);
|
||||
}
|
||||
|
||||
void TextRenderer::printAbsoluteShadowed(int physical_x, int physical_y, const char* text) {
|
||||
// Sombra: negro semitransparente desplazado 1px
|
||||
printAbsolute(physical_x + 1, physical_y + 1, text, {0, 0, 0, 180});
|
||||
// Texto: blanco opaco
|
||||
printAbsolute(physical_x, physical_y, text, {255, 255, 255, 255});
|
||||
}
|
||||
|
||||
void TextRenderer::printAbsoluteShadowed(int physical_x, int physical_y, const std::string& text) {
|
||||
printAbsoluteShadowed(physical_x, physical_y, text.c_str());
|
||||
}
|
||||
|
||||
int TextRenderer::getTextWidth(const char* text) {
|
||||
if (!isInitialized() || text == nullptr) {
|
||||
return 0;
|
||||
|
||||
@@ -31,6 +31,10 @@ public:
|
||||
void printAbsolute(int physical_x, int physical_y, const char* text, SDL_Color color);
|
||||
void printAbsolute(int physical_x, int physical_y, const std::string& text, SDL_Color color);
|
||||
|
||||
// Renderiza texto con sombra negra (+1px offset) para máxima legibilidad sobre cualquier fondo
|
||||
void printAbsoluteShadowed(int physical_x, int physical_y, const char* text);
|
||||
void printAbsoluteShadowed(int physical_x, int physical_y, const std::string& text);
|
||||
|
||||
// Obtiene el ancho de un texto renderizado (en píxeles lógicos para compatibilidad)
|
||||
int getTextWidth(const char* text);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user