QTfrontend/gameuiconfig.cpp
changeset 2377 f3fab2b09e0c
parent 2334 3cf9290a518e
child 2392 a55dbef5cf31
equal deleted inserted replaced
2376:ece7b87f1334 2377:f3fab2b09e0c
    56 		netNick = QInputDialog::getText(Form,
    56 		netNick = QInputDialog::getText(Form,
    57 				QObject::tr("Nickname"),
    57 				QObject::tr("Nickname"),
    58 				QObject::tr("Please, enter your nickname"),
    58 				QObject::tr("Please, enter your nickname"),
    59 				QLineEdit::Normal,
    59 				QLineEdit::Normal,
    60 				QDir::home().dirName());
    60 				QDir::home().dirName());
    61 	
    61 
    62 	Form->ui.pageOptions->editNetNick->setText(netNick);
    62 	Form->ui.pageOptions->editNetNick->setText(netNick);
    63 
    63 
    64 	delete netHost;
    64 	delete netHost;
    65 	netHost = new QString(value("net/ip", "").toString());
    65 	netHost = new QString(value("net/ip", "").toString());
    66 	netPort = value("net/port", 46631).toUInt();
    66 	netPort = value("net/port", 46631).toUInt();
    71 	Form->ui.pageOptions->CBShowFPS->setChecked(value("fps/show", false).toBool());
    71 	Form->ui.pageOptions->CBShowFPS->setChecked(value("fps/show", false).toBool());
    72 	Form->ui.pageOptions->fpsedit->setValue(value("fps/interval", 27).toUInt());
    72 	Form->ui.pageOptions->fpsedit->setValue(value("fps/interval", 27).toUInt());
    73 
    73 
    74 	Form->ui.pageOptions->CBAltDamage->setChecked(value("misc/altdamage", false).toBool());
    74 	Form->ui.pageOptions->CBAltDamage->setChecked(value("misc/altdamage", false).toBool());
    75 	Form->ui.pageOptions->CBNameWithDate->setChecked(value("misc/appendTimeToRecords", false).toBool());
    75 	Form->ui.pageOptions->CBNameWithDate->setChecked(value("misc/appendTimeToRecords", false).toBool());
    76     
    76 
    77 #ifdef __APPLE__
    77 #ifdef __APPLE__
    78     //autoupdate
    78     //autoupdate
    79     Form->ui.pageOptions->CBAutoUpdate->setChecked(value("misc/autoUpdate", true).toBool());
    79     Form->ui.pageOptions->CBAutoUpdate->setChecked(value("misc/autoUpdate", true).toBool());
    80 #endif
    80 #endif
    81     
    81 
    82 	depth = QApplication::desktop()->depth();
    82 	depth = QApplication::desktop()->depth();
    83 	if (depth < 16) depth = 16;
    83 	if (depth < 16) depth = 16;
    84 	else if (depth > 16) depth = 32;
    84 	else if (depth > 16) depth = 32;
    85 }
    85 }
    86 
    86 
   132 	setValue("fps/show", isShowFPSEnabled());
   132 	setValue("fps/show", isShowFPSEnabled());
   133 	setValue("fps/interval", Form->ui.pageOptions->fpsedit->value());
   133 	setValue("fps/interval", Form->ui.pageOptions->fpsedit->value());
   134 
   134 
   135 	setValue("misc/altdamage", isAltDamageEnabled());
   135 	setValue("misc/altdamage", isAltDamageEnabled());
   136 	setValue("misc/appendTimeToRecords", appendDateTimeToRecordName());
   136 	setValue("misc/appendTimeToRecords", appendDateTimeToRecordName());
   137     
   137 
   138 #ifdef __APPLE__
   138 #ifdef __APPLE__
   139     //autoupdate
   139     //autoupdate
   140     setValue("misc/autoUpdate", isAutoUpdateEnabled());
   140     setValue("misc/autoUpdate", isAutoUpdateEnabled());
   141 #endif 
   141 #endif
   142 }
   142 }
   143 
   143 
   144 QRect GameUIConfig::vid_Resolution()
   144 QRect GameUIConfig::vid_Resolution()
   145 {
   145 {
   146 	QRect result(0, 0, 640, 480);
   146 	QRect result(0, 0, 640, 480);