mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-23 19:16:21 +00:00
CGE: Use Engine save/load dialog methods
This commit is contained in:
parent
6850c92617
commit
cc689fd16a
@ -1,3 +0,0 @@
|
||||
engines/cge/detection.cpp
|
||||
engines/cge/events.cpp
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include "gui/saveload.h"
|
||||
#include "common/config-manager.h"
|
||||
#include "common/events.h"
|
||||
#include "common/translation.h"
|
||||
#include "engines/advancedDetector.h"
|
||||
#include "cge/events.h"
|
||||
#include "cge/events.h"
|
||||
@ -68,25 +67,10 @@ bool Keyboard::getKey(Common::Event &event) {
|
||||
_vm->_commandHandler->addCommand(kCmdInf, 1, kShowScummVMVersion + i, NULL);
|
||||
return false;
|
||||
case Common::KEYCODE_F5:
|
||||
if (_vm->canSaveGameStateCurrently()) {
|
||||
GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true);
|
||||
int16 savegameId = dialog->runModalWithCurrentTarget();
|
||||
Common::String savegameDescription = dialog->getResultString();
|
||||
delete dialog;
|
||||
|
||||
if (savegameId != -1)
|
||||
_vm->saveGameState(savegameId, savegameDescription);
|
||||
}
|
||||
_vm->saveGameDialog();
|
||||
return false;
|
||||
case Common::KEYCODE_F7:
|
||||
if (_vm->canLoadGameStateCurrently()) {
|
||||
GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false);
|
||||
int16 savegameId = dialog->runModalWithCurrentTarget();
|
||||
delete dialog;
|
||||
|
||||
if (savegameId != -1)
|
||||
_vm->loadGameState(savegameId);
|
||||
}
|
||||
_vm->loadGameDialog();
|
||||
return false;
|
||||
case Common::KEYCODE_d:
|
||||
if (event.kbd.flags & Common::KBD_CTRL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user