| 3 | #include "text.h" |
| 4 | |
| 5 | text::text(const char* inputString, int x, int y, float newSize, int r, int g, int b, int a){ |
| 6 | outputString = inputString; |
| 7 | |
| 8 | |
| 9 | //turn coordinates and color into openGL format |
| 10 | float windowWidthHalf = 2560.0f * 0.5f; |
| 11 | float windowHeightHalf = 1440.0f * 0.5f; |
| 12 | |
| 13 | locationX = (static_cast<float>(x) - windowWidthHalf) / windowWidthHalf; |
| 14 | locationY = -((static_cast<float>(y) - windowHeightHalf) / windowHeightHalf); |
| 15 | size = newSize; |
| 16 | |
| 17 | c.r = static_cast<float>(r) / 255.0f; |
| 18 | c.g = static_cast<float>(g) / 255.0f; |
| 19 | c.b = static_cast<float>(b) / 255.0f; |
| 20 | c.a = static_cast<float>(a) / 255.0f; |
| 21 | return; |
| 22 | } |
| 23 | |
| 24 | const char* text::getText(){ |
| 25 | return outputString.c_str(); |
nothing calls this directly
no outgoing calls
no test coverage detected