Finish ingame configs.

Thanks @bspkrs :)

Oh also fix Crazy's spelling again :P
This commit is contained in:
tterrag1098 committed 2014-06-28 23:43:41 -04:00
1 parent 95693aaf8b
commit b579bcdcd8
7 files changed
+244 -149

No files matched your search

@@ -1,26 +1,36 @@
package crazypants.enderio.config;
import static crazypants.enderio.config.Config.*;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.resources.I18n;
import net.minecraftforge.common.config.ConfigCategory;
import net.minecraftforge.common.config.ConfigElement;
import cpw.mods.fml.client.config.GuiConfig;
import cpw.mods.fml.client.config.IConfigElement;
import crazypants.enderio.EnderIO;
import crazypants.enderio.config.Config.Section;
import crazypants.util.Lang;
@SuppressWarnings({ "rawtypes" })
public class GuiConfigFactoryEIO extends GuiConfig {
public GuiConfigFactoryEIO(GuiScreen parentScreen)
{
super(parentScreen, getConfigElements(parentScreen), EnderIO.MODID, false, false, I18n.format("EIO.config.title"));
super(parentScreen, getConfigElements(parentScreen), EnderIO.MODID, false, false, Lang.localize("config.title", true));
}
private static List<IConfigElement> getConfigElements(GuiScreen parent)
{
List<IConfigElement> list = new ArrayList<IConfigElement>();
String prefix = Lang.prefix + "config.";
for (Section section : Config.sections) {
list.add(new ConfigElement<ConfigCategory>(config.getCategory(section.lc()).setLanguageKey(prefix + section.lang)));
}
return list;
}
// Help me bspkrs, you're my only hope.
}