Examples of GuiConfig


Examples of cpw.mods.fml.client.config.GuiConfig

                        ModOverridesEntry.class));
                list.addAll((new ConfigElement(ForgeChunkManager.getDefaultsCategory())).getChildElements());
   
                // This GuiConfig object specifies the configID of the object and as such will force-save when it is closed. The parent
                // GuiConfig object's propertyList will also be refreshed to reflect the changes.
                return new GuiConfig(this.owningScreen, list, this.owningScreen.modID, "chunkLoader",
                        this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
                        this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart,
                        GuiConfig.getAbridgedConfigPath(ForgeChunkManager.getConfig().toString()),
                        I18n.format("forge.configgui.ctgy.forgeChunkLoadingConfig"));
            }
View Full Code Here

Examples of cpw.mods.fml.client.config.GuiConfig

                list.add(new DummyCategoryElement("addForgeChunkLoadingModCfg", "forge.configgui.ctgy.forgeChunkLoadingAddModConfig",
                        AddModOverrideEntry.class));
                for (ConfigCategory cc : ForgeChunkManager.getModCategories())
                    list.add(new ConfigElement(cc));
   
                return new GuiConfig(this.owningScreen, list, this.owningScreen.modID,
                        this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
                        this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart, this.owningScreen.title,
                        I18n.format("forge.configgui.ctgy.forgeChunkLoadingModConfig"));
            }
View Full Code Here

Examples of cpw.mods.fml.client.config.GuiConfig

            @Override
            public boolean isChanged()
            {
                if (childScreen instanceof GuiConfig)
                {
                    GuiConfig child = (GuiConfig) childScreen;
                    return child.entryList.listEntries.size() != child.initEntries.size() || child.entryList.hasChangedEntry(true);
                }
                return false;
            }
View Full Code Here

Examples of cpw.mods.fml.client.config.GuiConfig

            @Override
            public void undoChanges()
            {
                if (childScreen instanceof GuiConfig)
                {
                    GuiConfig child = (GuiConfig) childScreen;
                    for (IConfigEntry ice : child.entryList.listEntries)
                        if (!child.initEntries.contains(ice) && ForgeChunkManager.getConfig().hasCategory(ice.getName()))
                            ForgeChunkManager.getConfig().removeCategory(ForgeChunkManager.getConfig().getCategory(ice.getName()));
                   
                    child.entryList.listEntries = new ArrayList<IConfigEntry>(child.initEntries);
View Full Code Here

Examples of cpw.mods.fml.client.config.GuiConfig

               
                list.add(new DummyConfigElement("modID", "", ConfigGuiType.STRING, "forge.configgui.modID").setCustomListEntryClass(ModIDEntry.class));
                list.add(new ConfigElement<Integer>(new Property("maximumTicketCount", "200", Property.Type.INTEGER, "forge.configgui.maximumTicketCount")));
                list.add(new ConfigElement<Integer>(new Property("maximumChunksPerTicket", "25", Property.Type.INTEGER, "forge.configgui.maximumChunksPerTicket")));
   
                return new GuiConfig(this.owningScreen, list, this.owningScreen.modID,
                        this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
                        this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart, this.owningScreen.title,
                        I18n.format("forge.configgui.ctgy.forgeChunkLoadingAddModConfig"));
            }
View Full Code Here

Examples of cpw.mods.fml.client.config.GuiConfig

                    ForgeChunkManager.addConfigProperty(modObject, "maximumTicketCount", String.valueOf(maxTickets), Property.Type.INTEGER);
                    ForgeChunkManager.addConfigProperty(modObject, "maximumChunksPerTicket", String.valueOf(maxChunks), Property.Type.INTEGER);
                   
                    if (this.owningScreen.parentScreen instanceof GuiConfig)
                    {
                        GuiConfig superParent = (GuiConfig) this.owningScreen.parentScreen;
                        ConfigCategory modCtgy = ForgeChunkManager.getConfigFor(modObject);
                        modCtgy.setPropertyOrder(ForgeChunkManager.MOD_PROP_ORDER);
                        ConfigElement modConfig = new ConfigElement(modCtgy);
                       
                        boolean found = false;
                        for (IConfigElement ice : superParent.configElements)
                            if (ice.getName().equals(currentValue))
                                found = true;
                       
                        if (!found)
                            superParent.configElements.add(modConfig);
                       
                        superParent.needsRefresh = true;
                        superParent.initGui();
                    }
                }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.