Skip to content

Commit

Permalink
Fix load/save menus not starting scrolled to the selected entry
Browse files Browse the repository at this point in the history
  • Loading branch information
Macil authored and madame-rachelle committed Sep 16, 2024
1 parent faead1c commit c8fbe43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wadsrc/static/zscript/engine/ui/menu/loadsavemenu.zs
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,8 @@ class SaveMenu : LoadSaveMenu
{
Super.Init(parent, desc);
manager.InsertNewSaveNode();
TopItem = 0;
Selected = manager.ExtractSaveData (-1);
TopItem = MAX(0, Selected - listboxRows + 1);
UpdateSaveComment();
}

Expand Down Expand Up @@ -623,8 +623,8 @@ class LoadMenu : LoadSaveMenu
override void Init(Menu parent, ListMenuDescriptor desc)
{
Super.Init(parent, desc);
TopItem = 0;
Selected = manager.ExtractSaveData (-1);
TopItem = MAX(0, Selected - listboxRows + 1);
UpdateSaveComment();
}

Expand Down

0 comments on commit c8fbe43

Please sign in to comment.