diff options
Diffstat (limited to 'src/MessageBox.h')
-rw-r--r-- | src/MessageBox.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/MessageBox.h b/src/MessageBox.h index 0e1fa8f..def138c 100644 --- a/src/MessageBox.h +++ b/src/MessageBox.h @@ -31,6 +31,7 @@ #include "SFML/Graphics/Text.hpp" #include "SfmlUtils.h" #include <vector> +#include <limits> const int LARGE_TEXT = 54; const int MEDIUM_TEXT = 36; @@ -57,7 +58,7 @@ inline MessageBox initializeMessageBox(const std::vector<DisplayText> &strs, sf::RectangleShape box; float width = 0.f; float height = 0.f; - float left = MAXFLOAT; + float left = std::numeric_limits<float>::max(); sf::Text prev; for (const auto &str : strs) { sf::Text text = write_text(str.msg.c_str(), str.textSize, LINE_HEIGHT, font, |