Skip to content

Commit 70f3317

Browse files
fix switch
cleanup unused variables in the cyclebuttonwidget (hoovering tooltip moved to widget class)
1 parent 8ef93af commit 70f3317

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/main/java/gregtech/api/gui/widgets/CycleButtonWidget.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ public class CycleButtonWidget extends Widget {
3333
private IntConsumer setOptionExecutor;
3434
protected int currentOption;
3535
protected String tooltipHoverString;
36-
protected long hoverStartTime = -1L;
37-
protected boolean isMouseHovered;
3836

3937
public CycleButtonWidget(int xPosition, int yPosition, int width, int height, String[] optionNames, IntSupplier currentOptionSupplier, IntConsumer setOptionExecutor) {
4038
super(new Position(xPosition, yPosition), new Size(width, height));
@@ -126,7 +124,6 @@ public boolean mouseClicked(int mouseX, int mouseY, int button) {
126124
return false;
127125
}
128126

129-
130127
@Override
131128
public void handleClientAction(int id, PacketBuffer buffer) {
132129
super.handleClientAction(id, buffer);

src/main/java/gregtech/api/gui/widgets/SituationWidget.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class SituationWidget extends Widget {
2424
protected TextureArea area;
2525
private boolean isVisible = true;
2626

27-
public <T extends Situation> SituationWidget(int xPosition, int yPosition, int width, int height, Supplier <Situation> getSituation) {
27+
public <T extends Situation> SituationWidget(int xPosition, int yPosition, int width, int height, Supplier<Situation> getSituation) {
2828
super(new Position(xPosition, yPosition), new Size(width, height));
2929
this.currentSituationSupplier = getSituation;
3030
this.currentSituation = getSituation.get();
@@ -41,12 +41,16 @@ public SituationWidget setImage() {
4141
switch (iconTextures) {
4242
case IDLE:
4343
this.area = GuiTextures.STATUS_IDLING;
44+
break;
4445
case WORKING:
4546
this.area = GuiTextures.STATUS_WORKING;
47+
break;
4648
case WARNING:
4749
this.area = GuiTextures.STATUS_WARNING;
50+
break;
4851
case ERROR:
4952
this.area = GuiTextures.STATUS_ERROR;
53+
break;
5054
default:
5155
this.area = null;
5256
}

0 commit comments

Comments
 (0)