aboutsummaryrefslogtreecommitdiff
path: root/src/utility.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2010-12-23 17:09:49 +0200
committerPerttu Ahola <celeron55@gmail.com>2010-12-23 17:09:49 +0200
commit7e490e72139fbfe12535c71b27228dd82ef0250b (patch)
tree0ffc37e46140755192e04b88d82ae4daeb290b41 /src/utility.h
parent2816d8f638de2f7f06ca1086d1c8846e8971f421 (diff)
downloaddragonfireclient-7e490e72139fbfe12535c71b27228dd82ef0250b.tar.xz
work-in-progress gui system updating + some settings system updating
Diffstat (limited to 'src/utility.h')
-rw-r--r--src/utility.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/utility.h b/src/utility.h
index 4e2e132e9..bcdcd1550 100644
--- a/src/utility.h
+++ b/src/utility.h
@@ -1009,10 +1009,11 @@ public:
// Asks if empty
bool getBoolAsk(std::string name, std::string question, bool def)
{
- std::string s = get(name);
- if(s != "")
- return is_yes(s);
+ // If it is in settings
+ if(m_settings.find(name))
+ return getBool(name);
+ std::string s;
char templine[10];
std::cout<<question<<" [y/N]: ";
std::cin.getline(templine, 10);
@@ -1039,10 +1040,11 @@ public:
u16 getU16Ask(std::string name, std::string question, u16 def)
{
- std::string s = get(name);
- if(s != "")
- return stoi(s, 0, 65535);
+ // If it is in settings
+ if(m_settings.find(name))
+ return getU16(name);
+ std::string s;
char templine[10];
std::cout<<question<<" ["<<def<<"]: ";
std::cin.getline(templine, 10);