diff options
author | Diego Martínez <kaeza@users.noreply.github.com> | 2017-03-28 16:55:39 -0300 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-03-28 21:55:39 +0200 |
commit | 81c3dc32a8e48aee076e4b28cae0037a4ae254d9 (patch) | |
tree | dd81cf0d1a7d2de99528175d1aae4c141d13b14e /doc | |
parent | 1b299b40391b4ea0fe058b63aad14e3360e917d9 (diff) | |
download | minetest-81c3dc32a8e48aee076e4b28cae0037a4ae254d9.tar.gz minetest-81c3dc32a8e48aee076e4b28cae0037a4ae254d9.tar.bz2 minetest-81c3dc32a8e48aee076e4b28cae0037a4ae254d9.zip |
Add functions to strip color information. (#5472)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/client_lua_api.md | 6 | ||||
-rw-r--r-- | doc/lua_api.txt | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/doc/client_lua_api.md b/doc/client_lua_api.md index f7a1094f0..d5ccef5d3 100644 --- a/doc/client_lua_api.md +++ b/doc/client_lua_api.md @@ -818,6 +818,12 @@ The following functions provide escape sequences: * `color` is a ColorString * The escape sequence sets the background of the whole text element to `color`. Only defined for item descriptions and tooltips. +* `color.strip_foreground_colors(str)` + * Removes foreground colors added by `get_color_escape_sequence`. +* `color.strip_background_colors(str)` + * Removes background colors added by `get_background_escape_sequence`. +* `color.strip_colors(str)` + * Removes all color escape sequences. `ColorString` ------------- diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 2ac8f1077..72599cb7c 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -1872,6 +1872,12 @@ The following functions provide escape sequences: * `color` is a ColorString * The escape sequence sets the background of the whole text element to `color`. Only defined for item descriptions and tooltips. +* `color.strip_foreground_colors(str)` + * Removes foreground colors added by `get_color_escape_sequence`. +* `color.strip_background_colors(str)` + * Removes background colors added by `get_background_escape_sequence`. +* `color.strip_colors(str)` + * Removes all color escape sequences. Spatial Vectors --------------- |