Skip to content

Commit

Permalink
Resolves #226
Browse files Browse the repository at this point in the history
  • Loading branch information
Direwolf20-MC committed Feb 1, 2024
1 parent b04a717 commit 5c8254c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partia
}
Button channelButton = buttons.get("channel");
if (MiscTools.inBounds(channelButton.getX(), channelButton.getY(), channelButton.getWidth(), channelButton.getHeight(), mouseX, mouseY)) {
guiGraphics.renderTooltip(font, Component.translatable("screen.laserio.channel").append(String.valueOf(currentChannel)), mouseX, mouseY);
if (currentMode != 3)
guiGraphics.renderTooltip(font, Component.translatable("screen.laserio.channel").append(String.valueOf(currentChannel)), mouseX, mouseY);
}
Button redstoneChannelButton = buttons.get("redstoneChannel");
if (MiscTools.inBounds(redstoneChannelButton.getX(), redstoneChannelButton.getY(), redstoneChannelButton.getWidth(), redstoneChannelButton.getHeight(), mouseX, mouseY)) {
Expand Down Expand Up @@ -504,7 +505,7 @@ public void openNode() {
@Override
public boolean mouseClicked(double x, double y, int btn) {
ChannelButton channelButton = ((ChannelButton) buttons.get("channel"));
if (MiscTools.inBounds(channelButton.getX(), channelButton.getY(), channelButton.getWidth(), channelButton.getHeight(), x, y)) {
if ((currentMode != 3) && MiscTools.inBounds(channelButton.getX(), channelButton.getY(), channelButton.getWidth(), channelButton.getHeight(), x, y)) {
if (btn == 0)
currentChannel = BaseCard.nextChannel(card);
else if (btn == 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partia
}
Button channelButton = buttons.get("channel");
if (MiscTools.inBounds(channelButton.getX(), channelButton.getY(), channelButton.getWidth(), channelButton.getHeight(), mouseX, mouseY)) {
guiGraphics.renderTooltip(font, Component.translatable("screen.laserio.channel").append(String.valueOf(currentChannel)), mouseX, mouseY);
if (currentMode != 3)
guiGraphics.renderTooltip(font, Component.translatable("screen.laserio.channel").append(String.valueOf(currentChannel)), mouseX, mouseY);
}
Button redstoneChannelButton = buttons.get("redstoneChannel");
if (MiscTools.inBounds(redstoneChannelButton.getX(), redstoneChannelButton.getY(), redstoneChannelButton.getWidth(), redstoneChannelButton.getHeight(), mouseX, mouseY)) {
Expand Down Expand Up @@ -721,7 +722,7 @@ public void openNode() {
@Override
public boolean mouseClicked(double x, double y, int btn) {
ChannelButton channelButton = ((ChannelButton) buttons.get("channel"));
if (MiscTools.inBounds(channelButton.getX(), channelButton.getY(), channelButton.getWidth(), channelButton.getHeight(), x, y)) {
if ((currentMode != 3) && MiscTools.inBounds(channelButton.getX(), channelButton.getY(), channelButton.getWidth(), channelButton.getHeight(), x, y)) {
if (btn == 0)
currentChannel = BaseCard.nextChannel(card);
else if (btn == 1)
Expand Down

0 comments on commit 5c8254c

Please sign in to comment.