-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #349 from RUGMJ/rewrite
- Loading branch information
Showing
4 changed files
with
131 additions
and
143 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
118 changes: 0 additions & 118 deletions
118
src/main/java/tools/redstone/redstonetools/macros/gui/widget/commandlist/CommandEntry.java
This file was deleted.
Oops, something went wrong.
10 changes: 5 additions & 5 deletions
10
...a/tools/redstone/redstonetools/macros/gui/widget/commandlist/CommandEntryPlaceHolder.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 |
---|---|---|
@@ -1,23 +1,23 @@ | ||
package tools.redstone.redstonetools.macros.gui.widget.commandlist; | ||
|
||
import net.minecraft.client.MinecraftClient; | ||
import net.minecraft.client.util.math.MatrixStack; | ||
import net.minecraft.client.gui.DrawContext; | ||
import tools.redstone.redstonetools.macros.gui.widget.commandlist.CommandListWidget.CommandEntry; | ||
|
||
public class CommandEntryPlaceHolder extends CommandEntry{ | ||
public class CommandEntryPlaceHolder extends CommandEntry { | ||
public CommandEntryPlaceHolder(MinecraftClient client, CommandListWidget owner, String text) { | ||
super(client, owner, text); | ||
super.deleteButton.visible = false; | ||
} | ||
|
||
@Override | ||
public void render(MatrixStack matrices, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta) { | ||
public void render(DrawContext context, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta) { | ||
command.setSuggestion("Add new command"); | ||
if (!super.command.getText().isEmpty()) { | ||
super.owner.addCommandFromPlaceHolder(command.getText(),this); | ||
command.setText(""); | ||
} | ||
|
||
super.render(matrices, index, y, x, entryWidth, entryHeight, mouseX, mouseY, hovered, tickDelta); | ||
super.render(context, index, y, x, entryWidth, entryHeight, mouseX, mouseY, hovered, tickDelta); | ||
} | ||
|
||
} |
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