From a878cdc42bf41355758dabd353d521d4b12e73fc Mon Sep 17 00:00:00 2001 From: Stephen Enders <84310577289916ceefd4132143fb36b63a5f0c71> Date: Wed, 22 Jun 2022 01:28:23 -0400 Subject: Add windows support Create res.h for handling resource loading Update CMakeLists.txt to ensure compilation is passed properly Fix unsupported functions () on Windows Use to_str(path) to get path as c_str() returns wchar_t* on windows --- src/MessageBox.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/MessageBox.h') 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 +#include const int LARGE_TEXT = 54; const int MEDIUM_TEXT = 36; @@ -57,7 +58,7 @@ inline MessageBox initializeMessageBox(const std::vector &strs, sf::RectangleShape box; float width = 0.f; float height = 0.f; - float left = MAXFLOAT; + float left = std::numeric_limits::max(); sf::Text prev; for (const auto &str : strs) { sf::Text text = write_text(str.msg.c_str(), str.textSize, LINE_HEIGHT, font, -- cgit v1.2.3-54-g00ecf