Skip to content

Commit

Permalink
Update DecimalSliderOptionBuilder's enablePercentMode to return self …
Browse files Browse the repository at this point in the history
…for easy method chaining

Close #32
  • Loading branch information
The-Fireplace committed May 11, 2022
1 parent 80643df commit c23db56
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ public interface DecimalSliderOptionBuilder<S> extends NumericOptionBuilder<S>
{
DecimalSliderOptionBuilder<S> setPrecision(byte precision);

void enablePercentMode();
DecimalSliderOptionBuilder<S> enablePercentMode();
}
3 changes: 2 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Restructured in a way that also supports Forge
Redesigned networking API
Adjusted config screen registry to take a modid parameter
Adjusted config screen registry to take a modid parameter
Update DecimalSliderOptionBuilder's enablePercentMode to return self for easy method chaining
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ public DecimalSliderOptionBuilder<S> setPrecision(byte precision) {
}

@Override
public void enablePercentMode() {
public DecimalSliderOptionBuilder<S> enablePercentMode() {
isPercent = true;
return this;
}

private void resetSliderToPrecision(byte precision) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ public DecimalSliderOptionBuilder<S> setPrecision(byte precision) {
}

@Override
public void enablePercentMode() {
public DecimalSliderOptionBuilder<S> enablePercentMode() {
isPercent = true;
return this;
}

private void resetSliderToPrecision(byte precision) {
Expand Down

0 comments on commit c23db56

Please sign in to comment.