[Scummvm-cvs-logs] SF.net SVN: scummvm:[43992] scummvm/trunk/engines/kyra/gui_lol.cpp
athrxx at users.sourceforge.net
athrxx at users.sourceforge.net
Sun Sep 6 20:39:04 CEST 2009
Revision: 43992
http://scummvm.svn.sourceforge.net/scummvm/?rev=43992&view=rev
Author: athrxx
Date: 2009-09-06 18:39:03 +0000 (Sun, 06 Sep 2009)
Log Message:
-----------
LOL: add message to load/delete menus when no save files are present
Modified Paths:
--------------
scummvm/trunk/engines/kyra/gui_lol.cpp
Modified: scummvm/trunk/engines/kyra/gui_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/gui_lol.cpp 2009-09-06 17:04:58 UTC (rev 43991)
+++ scummvm/trunk/engines/kyra/gui_lol.cpp 2009-09-06 18:39:03 UTC (rev 43992)
@@ -2369,6 +2369,12 @@
initMenu(*_currentMenu);
+ if (_currentMenu == &_loadMenu || _currentMenu == &_deleteMenu) {
+ if (_saveSlots.begin() == _saveSlots.end())
+ // "no savegames to load" message
+ _screen->fprintString(_vm->getLangString(0x4009), _currentMenu->x + _currentMenu->width / 2, _currentMenu->y + 42, 204, 0, 9);
+ }
+
if (hasSpecialButtons == 2) {
static const uint8 oX[] = { 0, 10, 124 };
static const uint8 oW[] = { 10, 114, 10 };
@@ -2842,9 +2848,8 @@
Common::Array<int>::iterator i = Common::find(_saveSlots.begin(), _saveSlots.end(), _menuResult - 1);
while (i != _saveSlots.begin()) {
--i;
- // We are only renaming all savefiles until we get some slots missing
- // Also not rename quicksave slot filenames
- if (/**(i-1) != *i ||*/ *i >= 990)
+ // not rename quicksave slot filenames
+ if (*i >= 990)
break;
Common::String oldName = _vm->getSavegameFilename(*i);
Common::String newName = _vm->getSavegameFilename(*i-1);
@@ -2859,6 +2864,9 @@
}
int GUI_LoL::scrollUp(Button *button) {
+ if (!_scrollUpButton.data0ShapePtr)
+ return 0;
+
updateButton(button);
if (_savegameOffset > 0) {
_savegameOffset--;
@@ -2869,6 +2877,9 @@
}
int GUI_LoL::scrollDown(Button *button) {
+ if (!_scrollDownButton.data0ShapePtr)
+ return 0;
+
updateButton(button);
if ((uint)_savegameOffset < _saveSlots.size() - (_currentMenu == &_saveMenu ? 3 : 4)) {
_savegameOffset++;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list