Fix centering of the Preference Menu

This commit is contained in:
TadahTech 2016-08-25 04:04:53 -05:00
parent f9cc505908
commit ebfd00ebc3

View File

@ -2,6 +2,7 @@ package mineplex.core.preferences.ui;
import com.google.common.collect.Lists;
import mineplex.core.common.Rank;
import mineplex.core.common.util.UtilUI;
import mineplex.core.menu.Button;
import mineplex.core.menu.Menu;
import mineplex.core.preferences.PreferenceCategory;
@ -44,14 +45,13 @@ public class PreferenceMainMenu extends Menu<PreferencesManager>
List<PreferenceCategory> list = Lists.newArrayList(PreferenceCategory.values());
int[] slots = SLOTS_MAX;
if(!exclusive)
{
list.remove(PreferenceCategory.EXCLUSIVE);
slots = SLOTS_MIN;
}
int[] slots = UtilUI.getIndicesFor(list.size(), 1, 4, 1);
int size = list.size();
for(int i = 0; i < size; i++)