2015-08-29 14:33:25 +02:00
|
|
|
/*
|
2016-05-16 22:52:27 +02:00
|
|
|
* This file ("GuiConfiguration.java") is part of the Actually Additions mod for Minecraft.
|
2015-08-29 14:33:25 +02:00
|
|
|
* It is created and owned by Ellpeck and distributed
|
|
|
|
* under the Actually Additions License to be found at
|
2016-05-16 22:52:27 +02:00
|
|
|
* http://ellpeck.de/actaddlicense
|
2015-08-29 14:33:25 +02:00
|
|
|
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
|
|
|
*
|
2017-01-01 16:23:26 +01:00
|
|
|
* © 2015-2017 Ellpeck
|
2015-08-29 14:33:25 +02:00
|
|
|
*/
|
|
|
|
|
2016-01-05 04:47:35 +01:00
|
|
|
package de.ellpeck.actuallyadditions.mod.config;
|
2015-07-17 11:17:55 +02:00
|
|
|
|
2016-01-05 04:47:35 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
2015-07-17 11:17:55 +02:00
|
|
|
import net.minecraft.client.gui.GuiScreen;
|
|
|
|
import net.minecraftforge.common.config.ConfigElement;
|
2016-01-07 18:20:59 +01:00
|
|
|
import net.minecraftforge.fml.client.config.GuiConfig;
|
|
|
|
import net.minecraftforge.fml.client.config.IConfigElement;
|
2015-07-17 11:17:55 +02:00
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
public class GuiConfiguration extends GuiConfig{
|
|
|
|
|
|
|
|
public GuiConfiguration(GuiScreen parentScreen){
|
2015-10-01 12:52:03 +02:00
|
|
|
super(parentScreen, getConfigElements(), ModUtil.MOD_ID, false, false, GuiConfig.getAbridgedConfigPath(ConfigurationHandler.config.toString()));
|
2015-07-17 11:17:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
private static List<IConfigElement> getConfigElements(){
|
2015-07-17 23:22:10 +02:00
|
|
|
List<IConfigElement> list = new ArrayList<IConfigElement>();
|
2015-07-17 11:17:55 +02:00
|
|
|
for(int i = 0; i < ConfigCategories.values().length; i++){
|
2015-08-31 11:48:15 +02:00
|
|
|
ConfigCategories cat = ConfigCategories.values()[i];
|
|
|
|
ConfigurationHandler.config.setCategoryComment(cat.name, cat.comment);
|
2016-01-07 23:42:42 +01:00
|
|
|
list.add(new ConfigElement(ConfigurationHandler.config.getCategory(cat.name)));
|
2015-07-17 11:17:55 +02:00
|
|
|
}
|
|
|
|
return list;
|
|
|
|
}
|
|
|
|
}
|