diff options
author | PilzAdam <pilzadam@minetest.net> | 2013-08-31 21:07:53 +0200 |
---|---|---|
committer | PilzAdam <pilzadam@minetest.net> | 2013-08-31 21:07:53 +0200 |
commit | 71a6ffa76203a13b6cb0ec88b7ee57e04f809148 (patch) | |
tree | 7000a5df05347780949365b2509b0cc75bd75986 | |
parent | 5d0f19fd7db83666bef84c2fb6a641ff76176468 (diff) | |
download | minetest-71a6ffa76203a13b6cb0ec88b7ee57e04f809148.tar.gz minetest-71a6ffa76203a13b6cb0ec88b7ee57e04f809148.tar.bz2 minetest-71a6ffa76203a13b6cb0ec88b7ee57e04f809148.zip |
Use wstring for vertlabels
-rw-r--r-- | src/guiFormSpecMenu.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp index 02b114f43..b162e8e99 100644 --- a/src/guiFormSpecMenu.cpp +++ b/src/guiFormSpecMenu.cpp @@ -1069,7 +1069,7 @@ void GUIFormSpecMenu::parseVertLabel(parserData* data,std::string element) { if (parts.size() == 2) { std::vector<std::string> v_pos = split(parts[0],','); - std::string text = parts[1]; + std::wstring text = narrow_to_wide(unescape_string(parts[1])); MY_CHECKPOS("vertlabel",1); @@ -1082,17 +1082,16 @@ void GUIFormSpecMenu::parseVertLabel(parserData* data,std::string element) { if(data->bp_set != 2) errorstream<<"WARNING: invalid use of label without a size[] element"<<std::endl; - text = unescape_string(text); - std::string label = ""; + std::wstring label = L""; for (unsigned int i=0; i < text.length(); i++) { - label += text.c_str()[i]; - label += "\n"; + label += text[i]; + label += L"\n"; } FieldSpec spec = FieldSpec( L"", - narrow_to_wide(label.c_str()), + label, L"", 258+m_fields.size() ); |