package fr.monkhanny.dorfromantik.listeners;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import fr.monkhanny.dorfromantik.gui.GameModeSelectionPanel;

public class GameModeNextButtonActionListener implements ActionListener {
    private GameModeSelectionPanel panel;

    public GameModeNextButtonActionListener(GameModeSelectionPanel panel) {
        this.panel = panel;
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        panel.setCurrentPage(panel.getCurrentPage() + 1);
        panel.loadSeriesForCurrentPage();
    }
}
