use of net.coderbot.iris.shaderpack.option.ProfileSet in project Iris by IrisShaders.
the class ProfileElementWidget method init.
@Override
public void init(ShaderPackScreen screen, NavigationController navigation) {
super.init(screen, navigation);
this.setLabel(PROFILE_LABEL);
ProfileSet profiles = this.element.profiles;
OptionSet options = this.element.options;
OptionValues pendingValues = this.element.getPendingOptionValues();
ProfileSet.ProfileResult result = profiles.scan(options, pendingValues);
this.next = result.next;
this.previous = result.previous;
Optional<String> profileName = result.current.map(p -> p.name);
this.profileLabel = profileName.map(name -> GuiUtil.translateOrDefault(new TextComponent(name), "profile." + name)).orElse(PROFILE_CUSTOM);
}
Aggregations