-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: compile step tree navigation in ic workbench
- Loading branch information
Showing
14 changed files
with
653 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
core/src/main/java/mrtjp/projectred/redui/SpriteButtonNode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package mrtjp.projectred.redui; | ||
|
||
import com.mojang.blaze3d.vertex.PoseStack; | ||
|
||
import java.util.function.Supplier; | ||
|
||
public class SpriteButtonNode extends AbstractButtonNode { | ||
|
||
private RedUISprite sprite; | ||
private Runnable clickReceiver = () -> { }; | ||
private Supplier<Boolean> isDisabledProvider = () -> false; | ||
|
||
public SpriteButtonNode(RedUISprite sprite) { | ||
this.sprite = sprite; | ||
} | ||
|
||
public void setClickReceiver(Runnable clickReceiver) { | ||
this.clickReceiver = clickReceiver; | ||
} | ||
|
||
public void setIsDisabledProvider(Supplier<Boolean> isDisabledProvider) { | ||
this.isDisabledProvider = isDisabledProvider; | ||
} | ||
|
||
@Override | ||
protected boolean isButtonDisabled() { | ||
return isDisabledProvider.get(); | ||
} | ||
|
||
@Override | ||
protected void onButtonClicked() { | ||
clickReceiver.run(); | ||
} | ||
|
||
@Override | ||
protected void drawButtonBody(PoseStack stack, boolean mouseover) { | ||
blitSpriteCentered(stack, sprite); | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
fabrication/src/main/generated/.cache/af9e6e51e4f0a9c76d168bf51cd141f0b8234be4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
// 1.19.2 2024-04-05T16:47:53.695184 ProjectRed-Fabrication Languages: en_us | ||
dd1226a77b7ec67a85f9d088ba5a3f78a16f2bf4 assets/projectred_fabrication/lang/en_us.json | ||
// 1.19.2 2024-04-29T13:40:44.325463 ProjectRed-Fabrication Languages: en_us | ||
5da5b8cc9a7b6e62337421001761920875beea36 assets/projectred_fabrication/lang/en_us.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.