2014-08-01 19:28:34 +02:00
|
|
|
package magicbees.client.gui;
|
|
|
|
|
|
2015-04-25 11:33:46 -07:00
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
2014-08-01 19:28:34 +02:00
|
|
|
import magicbees.main.Config;
|
|
|
|
|
import magicbees.main.utils.VersionInfo;
|
|
|
|
|
import net.minecraft.client.gui.GuiScreen;
|
|
|
|
|
import net.minecraftforge.common.config.ConfigElement;
|
|
|
|
|
import net.minecraftforge.common.config.Configuration;
|
2015-04-25 11:33:46 -07:00
|
|
|
import cpw.mods.fml.client.config.DummyConfigElement;
|
|
|
|
|
import cpw.mods.fml.client.config.GuiConfig;
|
|
|
|
|
import cpw.mods.fml.client.config.IConfigElement;
|
2014-08-01 19:28:34 +02:00
|
|
|
|
2015-01-08 21:48:13 -08:00
|
|
|
public class ModGuiConfig extends GuiConfig
|
|
|
|
|
{
|
|
|
|
|
public ModGuiConfig(GuiScreen guiScreen)
|
|
|
|
|
{
|
2015-04-25 11:33:46 -07:00
|
|
|
super(guiScreen, configElements(), VersionInfo.ModName, false, false,
|
2015-01-08 21:48:13 -08:00
|
|
|
GuiConfig.getAbridgedConfigPath(Config.configuration.toString()));
|
|
|
|
|
}
|
2015-04-25 11:33:46 -07:00
|
|
|
|
|
|
|
|
private static List<IConfigElement> configElements() {
|
|
|
|
|
List<IConfigElement> list = new ArrayList<IConfigElement>();
|
|
|
|
|
|
|
|
|
|
list.add(categoryElement(Config.CATEGORY_GENERAL, "General", "magicbees.config.category.general"));
|
|
|
|
|
list.add(categoryElement(Config.CATEGORY_DEBUG, "Debug", "magicbees.config.category.debug"));
|
|
|
|
|
list.add(categoryElement(Config.CATEGORY_MODULES, "Modules", "magicbees.config.category.modules"));
|
|
|
|
|
list.add(categoryElement(Config.CATEGORY_BOTANIA, "Botania Plugin", "magicbees.config.category.botania"));
|
|
|
|
|
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static IConfigElement categoryElement(String category, String name, String tooltip_key) {
|
|
|
|
|
return new DummyConfigElement.DummyCategoryElement(name, tooltip_key,
|
|
|
|
|
new ConfigElement(Config.configuration.getCategory(category)).getChildElements());
|
|
|
|
|
}
|
2014-08-01 19:28:34 +02:00
|
|
|
}
|