00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include <client/ClientParams.h>
00022
00023 ClientParams *ClientParams::instance_ = 0;
00024
00025 ClientParams *ClientParams::instance()
00026 {
00027 if (!instance_)
00028 {
00029 instance_ = new ClientParams;
00030 }
00031
00032 return instance_;
00033 }
00034
00035 ClientParams::ClientParams() :
00036 connect_(options_, "connect",
00037 "The name of the server to connect to, starts a NET/LAN client", 0, ""),
00038 client_(options_, "startclient",
00039 "Starts a scorched 3d client, requires the name of the client settings file e.g. data/singlecustom.xml", 0, ""),
00040 startcustom_(options_, "startcustom",
00041 "Starts a scorched 3d client, Uses the last custom game made", 0, false),
00042 save_(options_, "loadsave",
00043 "Continues a scorched 3d client game, requires the name of the saved game.", 0, ""),
00044 exittime_(options_, "exittime",
00045 "The time after which the client will exit", 0, 0),
00046 username_(options_, "username",
00047 "The username of the NET/LAN server", 0, ""),
00048 password_(options_, "password",
00049 "The password of the NET/LAN server", 0, ""),
00050 nonParam_(nonParamOptions_, "launch file",
00051 ".3dl scorched3d online gaming launching config", 0, "")
00052 {
00053
00054 }
00055
00056 ClientParams::~ClientParams()
00057 {
00058
00059 }
00060
00061 void ClientParams::reset()
00062 {
00063 connect_.setValueFromString(connect_.getDefaultValueAsString());
00064 client_.setValueFromString(client_.getDefaultValueAsString());
00065 startcustom_.setValueFromString(startcustom_.getDefaultValueAsString());
00066 save_.setValueFromString(save_.getDefaultValueAsString());
00067 username_.setValueFromString(username_.getDefaultValueAsString());
00068 password_.setValueFromString(password_.getDefaultValueAsString());
00069 exittime_.setValueFromString(exittime_.getDefaultValueAsString());
00070 }