mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-25 14:24:35 +00:00
Scrolling :)
Next is adding something similar to RP's "restriction tube!"
This commit is contained in:
1 parent
a2443f902d
commit
001ce431dc
1 file changed
+8
-3
@@ -42,12 +42,17 @@ public class GuiLogisticalSorter extends GuiMekanism
|
||||
|
||||
public int getScroll()
|
||||
{
|
||||
return Math.max(Math.min((int)(scroll*125), 125), 0);
|
||||
return Math.max(Math.min((int)(scroll*123), 123), 0);
|
||||
}
|
||||
|
||||
public int getFilterIndex()
|
||||
{
|
||||
return 0;
|
||||
if(tileEntity.filters.size() <= 4)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (int)((tileEntity.filters.size()*scroll) - (4F/(float)tileEntity.filters.size()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -97,7 +102,7 @@ public class GuiLogisticalSorter extends GuiMekanism
|
||||
|
||||
if(isDragging)
|
||||
{
|
||||
scroll = (float)(yAxis-18-dragOffset)/123F;
|
||||
scroll = Math.min(Math.max((float)(yAxis-18-dragOffset)/123F, 0), 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user