MCPcopy Create free account
hub / github.com/BombusMod/BombusMod / pointerReleased

Method pointerReleased

src/main/java/ui/VirtualList.java:877–912  ·  view source on GitHub ↗
(int x, int y)

Source from the content-addressed store, hash-verified

875 }
876
877 protected void pointerReleased(int x, int y) {
878 long clickTime = System.currentTimeMillis();
879 long dTime = clickTime - lastClickTime;
880 boolean longClick = (dTime > 500 && dTime < 5000);
881 boolean shortClick = (dTime <= 200);
882 lastClickTime = clickTime;
883
884 if ((longClick && PopUp.getInstance().goToMsgList())
885 || (shortClick && PopUp.getInstance().next())) {
886 return;
887 }
888
889 if (scrollbar.pointerReleased(x, y, this)
890 || (Config.fullscreen && CommandsPointer.pointerPressed(x, y) > 0)
891 || (y > list_top + winHeight)) {
892 return;
893 }
894
895// In my opinion, scrolling without it more comfortable. Totktonada.
896/*
897 if (cursor != lastCursor) { // Without this condition, scrolling large messages is very interesting :-)
898 makeCursorMaximallyVisible();
899 }
900*/
901
902 if (!itemDragged) {
903 if (longClick) {
904 eventLongOk();
905 }
906 if (shortClick && (cursor == lastCursor || cf.advTouch)) {
907 eventOk();
908 }
909 }
910 itemDragged = false;
911 lastCursor = cursor;
912 }
913
914 /**
915 * событие "Нажатие кнопки UP"

Callers

nothing calls this directly

Calls 7

getInstanceMethod · 0.95
pointerPressedMethod · 0.95
eventLongOkMethod · 0.95
eventOkMethod · 0.95
goToMsgListMethod · 0.80
nextMethod · 0.80
pointerReleasedMethod · 0.65

Tested by

no test coverage detected