summaryrefslogtreecommitdiff
path: root/src/guiFormSpecMenu.h
diff options
context:
space:
mode:
authorrubenwardy <rubenwardy@gmail.com>2016-08-07 16:22:50 +0100
committerrubenwardy <rubenwardy@gmail.com>2016-08-27 13:05:01 +0100
commite10fee00011f6c1ef8ee5b884adb11013954a1c9 (patch)
treeec90d06054beba47c2270ff722da816ccd09a28a /src/guiFormSpecMenu.h
parent4330c63ea40a75d4b8fcf71dc749fed714b22a44 (diff)
downloadminetest-e10fee00011f6c1ef8ee5b884adb11013954a1c9.tar.gz
minetest-e10fee00011f6c1ef8ee5b884adb11013954a1c9.tar.bz2
minetest-e10fee00011f6c1ef8ee5b884adb11013954a1c9.zip
Allow fields to choose whether they close on enter press
Diffstat (limited to 'src/guiFormSpecMenu.h')
-rw-r--r--src/guiFormSpecMenu.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/guiFormSpecMenu.h b/src/guiFormSpecMenu.h
index 7b809df71..d06aa6cf5 100644
--- a/src/guiFormSpecMenu.h
+++ b/src/guiFormSpecMenu.h
@@ -202,20 +202,22 @@ class GUIFormSpecMenu : public GUIModalMenu
FieldSpec(const std::string &name, const std::wstring &label,
const std::wstring &default_text, int id) :
fname(name),
- fid(id)
+ flabel(label),
+ fid(id),
+ send(false),
+ close_on_enter(false),
+ ftype(f_Unknown),
+ is_exit(false)
{
//flabel = unescape_enriched(label);
- flabel = label;
fdefault = unescape_enriched(default_text);
- send = false;
- ftype = f_Unknown;
- is_exit = false;
}
std::string fname;
std::wstring flabel;
std::wstring fdefault;
int fid;
bool send;
+ bool close_on_enter; // used by text fields
FormspecFieldType ftype;
bool is_exit;
core::rect<s32> rect;