Prepare for adjustable save state slot count by making the Win32 menu dynamic

This commit is contained in:
Henrik Rydgård
2026-01-08 16:07:48 +01:00
parent a9ef2baa5e
commit 77b9a6e2e8
53 changed files with 97 additions and 45 deletions
+1 -3
View File
@@ -362,12 +362,10 @@ bool GamePauseScreen::key(const KeyInput &key) {
void GamePauseScreen::CreateSavestateControls(UI::LinearLayout *leftColumnItems) {
auto pa = GetI18NCategory(I18NCat::PAUSE);
static const int NUM_SAVESLOTS = 5;
using namespace UI;
leftColumnItems->SetSpacing(10.0);
for (int i = 0; i < NUM_SAVESLOTS; i++) {
for (int i = 0; i < Config::iSaveStateSlotCount; i++) {
SaveSlotView *slot = leftColumnItems->Add(new SaveSlotView(gamePath_, i, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT, Gravity::G_HCENTER, Margins(0,0,0,0))));
slot->OnStateLoaded.Handle(this, &GamePauseScreen::OnState);
slot->OnStateSaved.Handle(this, &GamePauseScreen::OnState);