diff options
author | Stephen Enders <84310577289916ceefd4132143fb36b63a5f0c71> | 2022-06-22 01:28:23 -0400 |
---|---|---|
committer | Steph Enders <smenders@gmail.com> | 2022-06-21 22:28:30 -0400 |
commit | a878cdc42bf41355758dabd353d521d4b12e73fc (patch) | |
tree | 312acaf0cd8724b42e692fc26945f2992467ed19 /src/MessageBox.h | |
parent | 09615be926efb7302bc348aa66feccb694b23ba8 (diff) |
Add windows support
Create res.h for handling resource loading
Update CMakeLists.txt to ensure compilation is passed properly
Fix unsupported functions (<limits>) on Windows
Use to_str(path) to get path as c_str() returns wchar_t* on windows
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, |