(int mouseX, int mouseY)
| 52 | } |
| 53 | |
| 54 | @Override |
| 55 | public void draw(int mouseX, int mouseY) { |
| 56 | super.draw(mouseX, mouseY); |
| 57 | |
| 58 | if (errorMessage != null) { |
| 59 | MinecraftFactory.getVars().getCurrentScreen().drawHoveringText(Collections.singletonList(errorMessage), (int) (getX() + MinecraftFactory.getVars().getStringWidth(errorMessage) * |
| 60 | .8), getY() - 10); |
| 61 | } |
| 62 | if (recording) { |
| 63 | String line1 = MinecraftFactory.getClassProxyCallback().translate("chat.audio.recording", |
| 64 | Utils.getShortenedDouble((double) (System.currentTimeMillis() - recordingStarted) / 1000.0, 1)); |
| 65 | String line2 = MinecraftFactory.getClassProxyCallback().translate("chat.audio.abort"); |
| 66 | int stringWidth = Math.max(MinecraftFactory.getVars().getStringWidth(line1), MinecraftFactory.getVars().getStringWidth(line2)); |
| 67 | MinecraftFactory.getVars().getCurrentScreen().drawHoveringText(Arrays.asList(line1, line2), (int) (getX() + stringWidth * .8), getY() - 15); |
| 68 | } |
| 69 | |
| 70 | if (recording && (mouseX <= getX() || mouseX >= getX() + getWidth() || mouseY <= getY() || mouseY >= getY() + getWidth())) { |
| 71 | recordingStarted = System.currentTimeMillis(); |
| 72 | recording = false; |
| 73 | synchronized (LOCK) { |
| 74 | closeLine(); |
| 75 | } |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | @Override |
| 80 | public boolean mouseClicked(int mouseX, int mouseY) { |
nothing calls this directly
no test coverage detected