Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Philip Trettner
AntTweakBar
Commits
14abe97d
Commit
14abe97d
authored
May 13, 2016
by
Philip Trettner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added refresh fonts function
parent
ce9ab11f
Pipeline
#1810
skipped
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
0 deletions
+21
-0
CMakeLists.txt
CMakeLists.txt
+4
-0
include/AntTweakBar.h
include/AntTweakBar.h
+1
-0
src/TwMgr.cpp
src/TwMgr.cpp
+14
-0
src/TwMgr.h
src/TwMgr.h
+2
-0
No files found.
CMakeLists.txt
View file @
14abe97d
...
...
@@ -60,3 +60,7 @@ if (UNIX)
)
endif
()
endif
()
if
(
WIN32
)
target_compile_definitions
(
AntTweakBar PUBLIC TW_STATIC
)
endif
()
include/AntTweakBar.h
View file @
14abe97d
...
...
@@ -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
...
...
src/TwMgr.cpp
View file @
14abe97d
...
...
@@ -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
()
...
...
src/TwMgr.h
View file @
14abe97d
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment