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

Method elementHovered

Minecraft-Utils/1.8.9/src/FileSelector.java:392–403  ·  view source on GitHub ↗
(int id, int mouseX, int mouseY)

Source from the content-addressed store, hash-verified

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