equal
deleted
inserted
replaced
36 Form->resize(value("window/width", 640).toUInt(), value("window/height", 450).toUInt()); |
36 Form->resize(value("window/width", 640).toUInt(), value("window/height", 450).toUInt()); |
37 |
37 |
38 int t = Form->ui.pageOptions->CBResolution->findText(value("video/resolution").toString()); |
38 int t = Form->ui.pageOptions->CBResolution->findText(value("video/resolution").toString()); |
39 Form->ui.pageOptions->CBResolution->setCurrentIndex((t < 0) ? 0 : t); |
39 Form->ui.pageOptions->CBResolution->setCurrentIndex((t < 0) ? 0 : t); |
40 Form->ui.pageOptions->CBFullscreen->setChecked(value("video/fullscreen", false).toBool()); |
40 Form->ui.pageOptions->CBFullscreen->setChecked(value("video/fullscreen", false).toBool()); |
|
41 bool ffscr=value("video/frontendfullscreen", false).toBool(); |
|
42 Form->ui.pageOptions->CBFrontendFullscreen->setChecked(ffscr); |
41 |
43 |
42 Form->ui.pageOptions->CBEnableSound->setChecked(value("audio/sound", true).toBool()); |
44 Form->ui.pageOptions->CBEnableSound->setChecked(value("audio/sound", true).toBool()); |
43 Form->ui.pageOptions->CBEnableMusic->setChecked(value("audio/music", true).toBool()); |
45 Form->ui.pageOptions->CBEnableMusic->setChecked(value("audio/music", true).toBool()); |
44 |
46 |
45 Form->ui.pageOptions->editNetNick->setText(value("net/nick", QLineEdit::tr("unnamed")).toString()); |
47 Form->ui.pageOptions->editNetNick->setText(value("net/nick", QLineEdit::tr("unnamed")).toString()); |
74 |
76 |
75 void GameUIConfig::SaveOptions() |
77 void GameUIConfig::SaveOptions() |
76 { |
78 { |
77 setValue("video/resolution", Form->ui.pageOptions->CBResolution->currentText()); |
79 setValue("video/resolution", Form->ui.pageOptions->CBResolution->currentText()); |
78 setValue("video/fullscreen", vid_Fullscreen()); |
80 setValue("video/fullscreen", vid_Fullscreen()); |
|
81 bool ffscr=isFrontendFullscreen(); |
|
82 setValue("video/frontendfullscreen", ffscr); |
|
83 emit frontendFullscreen(ffscr); |
79 |
84 |
80 setValue("audio/sound", isSoundEnabled()); |
85 setValue("audio/sound", isSoundEnabled()); |
81 setValue("audio/music", isMusicEnabled()); |
86 setValue("audio/music", isMusicEnabled()); |
82 |
87 |
83 setValue("net/nick", netNick()); |
88 setValue("net/nick", netNick()); |
110 bool GameUIConfig::vid_Fullscreen() |
115 bool GameUIConfig::vid_Fullscreen() |
111 { |
116 { |
112 return Form->ui.pageOptions->CBFullscreen->isChecked(); |
117 return Form->ui.pageOptions->CBFullscreen->isChecked(); |
113 } |
118 } |
114 |
119 |
|
120 bool GameUIConfig::isFrontendFullscreen() const |
|
121 { |
|
122 return Form->ui.pageOptions->CBFrontendFullscreen->isChecked(); |
|
123 } |
|
124 |
115 bool GameUIConfig::isSoundEnabled() |
125 bool GameUIConfig::isSoundEnabled() |
116 { |
126 { |
117 return Form->ui.pageOptions->CBEnableSound->isChecked(); |
127 return Form->ui.pageOptions->CBEnableSound->isChecked(); |
118 } |
128 } |
119 |
129 |