-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
120 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
src/main/java/com/github/vfyjxf/jeiutilities/config/JeiUtilitiesConfigGuiFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package com.github.vfyjxf.jeiutilities.config; | ||
|
||
import com.github.vfyjxf.jeiutilities.JEIUtilities; | ||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.client.gui.GuiScreen; | ||
import net.minecraftforge.common.config.ConfigElement; | ||
import net.minecraftforge.fml.client.IModGuiFactory; | ||
import net.minecraftforge.fml.client.config.GuiConfig; | ||
import net.minecraftforge.fml.client.config.IConfigElement; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Set; | ||
|
||
public class JeiUtilitiesConfigGuiFactory implements IModGuiFactory { | ||
@Override | ||
public void initialize(Minecraft minecraftInstance) { | ||
|
||
} | ||
|
||
@Override | ||
public boolean hasConfigGui() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public GuiScreen createConfigGui(GuiScreen parentScreen) { | ||
return new GuiConfig(parentScreen, | ||
getConfigElements(), | ||
JEIUtilities.MODID, | ||
false, | ||
false, | ||
JEIUtilities.NAME | ||
); | ||
} | ||
|
||
@Override | ||
public Set<RuntimeOptionCategoryElement> runtimeGuiCategories() { | ||
return null; | ||
} | ||
|
||
private static List<IConfigElement> getConfigElements() { | ||
List<IConfigElement> list = new ArrayList<>(); | ||
for (String name : JeiUtilitiesConfig.getConfig().getCategoryNames()) { | ||
list.add(new ConfigElement(JeiUtilitiesConfig.getConfig().getCategory(name))); | ||
} | ||
return list; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.