MCPcopy Index your code
hub / github.com/BombusMod/BombusMod / pointerPressed

Method pointerPressed

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

Source from the content-addressed store, hash-verified

786 private int yPointerPos;
787
788 protected void pointerPressed(int x, int y) {
789 long clickTime = System.currentTimeMillis();
790 lastClickTime = clickTime;
791 lastCursor = cursor;
792
793 if (PopUp.getInstance().size() > 0) {
794 return;
795 }
796
797 int act = CommandsPointer.pointerPressed(x, y);
798 if (act == 1) {
799 doLeftAction();
800 stickyWindow = false;
801 return;
802 } else if (act == 2) {
803 doRightAction();
804 stickyWindow = false;
805 return;
806 }
807 yPointerPos = y;
808
809 if (scrollbar.pointerPressed(x, y, this)) {
810 stickyWindow = false;
811 return;
812 }
813
814 if (y < list_top) {
815 captionPressed();
816 return;
817 }
818 if (y > list_top + winHeight) {
819 return;
820 }
821
822 int pos = getElementIndexAt(win_top + y - list_top);
823 if (cursor >= 0 && cursor != pos) {
824 moveCursorTo(pos);
825 stickyWindow = false;
826 setRotator();
827 }
828 }
829
830 boolean itemDragged = false;
831

Callers

nothing calls this directly

Calls 10

getInstanceMethod · 0.95
pointerPressedMethod · 0.95
doLeftActionMethod · 0.95
doRightActionMethod · 0.95
captionPressedMethod · 0.95
getElementIndexAtMethod · 0.95
moveCursorToMethod · 0.95
setRotatorMethod · 0.95
pointerPressedMethod · 0.65
sizeMethod · 0.45

Tested by

no test coverage detected