package net.minecraft.client.gui.components;

import net.minecraft.client.Options;
import net.minecraft.client.ProgressOption;

public class SliderButton extends AbstractSliderButton {
    private final ProgressOption option;
    
    public SliderButton(final Options dbr, final int integer2, final int integer3, final int integer4, final int integer5, final ProgressOption dbt) {
        super(dbr, integer2, integer3, integer4, integer5, (float)dbt.toPct(dbt.get(dbr)));
        this.option = dbt;
        this.updateMessage();
    }
    
    @Override
    protected void applyValue() {
        this.option.set(this.options, this.option.toValue(this.value));
        this.options.save();
    }
    
    @Override
    protected void updateMessage() {
        this.setMessage(this.option.getMessage(this.options));
    }
}
