mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 12:47:58 +03:00
ui/label: allow null text
This commit is contained in:
parent
e7fb4616e8
commit
34a93057c2
1 changed files with 4 additions and 1 deletions
|
@ -65,8 +65,11 @@ void UI_Label(const char *const text)
|
|||
UI_LabelEx(text, m_DefaultSettings);
|
||||
}
|
||||
|
||||
void UI_LabelEx(const char *const text, const UI_LABEL_SETTINGS settings)
|
||||
void UI_LabelEx(const char *text, const UI_LABEL_SETTINGS settings)
|
||||
{
|
||||
if (text == nullptr) {
|
||||
text = "(null)"; // quality of life for UI development
|
||||
}
|
||||
UI_NODE *const node =
|
||||
UI_AllocNode(&m_Ops, sizeof(M_DATA) + strlen(text) + 1);
|
||||
M_DATA *const data = node->data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue