| 59 | void createCVar(const char* name, const char* helpString, u32 flags, CVarType type, CValue value, u32 maxLen = 0); |
| 60 | |
| 61 | bool init() |
| 62 | { |
| 63 | char fontpath[TFE_MAX_PATH]; |
| 64 | s32 scale = TFE_Ui::getUiScale(); |
| 65 | s_fontSize = (scale * 20) / 100; |
| 66 | |
| 67 | sprintf(fontpath, "Fonts/DroidSansMono.ttf"); |
| 68 | TFE_Paths::mapSystemPath(fontpath); |
| 69 | |
| 70 | ImGuiIO& io = ImGui::GetIO(); |
| 71 | s_consoleFont = io.Fonts->AddFontFromFileTTF(fontpath, (f32)s_fontSize); |
| 72 | s_height = 0.0f; |
| 73 | s_anim = 0.0f; |
| 74 | s_historyIndex = -1; |
| 75 | s_historyScroll = 0; |
| 76 | s_commandHistory.clear(); |
| 77 | |
| 78 | registerDefaultCommands(); |
| 79 | return true; |
| 80 | } |
| 81 | |
| 82 | void destroy() |
| 83 | { |
nothing calls this directly
no test coverage detected