Precàrrega de tots els recursos al inici del joc
8.000.000 de cherrypickings que he anat fent pel codi
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
#include "utils.h"
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <algorithm> // for min, clamp, find_if_not, transform
|
||||
#include <cctype> // for tolower, isspace
|
||||
#include <cmath> // for cos, pow, M_PI
|
||||
@@ -188,3 +190,16 @@ bool stringInVector(const std::vector<std::string> &vec, const std::string &str)
|
||||
{
|
||||
return std::find(vec.begin(), vec.end(), str) != vec.end();
|
||||
}
|
||||
|
||||
// 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(70 - text1.length() - text3.length());
|
||||
std::cout.fill('.');
|
||||
std::cout << text2;
|
||||
|
||||
std::cout << text3 << std::endl;
|
||||
}
|
||||
Reference in New Issue
Block a user