mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 18:57:32 +00:00
Add Ascending/Descending SetList
This commit is contained in:
1 parent
7dc5cc5e8c
commit
f9a4fc0d54
1 file changed
+13
-1
@@ -231,12 +231,24 @@ public class GuiCustomScroll extends GuiScreen
|
||||
// TODO Auto-generated method stub
|
||||
return selected >= 0;
|
||||
}
|
||||
public void setList(List<String> list){
|
||||
|
||||
public void setList(List<String> list){
|
||||
isSorted = true;
|
||||
Collections.sort(list, String.CASE_INSENSITIVE_ORDER);
|
||||
this.list = list;
|
||||
setSize(xSize,ySize);
|
||||
}
|
||||
|
||||
public void setList(List<String> list, boolean ascending){
|
||||
isSorted = true;
|
||||
Collections.sort(list, String.CASE_INSENSITIVE_ORDER);
|
||||
if(!ascending){
|
||||
Collections.reverse(list);
|
||||
}
|
||||
this.list = list;
|
||||
setSize(xSize,ySize);
|
||||
}
|
||||
|
||||
public void setUnsortedList(List<String> list){
|
||||
isSorted = false;
|
||||
this.list = list;
|
||||
|
||||
Reference in new issue
Block a user