1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-11-21 08:55:21 +01:00

Add inventory image animation API (#16538)

This commit is contained in:
cx384
2025-10-26 18:48:53 +01:00
committed by GitHub
parent dde463635e
commit 93ccb4b355
23 changed files with 606 additions and 227 deletions

View File

@@ -500,6 +500,16 @@ inline void str_formspec_escape(std::string &str)
str_replace(str, "$", "\\$");
}
/**
* Escapes characters to nest texture modifiers
*/
inline void str_texture_modifiers_escape(std::string &str)
{
str_replace(str, "\\", "\\\\");
str_replace(str, "^", "\\^");
str_replace(str, ":", "\\:");
}
/**
* Replace all occurrences of the character \p from in \p str with \p to.
*