Skip to content

Commit

Permalink
MidnightLib 0.6.1 - Fix reset button for color fields
Browse files Browse the repository at this point in the history
- Fix reset button never being inactive for color config options
- Always make color button non-interactive
  • Loading branch information
Motschen committed Sep 21, 2022
1 parent 383de29 commit ac15162
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G
loader_version=0.14.6

# Mod Properties
mod_version = 0.6.0
mod_version = 0.6.1
maven_group = eu.midnightdust
archives_base_name = midnightlib

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/eu/midnightdust/lib/config/MidnightConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,8 @@ public void init() {
ButtonWidget colorButton = new ButtonWidget(width - 185, 0, 20, 20, Text.literal("⬛"), (button -> {}));
try {colorButton.setMessage(Text.literal("⬛").setStyle(Style.EMPTY.withColor(Color.decode(info.tempValue).getRGB())));} catch (Exception ignored) {}
info.colorButton = colorButton;
this.list.addButton(List.of(widget, colorButton, resetButton), name, info);
colorButton.active = false;
this.list.addButton(List.of(widget, resetButton, colorButton), name, info);
}
else this.list.addButton(List.of(widget, resetButton), name, info);
} else {
Expand Down

0 comments on commit ac15162

Please sign in to comment.