MCPcopy Create free account
hub / github.com/5zig/The-5zig-Mod / elementHovered

Method elementHovered

Minecraft-Utils/1.13/src/FileSelector.java:391–402  ·  view source on GitHub ↗
(int id, int mouseX, int mouseY)

Source from the content-addressed store, hash-verified

389 }
390
391 protected void elementHovered(int id, int mouseX, int mouseY) {
392 File file = getFile(id);
393 if (file == null)
394 return;
395 String name = file.getName();
396 if (currentDir == null) {
397 name = fsv.getSystemDisplayName(file);
398 }
399 if (MinecraftFactory.getVars().getStringWidth(name) > selectionBoxWidth - 18 - MinecraftFactory.getVars().getStringWidth("...")) {
400 MinecraftFactory.getVars().getCurrentScreen().drawHoveringText(MinecraftFactory.getVars().splitStringToWidth(name, 200), mouseX, mouseY);
401 }
402 }
403
404 @Override
405 public File getCurrentDir() {

Callers 1

drawMethod · 0.95

Calls 7

getFileMethod · 0.95
getVarsMethod · 0.95
getStringWidthMethod · 0.65
drawHoveringTextMethod · 0.65
getCurrentScreenMethod · 0.65
splitStringToWidthMethod · 0.65
getNameMethod · 0.45

Tested by

no test coverage detected