aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/gui_v2.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2008-05-05 17:18:11 +0000
committerJohannes Schickel2008-05-05 17:18:11 +0000
commitf42d222069d7ae130c85201e895e7f23d27c88d0 (patch)
tree6eab38aab26fb2fff6e92cd3bafdb579e7d6c0e0 /engines/kyra/gui_v2.cpp
parent81cfd2a716ff42d5425a456faff9068c92130969 (diff)
downloadscummvm-rg350-f42d222069d7ae130c85201e895e7f23d27c88d0.tar.gz
scummvm-rg350-f42d222069d7ae130c85201e895e7f23d27c88d0.tar.bz2
scummvm-rg350-f42d222069d7ae130c85201e895e7f23d27c88d0.zip
Got rid of some code duplication.
svn-id: r31880
Diffstat (limited to 'engines/kyra/gui_v2.cpp')
-rw-r--r--engines/kyra/gui_v2.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/engines/kyra/gui_v2.cpp b/engines/kyra/gui_v2.cpp
index dd6a774ca0..4d78c8bb6f 100644
--- a/engines/kyra/gui_v2.cpp
+++ b/engines/kyra/gui_v2.cpp
@@ -518,6 +518,38 @@ int GUI_v2::quitOptionsMenu(Button *caller) {
return 0;
}
+int GUI_v2::toggleWalkspeed(Button *caller) {
+ updateMenuButton(caller);
+ if (_vm->_configWalkspeed == 5)
+ _vm->_configWalkspeed = 3;
+ else
+ _vm->_configWalkspeed = 5;
+ _vm->setWalkspeed(_vm->_configWalkspeed);
+ setupOptionsButtons();
+ renewHighlight(_gameOptions);
+ return 0;
+}
+
+int GUI_v2::toggleText(Button *caller) {
+ updateMenuButton(caller);
+
+ if (_vm->textEnabled()) {
+ if (_vm->speechEnabled())
+ _vm->_configVoice = 1;
+ else
+ _vm->_configVoice = 3;
+ } else {
+ if (_vm->speechEnabled())
+ _vm->_configVoice = 2;
+ else
+ _vm->_configVoice = 0;
+ }
+
+ setupOptionsButtons();
+ renewHighlight(_gameOptions);
+ return 0;
+}
+
int GUI_v2::clickLoadSlot(Button *caller) {
updateMenuButton(caller);