當前位置: 首頁>>代碼示例>>Java>>正文


Java GuiConfig類代碼示例

本文整理匯總了Java中cpw.mods.fml.client.config.GuiConfig的典型用法代碼示例。如果您正苦於以下問題:Java GuiConfig類的具體用法?Java GuiConfig怎麽用?Java GuiConfig使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


GuiConfig類屬於cpw.mods.fml.client.config包,在下文中一共展示了GuiConfig類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: buildChildScreen

import cpw.mods.fml.client.config.GuiConfig; //導入依賴的package包/類
@Override
protected GuiScreen buildChildScreen()
{
    List<IConfigElement> list = new ArrayList<IConfigElement>();
    
    list.add(new DummyCategoryElement("forgeChunkLoadingModCfg", "forge.configgui.ctgy.forgeChunkLoadingModConfig", 
            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.func_135052_a("forge.configgui.ctgy.forgeChunkLoadingConfig"));
}
 
開發者ID:SchrodingersSpy,項目名稱:TRHS_Club_Mod_2016,代碼行數:18,代碼來源:ForgeGuiFactory.java

示例2: buildChildScreen

import cpw.mods.fml.client.config.GuiConfig; //導入依賴的package包/類
@Override
protected GuiScreen buildChildScreen()
{
    List<IConfigElement> list = new ArrayList<IConfigElement>();
    
    list.add(new DummyCategoryElement("forgeChunkLoadingModCfg", "forge.configgui.ctgy.forgeChunkLoadingModConfig", 
            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"));
}
 
開發者ID:alexandrage,項目名稱:CauldronGit,代碼行數:18,代碼來源:ForgeGuiFactory.java

示例3: BaseConfigGui

import cpw.mods.fml.client.config.GuiConfig; //導入依賴的package包/類
@SuppressWarnings("rawtypes")
public BaseConfigGui(GuiScreen parentScreen) {
  // dummy super so we can call instance methods
  super(parentScreen, new ArrayList<IConfigElement>(), null, false, false, null);

  try {
    // pffft final, what a wimpy modifier
    Field modID = GuiConfig.class.getDeclaredField("modID");
    Field configElements = GuiConfig.class.getDeclaredField("configElements");

    modID.setAccessible(true);
    configElements.setAccessible(true);

    modID.set(this, getConfigHandler().getModID());
    configElements.set(this, getConfigElements());
  } catch (Exception e) {
    throw new RuntimeException(e);
  }

  this.title = getTitle();
}
 
開發者ID:SleepyTrousers,項目名稱:EnderCore,代碼行數:22,代碼來源:BaseConfigGui.java

示例4: isChanged

import cpw.mods.fml.client.config.GuiConfig; //導入依賴的package包/類
/**
 * Check to see if the child screen's entry list has changed.
 */
@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;
}
 
開發者ID:SchrodingersSpy,項目名稱:TRHS_Club_Mod_2016,代碼行數:14,代碼來源:ForgeGuiFactory.java

示例5: undoChanges

import cpw.mods.fml.client.config.GuiConfig; //導入依賴的package包/類
/**
 * Since adding a new entry to the child screen is what constitutes a change here, reset the child
 * screen listEntries to the saved list.
 */
@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);
    }
}
 
開發者ID:SchrodingersSpy,項目名稱:TRHS_Club_Mod_2016,代碼行數:18,代碼來源:ForgeGuiFactory.java

示例6: buildChildScreen

import cpw.mods.fml.client.config.GuiConfig; //導入依賴的package包/類
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
protected GuiScreen buildChildScreen() {
	return new GuiConfig(this.owningScreen,
			(new ConfigElement(Configs.config.getCategory(Configs.CATEGORY_BALANCE_LEVELING))).getChildElements(), 
			this.owningScreen.modID, Configs.CATEGORY_BALANCE_LEVELING, false, false, REFERENCE.NAME + " Balance");
}
 
開發者ID:DracoAnimus,項目名稱:Coding,代碼行數:8,代碼來源:ModConfigGui.java

示例7: ModGuiConfig

import cpw.mods.fml.client.config.GuiConfig; //導入依賴的package包/類
public ModGuiConfig(GuiScreen guiScreen)
{
    //noinspection unchecked
    super(guiScreen,
            new ConfigElement(ConfigurationHandler.configuration.getCategory(Configuration.CATEGORY_GENERAL)).getChildElements(),
            Reference.MOD_ID,
            false,
            false,
            GuiConfig.getAbridgedConfigPath(ConfigurationHandler.configuration.toString()));
}
 
開發者ID:samvbeckmann,項目名稱:network,代碼行數:11,代碼來源:ModGuiConfig.java

示例8: ModGuiConfig

import cpw.mods.fml.client.config.GuiConfig; //導入依賴的package包/類
public ModGuiConfig(GuiScreen parentScreen) {
	super(parentScreen, new ConfigElement(
			ConfigurationHandler.configuration
					.getCategory(Configuration.CATEGORY_GENERAL))
			.getChildElements(), Reference.MOD_ID, false, false, GuiConfig
			.getAbridgedConfigPath(ConfigurationHandler.configuration
					.toString()));
}
 
