()
| 298 | } |
| 299 | |
| 300 | @Override |
| 301 | public void handleMouseInput() { |
| 302 | if (!isMouseWithinSlotBounds()) |
| 303 | return; |
| 304 | |
| 305 | int var; |
| 306 | if (Mouse.getEventButton() == 0 && Mouse.getEventButtonState() && mouseY >= top && mouseY <= bottom) { |
| 307 | int x = mouseX - left; |
| 308 | int y = mouseY - top + (int) amountScrolled - 4; |
| 309 | int idY = y / getSlotHeight(); |
| 310 | int idX = x / selectionBoxWidth; |
| 311 | int id = idX + idY * columnCount; |
| 312 | if (id < files.size() && id >= 0 && x >= 0 && y >= 0 && idX < columnCount) { |
| 313 | selectedFile = id; |
| 314 | elementClicked(id, false, mouseX, mouseY); |
| 315 | } else if (id < 0) { |
| 316 | //this.a(mouseX - var, mouseY - top + (int) this.n - 4); |
| 317 | } |
| 318 | } |
| 319 | |
| 320 | if (Mouse.isButtonDown(0)) { |
| 321 | if (initialClickY == -1) { |
| 322 | boolean var9 = true; |
| 323 | if (mouseY >= top && mouseY <= bottom) { |
| 324 | int x = mouseX - left; |
| 325 | int y = mouseY - top + (int) amountScrolled - 4; |
| 326 | int idY = y / getSlotHeight(); |
| 327 | int idX = x / selectionBoxWidth; |
| 328 | int id = idX + idY * columnCount; |
| 329 | if (id < files.size() && id >= 0 && x >= 0 && y >= 0 && idX < columnCount) { |
| 330 | boolean doubleClick = id == selectedFile && MinecraftFactory.getVars().getSystemTime() - lastClicked < 250L; |
| 331 | this.selectedFile = id; |
| 332 | elementClicked(id, doubleClick, mouseX, mouseY); |
| 333 | this.lastClicked = MinecraftFactory.getVars().getSystemTime(); |
| 334 | } else if (id < 0) { |
| 335 | //this.a(mouseX - var1, mouseY - top + (int) this.n - 4); |
| 336 | var9 = false; |
| 337 | } |
| 338 | |
| 339 | int scrollBarX0 = getScrollBarX(); |
| 340 | int scrollBarX1 = scrollBarX0 + 6; |
| 341 | if (mouseX >= scrollBarX0 && mouseX <= scrollBarX1) { |
| 342 | scrollMultiplier = -1.0F; |
| 343 | int var7 = m(); |
| 344 | if (var7 < 1) { |
| 345 | var7 = 1; |
| 346 | } |
| 347 | |
| 348 | int var8 = (int) ((float) ((bottom - top) * (bottom - top)) / (float) getContentHeight()); |
| 349 | var8 = op.a(var8, 32, bottom - top - 8); |
| 350 | scrollMultiplier /= (float) (bottom - top - var8) / (float) var7; |
| 351 | } else { |
| 352 | scrollMultiplier = 1.0F; |
| 353 | } |
| 354 | |
| 355 | if (var9) { |
| 356 | initialClickY = mouseY; |
| 357 | } else { |
nothing calls this directly
no test coverage detected