package net.minecraft.client.gui.screens;

import net.minecraft.network.chat.Component;
import net.minecraft.client.Options;

public class OptionsSubScreen extends Screen {
    protected final Screen lastScreen;
    protected final Options options;
    
    public OptionsSubScreen(final Screen dgb, final Options dbr, final Component lf) {
        super(lf);
        this.lastScreen = dgb;
        this.options = dbr;
    }
    
    @Override
    public void removed() {
        this.minecraft.options.save();
    }
    
    @Override
    public void onClose() {
        this.minecraft.setScreen(this.lastScreen);
    }
}
