static bool init = true;
if (init)
{
init = false;
ImGui::CreateContext();
ImGuiIO& io = ImGui::GetIO();
ImGui_ImplWin32_Init(FindWindowA("Valve001", nullptr));
ImGui_ImplDX9_Init(device);
ImFontConfig m_config;
m_config.OversampleH = 3;
m_config.OversampleV = 1;
m_config.PixelSnapH = false;
static const ImWchar ranges[] =
{
0x0020, 0x00FF,
0x0400, 0x044F,
0
};
io.Fonts->AddFontFromMemoryTTF((void*)verdanafont, sizeof(verdanafont), 14, &m_config, ranges);
espfont = io.Fonts->AddFontFromMemoryTTF((void*)verdanafont, sizeof(verdanafont), 11, &m_config, ranges);
espsmallfont = io.Fonts->AddFontFromMemoryTTF((void*)smallestpixelfont, sizeof(smallestpixelfont), 10, &m_config, ranges);
ImGui_ImplDX9_CreateDeviceObjects();
}