mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 09:08:22 -05:00
Fixed drawText() to handle NULL or empty string.
This commit is contained in:
parent
52afe0f433
commit
1391939151
1 changed files with 6 additions and 0 deletions
|
@ -1635,6 +1635,12 @@ struct Imgui
|
||||||
|
|
||||||
void drawText(float _x, float _y, const char* _text, ImguiTextAlign::Enum _align, uint32_t _abgr)
|
void drawText(float _x, float _y, const char* _text, ImguiTextAlign::Enum _align, uint32_t _abgr)
|
||||||
{
|
{
|
||||||
|
if (NULL == _text
|
||||||
|
|| '\0' == _text[0])
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
#if USE_NANOVG_FONT
|
#if USE_NANOVG_FONT
|
||||||
static uint32_t textAlign[ImguiTextAlign::Count] =
|
static uint32_t textAlign[ImguiTextAlign::Count] =
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue