#2586 closed defect (fixed)
KYRA1: a small menu issue
Reported by: | SF/clemty | Owned by: | lordhoto |
---|---|---|---|
Priority: | low | Component: | Engine: Kyra |
Version: | Keywords: | ||
Cc: | Game: | Kyrandia 1 |
Description
version used: current daily build, Athlon 64 Linux FC5
if you enter the "load game" or "save game" submenu, you have up and down arrows. if you click on the down arrow repeatedly, the list of savegames will move out of view, you have to click the same number of times the up arrow to get back to the list
I guess ideally there will always be at least one line visible and the down arrow gets disabled when it reaches the last line... I think the original game handles it that way
Ticket imported from: #1479872. Ticket imported from: bugs/2586.
Change History (8)
comment:1 by , 19 years ago
Owner: | set to |
---|
comment:2 by , 18 years ago
comment:3 by , 18 years ago
Hiya!
The reason I didn't do something like this, is that you run into problems when savegame slots have been "skipped", so to speak (due to using quicksave, or deleting savegames, copying into new system, etc, etc). I had planned to rewrite some of this stuff at some time (to solve this issue, and to reverse the order in which the savegames appear, so that newest ones are on top), but Real Life sort of took over :).
Ideally, the slot a savegame appears in should be abstracted form the actual number of the savegame, so we can 1) skip over "empty" slots, and thus be able to implement the solution you had here, 2) reverse the list.
comment:5 by , 17 years ago
Priority: | normal → low |
---|
comment:8 by , 17 years ago
Owner: | changed from | to
---|---|
Resolution: | → fixed |
Status: | new → closed |
This patch solves the issue (I didn't see any option to attach a file here):
Index: engines/kyra/gui.cpp
--- engines/kyra/gui.cpp (revision 25211) +++ engines/kyra/gui.cpp (working copy) @@ -1387,13 +1387,19 @@ }
int KyraEngine::gui_scrollDown(Button *button) { + Common::InSaveFile *in; debugC(9, kDebugLevelGUI, "KyraEngine::gui_scrollDown()"); processMenuButton(button);
- _savegameOffset++; - setupSavegames(_menu[2], 5); - initMenu(_menu[2]); + // Don't go lower if there's nothing to show + if ((in = _saveFileMan->openForLoading(getSavegameFilename(_savegameOffset + 1)))) { + delete in;
+ _savegameOffset++; + setupSavegames(_menu[2], 5); + initMenu(_menu[2]); + } + return 0; }