Skip to content

Commit

Permalink
Fix color picker not correctly showing thumb positions with the color…
Browse files Browse the repository at this point in the history
… entry widget

FIX: Fixed the color picker from incorrectly showing the thumb's position while in use from the color entry widget
  • Loading branch information
Superkat32 committed Oct 8, 2024
1 parent 046d45e commit 0b755f6
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,12 @@ public void init() {
TextColor.parse(this.colorEntryWidget.getText()).ifSuccess(color -> {
int newColor = color == null ? 0xFFFFFFFF : color.getRgb() | 0xFF000000;
this.textBlockEntity.color = newColor;
//make sure it doesn't update from the color picker updating the text
if(this.colorEntryWidget.isFocused()) {
this.colorPickerWidget.setColor(new Color(newColor));
}
this.textBlockEntity.renderDirty = true;
this.colorPickerWidget.setColor(new Color(newColor));
});
this.colorPickerWidget.updateHSL();
this.colorPickerWidget.updateThumbPositions();
});

this.zOffsetToggle = ButtonWidget.builder(Text.literal(this.textBlockEntity.zOffset.name()), action -> {
Expand Down

0 comments on commit 0b755f6

Please sign in to comment.