Afegint smart pointers
Actualitzat Resources Actualitzades les classes Sprite i derivades Afegida nova tipografia Actualitzat Asset Actualitzat Text
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include <stdlib.h> // Para free, malloc, abs
|
||||
#include <cmath> // Para round, abs
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <cctype>
|
||||
|
||||
// Calcula el cuadrado de la distancia entre dos puntos
|
||||
@@ -603,4 +604,17 @@ std::string getPath(const std::string &full_path)
|
||||
{
|
||||
std::filesystem::path path(full_path);
|
||||
return path.parent_path().string();
|
||||
}
|
||||
|
||||
// Imprime por pantalla una linea de texto de tamaño fijo rellena con puntos
|
||||
void printWithDots(const std::string &text1, const std::string &text2, const std::string &text3)
|
||||
{
|
||||
std::cout.setf(std::ios::left, std::ios::adjustfield);
|
||||
std::cout << text1;
|
||||
|
||||
std::cout.width(50 - text1.length() - text3.length());
|
||||
std::cout.fill('.');
|
||||
std::cout << text2;
|
||||
|
||||
std::cout << text3 << std::endl;
|
||||
}
|
||||
Reference in New Issue
Block a user