library: Add function to reset rich text system

This commit is contained in:
Antonio Niño Díaz 2024-03-07 01:26:15 +00:00
parent 15ce18b74c
commit 521012d4d1
2 changed files with 9 additions and 0 deletions

View File

@ -44,6 +44,9 @@ void NE_RichTextPrioritySet(int priority);
/// Set to 0 the priority of rich text drawn after this function call.
void NE_RichTextPriorityReset(void);
/// Clears all rich text font slots.
void NE_RichTextResetSystem(void);
/// Initialize a rich text slot.
///
/// @param slot The slot to initialize (from 0 to NE_MAX_RICH_TEXT_FONTS).

View File

@ -85,6 +85,12 @@ int NE_RichTextEnd(u32 slot)
return 1;
}
void NE_RichTextResetSystem(void)
{
for (int i = 0; i < NE_MAX_RICH_TEXT_FONTS; i++)
NE_RichTextEnd(i);
}
int NE_RichTextMetadataLoadFAT(u32 slot, const char *path)
{
NE_AssertPointer(path, "NULL path pointer");