diff options
author | Paul Gilbert | 2016-08-28 19:10:29 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-08-28 19:10:29 -0400 |
commit | f114f9e8c5c9e663ef1eea268dbc2d2287c6b646 (patch) | |
tree | 646d785a37d0f5ef5f4f39539c240e8035c0c752 /engines/titanic/pet_control/pet_save.cpp | |
parent | 01327b540de39eb99c854dd4a61080935c6ba77f (diff) | |
download | scummvm-rg350-f114f9e8c5c9e663ef1eea268dbc2d2287c6b646.tar.gz scummvm-rg350-f114f9e8c5c9e663ef1eea268dbc2d2287c6b646.tar.bz2 scummvm-rg350-f114f9e8c5c9e663ef1eea268dbc2d2287c6b646.zip |
TITANIC: Implemented some stubbed methods
Diffstat (limited to 'engines/titanic/pet_control/pet_save.cpp')
-rw-r--r-- | engines/titanic/pet_control/pet_save.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/engines/titanic/pet_control/pet_save.cpp b/engines/titanic/pet_control/pet_save.cpp index b5e16736bc..9305759117 100644 --- a/engines/titanic/pet_control/pet_save.cpp +++ b/engines/titanic/pet_control/pet_save.cpp @@ -22,6 +22,7 @@ #include "titanic/pet_control/pet_save.h" #include "titanic/pet_control/pet_control.h" +#include "titanic/core/project_item.h" namespace Titanic { @@ -58,15 +59,28 @@ void CPetSave::getTooltip(CPetText *text) { } void CPetSave::highlightSave(int index) { - warning("TODO: CPetSave::highlightSave"); + if (index >= 0) + _slotNames[index].showCursor(-2); } void CPetSave::unhighlightSave(int index) { - warning("TODO: CPetSave::unhighlightSave"); + if (index >= 0) + _slotNames[index].hideCursor(); } void CPetSave::execute() { - warning("TODO: CPetSave::execute"); + CPetControl *pet = getPetControl(); + if (_savegameSlotNum >= 0) { + highlightSlot(-1); + CProjectItem *project = pet ? pet->getRoot() : nullptr; + + if (project) { + project->saveGame(_savegameSlotNum, _slotNames[_savegameSlotNum].getText()); + pet->displayMessage(""); + } + } else if (pet) { + pet->displayMessage("You must select a game to save first."); + } } } // End of namespace Titanic |