開發者ID:Nincraft,項目名稱:NinsTiCModifiers,代碼行數:9,代碼來源:ModGuiConfig.java

示例9: ConfigGui

import cpw.mods.fml.client.config.GuiConfig; //導入依賴的package包/類
public  ConfigGui(GuiScreen guiScreen){
    super(guiScreen,
            new ConfigElement(ConfigurationHandler.configuration.getCategory(Configuration.CATEGORY_GENERAL)).getChildElements(),
            Reference.MOD_ID,
            false,
            false,
            GuiConfig.getAbridgedConfigPath(ConfigurationHandler.configuration.toString()));
}
 
開發者ID:BLUESHADOW2020,項目名稱:BLUESHADOW2020-LearningToMod,代碼行數:9,代碼來源:ConfigGui.java

示例10: ModGuiConfig

import cpw.mods.fml.client.config.GuiConfig; //導入依賴的package包/類
public ModGuiConfig(GuiScreen guiScreen)
{
    super(guiScreen,
            new ConfigElement(ConfigurationHandler.configuration.getCategory(Configuration.CATEGORY_GENERAL)).getChildElements(),
            Reference.MOD_ID,
            false,
            false,
            GuiConfig.getAbridgedConfigPath(ConfigurationHandler.configuration.toString()));
}
 
開發者ID:Allgorhythm,項目名稱:Cyber,代碼行數:10,代碼來源:ModGuiConfig.java

示例11: buildChildScreen

import cpw.mods.fml.client.config.GuiConfig; //導入依賴的package包/類
@Override
protected GuiScreen buildChildScreen()
{
    return new GuiConfig(this.owningScreen,
            (new ConfigElement(ConfigurationHandler.config.getCategory(ConfigurationHandler.CONFIG_CATERGORY[0]))).getChildElements(),
            Reference.MOD_ID, false, true,
            I18n.format("thallus.config.main.title"), I18n.format("thallus.config.debug.title"));
}
 
開發者ID:Kithio,項目名稱:Thallus,代碼行數:9,代碼來源:ModGuiConfig.java

示例12: ModGuiConfig

import cpw.mods.fml.client.config.GuiConfig; //導入依賴的package包/類
public ModGuiConfig(GuiScreen guiScreen) {	
		
	super(guiScreen,
			new ConfigElement(ConfigurationHandler.configuration.getCategory(Configuration.CATEGORY_GENERAL)).getChildElements(),
			Reference.MOD_ID,
			false,
			false,
			GuiConfig.getAbridgedConfigPath(ConfigurationHandler.configuration.toString()));
	
}
 
開發者ID:WolfDevMC,項目名稱:Necromanteion-Mod,代碼行數:11,代碼來源:ModGuiConfig.java

示例13: buildChildScreen

import cpw.mods.fml.client.config.GuiConfig; //導入依賴的package包/類
@Override
protected GuiScreen buildChildScreen()
{
	return new GuiConfig(owningScreen,
			new ConfigElement(Mekanism.configuration.getCategory(Configuration.CATEGORY_GENERAL)).getChildElements(),
			owningScreen.modID, Configuration.CATEGORY_GENERAL, false, false,
			GuiConfig.getAbridgedConfigPath(Mekanism.configuration.toString()));
}
 
開發者ID:Microsoft,項目名稱:vsminecraft,代碼行數:9,代碼來源:GuiMekanismConfig.java

示例14: buildChildScreen

import cpw.mods.fml.client.config.GuiConfig; //導入依賴的package包/類
@Override
protected GuiScreen buildChildScreen()
{
	return new GuiConfig(owningScreen,
			new ConfigElement(Mekanism.configuration.getCategory("tools.general")).getChildElements(),
			owningScreen.modID, Configuration.CATEGORY_GENERAL, configElement.requiresWorldRestart() || owningScreen.allRequireWorldRestart,
			configElement.requiresMcRestart() || owningScreen.allRequireMcRestart,
			GuiConfig.getAbridgedConfigPath(Mekanism.configuration.toString()));
}
 
開發者ID:Microsoft,項目名稱:vsminecraft,代碼行數:10,代碼來源:GuiToolsConfig.java

示例15: GuiScreenModConfig

import cpw.mods.fml.client.config.GuiConfig; //導入依賴的package包/類
public GuiScreenModConfig(GuiScreen parent) {
	super(parent, new ConfigElement(
					ConfigHandler.cfg.getCategory(Configuration.CATEGORY_GENERAL))
					.getChildElements(), GimmeTime.MOD_ID, false, false, GuiConfig
					.getAbridgedConfigPath(ConfigHandler.cfg.toString()),
			StatCollector.translateToLocalFormatted(
					"gui.config.subtitle",
					GameSettings.getKeyDisplayString(KeyHandler.INSTANCE.clock.getKeyCode())));
}
 
開發者ID:iTitus,項目名稱:GimmeTime,代碼行數:10,代碼來源:GuiScreenModConfig.java


注:本文中的cpw.mods.fml.client.config.GuiConfig類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。