summaryrefslogtreecommitdiff
path: root/src/guiFormSpecMenu.h
diff options
context:
space:
mode:
authorEkdohibs <nathanael.courant@laposte.net>2016-05-31 17:30:11 +0200
committerEkdohibs <nathanael.courant@laposte.net>2016-05-31 17:34:29 +0200
commit14ef2b445adcec770defe1abf83af9d22ccf39d8 (patch)
treebe434ea35d6134f4e7b90a74283a21815ed079ee /src/guiFormSpecMenu.h
parent1d40385d4aacf0cbea4b19ff06940e8c9bebaf47 (diff)
downloadminetest-14ef2b445adcec770defe1abf83af9d22ccf39d8.tar.gz
minetest-14ef2b445adcec770defe1abf83af9d22ccf39d8.tar.bz2
minetest-14ef2b445adcec770defe1abf83af9d22ccf39d8.zip
Add colored text (not only colored chat).
Add documentation, move files to a proper place and avoid memory leaks. Make it work with most kind of texts, and allow backgrounds too.
Diffstat (limited to 'src/guiFormSpecMenu.h')
-rw-r--r--src/guiFormSpecMenu.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/guiFormSpecMenu.h b/src/guiFormSpecMenu.h
index ef230c81c..4122b1f56 100644
--- a/src/guiFormSpecMenu.h
+++ b/src/guiFormSpecMenu.h
@@ -30,6 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "guiTable.h"
#include "network/networkprotocol.h"
#include "util/string.h"
+#include "util/enriched_string.h"
class IGameDef;
class InventoryManager;
@@ -202,7 +203,8 @@ class GUIFormSpecMenu : public GUIModalMenu
fname(name),
fid(id)
{
- flabel = unescape_enriched(label);
+ //flabel = unescape_enriched(label);
+ flabel = label;
fdefault = unescape_enriched(default_text);
send = false;
ftype = f_Unknown;
@@ -239,7 +241,8 @@ class GUIFormSpecMenu : public GUIModalMenu
bgcolor(a_bgcolor),
color(a_color)
{
- tooltip = unescape_enriched(utf8_to_wide(a_tooltip));
+ //tooltip = unescape_enriched(utf8_to_wide(a_tooltip));
+ tooltip = utf8_to_wide(a_tooltip);
}
std::wstring tooltip;
irr::video::SColor bgcolor;
@@ -256,7 +259,8 @@ class GUIFormSpecMenu : public GUIModalMenu
rect(a_rect),
parent_button(NULL)
{
- text = unescape_enriched(a_text);
+ //text = unescape_enriched(a_text);
+ text = a_text;
}
StaticTextSpec(const std::wstring &a_text,
const core::rect<s32> &a_rect,
@@ -264,7 +268,8 @@ class GUIFormSpecMenu : public GUIModalMenu
rect(a_rect),
parent_button(a_parent_button)
{
- text = unescape_enriched(a_text);
+ //text = unescape_enriched(a_text);
+ text = a_text;
}
std::wstring text;
core::rect<s32> rect;