mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-08 20:07:11 +00:00
CGE2: Use Engine save/load dialog methods
This commit is contained in:
parent
cc689fd16a
commit
b7797bc475
@ -1,2 +0,0 @@
|
||||
engines/cge2/detection.cpp
|
||||
engines/cge2/events.cpp
|
@ -60,25 +60,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