Skip to content

Commit

Permalink
fix shadow type button having no display
Browse files Browse the repository at this point in the history
  • Loading branch information
sisby-folk committed Jul 26, 2024
1 parent 1b4bc79 commit 02c094a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ public void init() {
this.changeAlignment.setMessage(Text.stringifiedTranslatable("gui.glowcase.alignment", this.textBlockEntity.textAlignment));
}).dimensions(120 + innerPadding, 0, 160, 20).build();

this.shadowToggle = ButtonWidget.builder(Text.translatable("gui.glowcase.shadow_type", this.textBlockEntity.shadowType), action -> {
this.shadowToggle = ButtonWidget.builder(Text.translatable("gui.glowcase.shadow_type", this.textBlockEntity.shadowType.toString()), action -> {
switch (textBlockEntity.shadowType) {
case DROP -> textBlockEntity.shadowType = TextBlockEntity.ShadowType.PLATE;
case PLATE -> textBlockEntity.shadowType = TextBlockEntity.ShadowType.NONE;
case NONE -> textBlockEntity.shadowType = TextBlockEntity.ShadowType.DROP;
}
this.textBlockEntity.renderDirty = true;

this.shadowToggle.setMessage(Text.translatable("gui.glowcase.shadow_type", this.textBlockEntity.shadowType));
this.shadowToggle.setMessage(Text.translatable("gui.glowcase.shadow_type", this.textBlockEntity.shadowType.toString()));
}).dimensions(120 + innerPadding, 20 + innerPadding, 160, 20).build();

this.colorEntryWidget = new TextFieldWidget(this.client.textRenderer, 280 + innerPadding * 2, 0, 50, 20, Text.empty());
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/glowcase/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"gui.glowcase.scale": "Scale: %d",
"gui.glowcase.alignment": "Alignment: %s",
"gui.glowcase.gives_item": "Gives Item: %s",
"gui.glowcase.shadow_type": "Shadow Type",
"gui.glowcase.shadow_type": "Shadow Type: %s",
"gui.glowcase.rotation_type": "Rotation Type: %s",
"gui.glowcase.show_name": "Show Name: %s",
"gui.glowcase.offset": "Offset: %s",
Expand Down

0 comments on commit 02c094a

Please sign in to comment.