| 828 | //============================================================================// |
| 829 | |
| 830 | int HubLink::GetStringWidth(lua_State* L) { |
| 831 | if (!controlPanel) { |
| 832 | return 0; |
| 833 | } |
| 834 | const char* text = luaL_checkstring(L, 1); |
| 835 | FontManager& fm = FontManager::instance(); |
| 836 | const int faceID = controlPanel->getFontFace()->getFMFace(); |
| 837 | const float fontSize = controlPanel->getFontSize(); |
| 838 | lua_pushfloat(L, fm.getStringWidth(faceID, fontSize, text)); |
| 839 | return 1; |
| 840 | } |
| 841 | |
| 842 | |
| 843 | int HubLink::GetConsoleWidth(lua_State* L) { |
nothing calls this directly
no test coverage detected