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

Method getPrevSelectableRef

src/main/java/ui/VirtualList.java:969–991  ·  view source on GitHub ↗
(int curRef)

Source from the content-addressed store, hash-verified

967 }
968
969 public int getPrevSelectableRef(int curRef) {
970 if (getItemCount() == 0) {
971 return 0;
972 }
973 int prevRef = curRef;
974 boolean process = true;
975 while (process) {
976 prevRef--;
977 if (prevRef <= 0) {
978 if (wrapping) {
979 prevRef = getItemCount();
980 } else {
981 prevRef = 0;
982 process = false;
983 }
984 }
985 if (getItemRef(prevRef).isSelectable()) {
986 break;
987 }
988 }
989
990 return prevRef;
991 }
992
993 public int getNextSelectableRef(int curRef) {
994 if (getItemCount() == 0) {

Callers 2

keyUpMethod · 0.95
pageRightMethod · 0.95

Calls 3

getItemCountMethod · 0.95
getItemRefMethod · 0.95
isSelectableMethod · 0.65

Tested by

no test coverage detected