|
@@ -11,14 +11,14 @@
|
11
|
11
|
#include "UI.h"
|
12
|
12
|
#include "system/FontImGui.h"
|
13
|
13
|
|
14
|
|
-#define SCALE_CALC 1.0f
|
15
|
|
-#define SCALE_DRAW 20.0f
|
|
14
|
+#define SCALE_CALC 30.0f
|
|
15
|
+#define SCALE_DRAW SCALE_CALC
|
16
|
16
|
|
17
|
17
|
unsigned int FontImGui::widthText(float scale, std::string s) {
|
18
|
18
|
ImGuiIO& io = ImGui::GetIO();
|
19
|
19
|
ImVec2 size = io.Font->CalcTextSizeA(scale * SCALE_CALC, FLT_MAX, io.DisplaySize.y, s.c_str(),
|
20
|
20
|
s.c_str() + s.length());
|
21
|
|
- return size.y;
|
|
21
|
+ return size.x;
|
22
|
22
|
}
|
23
|
23
|
|
24
|
24
|
void FontImGui::drawText(unsigned int x, unsigned int y, float scale,
|
|
@@ -39,7 +39,7 @@ unsigned int FontImGui::heightText(float scale, unsigned int maxWidth, std::stri
|
39
|
39
|
ImGuiIO& io = ImGui::GetIO();
|
40
|
40
|
ImVec2 size = io.Font->CalcTextSizeA(scale * SCALE_CALC, FLT_MAX, maxWidth, s.c_str(),
|
41
|
41
|
s.c_str() + s.length());
|
42
|
|
- return size.x;
|
|
42
|
+ return size.y;
|
43
|
43
|
}
|
44
|
44
|
|
45
|
45
|
void FontImGui::drawTextWrapped(unsigned int x, unsigned int y, float scale,
|