mirror of
https://github.com/GTNewHorizons/Applied-Energistics-2-Unofficial.git
synced 2026-10-25 20:22:23 +00:00
Fix inventory scrollbar's drag state after mouse release (#1666)
This commit is contained in:
1 parent
b50ef8d02c
commit
711c0dcb0a
2 files changed
+12
No files matched your search
@@ -572,6 +572,14 @@ public abstract class AEBaseGui extends GuiContainer implements IGuiTooltipHandl
|
||||
super.mouseClickMove(x, y, c, d);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseMovedOrUp(final int mouseX, final int mouseY, final int state) {
|
||||
if (state >= 0 && this.getScrollBar() != null) {
|
||||
this.getScrollBar().release();
|
||||
}
|
||||
super.mouseMovedOrUp(mouseX, mouseY, state);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handleMouseClick(final Slot slot, final int slotIdx, final int clickedButton, final int clickType) {
|
||||
if (clickType == 0 && this.draggedSlots.add(slot)) {
|
||||
|
||||
@@ -157,6 +157,10 @@ public class GuiScrollbar implements IScrollSource {
|
||||
}
|
||||
}
|
||||
|
||||
public void release() {
|
||||
this.isLatestClickOnScrollbar = false;
|
||||
}
|
||||
|
||||
public void wheel(int delta) {
|
||||
delta = Math.max(Math.min(-delta, 1), -1);
|
||||
this.currentScroll += delta * this.pageSize;
|
||||
|
||||
Reference in new issue
Block a user