Commit 14abe97d authored by Philip Trettner's avatar Philip Trettner

Added refresh fonts function

parent ce9ab11f
Pipeline #1810 skipped
......@@ -60,3 +60,7 @@ if (UNIX)
)
endif()
endif()
if (WIN32)
target_compile_definitions(AntTweakBar PUBLIC TW_STATIC )
endif()
......@@ -278,6 +278,7 @@ TW_API const char * TW_CALL TwGetLastError();
typedef void (TW_CALL * TwErrorHandler)(const char *errorMessage);
TW_API void TW_CALL TwHandleErrors(TwErrorHandler errorHandler);
TW_API int TW_CALL TwRefreshFonts();
// ----------------------------------------------------------------------------
// Helper functions to translate events from some common window management
......
......@@ -1942,6 +1942,20 @@ int ANT_CALL TwSetLastError(const char *_StaticErrorMessage)
return 0;
}
/// abeler
int ANT_CALL TwRefreshFonts()
{
TwGenerateDefaultFonts(g_FontScaling);
g_TwMgr->m_CurrentFont = g_DefaultNormalFont;
for(TwBar* bar : g_TwMgr->m_Bars)
bar->m_Font = g_DefaultNormalFont;
return 0;
}
// ---------------------------------------------------------------------------
int ANT_CALL TwTerminate()
......
......@@ -358,6 +358,8 @@ const TwType TW_TYPE_STDSTRING_VS2010 = TwType(0x2ffe0000);
extern "C" int ANT_CALL TwSetLastError(const char *_StaticErrorMessage);
extern "C" int ANT_CALL TwRefreshFonts();
//const TwGraphAPI TW_OPENGL_CORE = (TwGraphAPI)5; // WIP (note: OpenGL Core Profil requires OpenGL 3.2 or later)
// Clipping helper
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment