当前位置: 首页>>代码示例>>Java>>正文


Java GuiConfig类代码示例

本文整理汇总了Java中net.minecraftforge.fml.client.config.GuiConfig的典型用法代码示例。如果您正苦于以下问题:Java GuiConfig类的具体用法?Java GuiConfig怎么用?Java GuiConfig使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


GuiConfig类属于net.minecraftforge.fml.client.config包,在下文中一共展示了GuiConfig类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: buildChildScreen

import net.minecraftforge.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:F1r3w477,项目名称:CustomWorldGen,代码行数:18,代码来源:ForgeGuiFactory.java

示例2: buildChildScreen

import net.minecraftforge.fml.client.config.GuiConfig; //导入依赖的package包/类
@Override
protected GuiScreen buildChildScreen()
{
	Configuration configuration = ModConfiguration.getConfig();
	ConfigElement configurationCategory = new ConfigElement(configuration.getCategory(ModConfiguration.CATEGORY_NUGGETS));
	List<IConfigElement> propertiesOnThisScreen = configurationCategory.getChildElements();
	String windowTitle = I18n.format("uncrafting.options.nuggets");

	return new GuiConfig(this.owningScreen, propertiesOnThisScreen,
		this.owningScreen.modID,
		ModConfiguration.CATEGORY_NUGGETS,
		this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
		this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart,
		windowTitle
	);

}
 
开发者ID:crazysnailboy,项目名称:UncraftingTable,代码行数:18,代码来源:ModGuiConfig.java

示例3: TextNumberSliderEntry

import net.minecraftforge.fml.client.config.GuiConfig; //导入依赖的package包/类
public TextNumberSliderEntry(GuiConfig owningScreen,
		GuiConfigEntries owningEntryList, IConfigElement configElement) 
{
	super(owningScreen, owningEntryList, configElement, new GuiTextSlider(0, owningEntryList.controlX, 0, owningEntryList.controlWidth, 18,
			"", "", Double.valueOf(configElement.getMinValue().toString()), Double.valueOf(configElement.getMaxValue().toString()),
			Double.valueOf(configElement.get().toString()), configElement.getType() == ConfigGuiType.DOUBLE, true));

	((GuiTextSlider)this.btnValue).parentEntry = this;

	if (configElement.getType() == ConfigGuiType.INTEGER)
	{
		this.beforeValue = Integer.valueOf(configElement.get().toString());
	}
	else
	{
		this.beforeValue = Double.valueOf(configElement.get().toString());
	}
}
 
开发者ID:Brian-Wuest,项目名称:MC-Prefab,代码行数:19,代码来源:GuiPrefab.java

示例4: UpdateParrentSettings

import net.minecraftforge.fml.client.config.GuiConfig; //导入依赖的package包/类
private void UpdateParrentSettings() {
	if (this.parentScreen != null && this.parentScreen instanceof GuiConfig) {
		GuiConfig parrent = (GuiConfig) this.parentScreen;

		if (parrent.entryList != null && parrent.entryList.listEntries != null) {
			for (IConfigEntry entry : parrent.entryList.listEntries) {
				if (entry.getName().equals("circular")) {
					dummyMapConfig.circular = (Boolean) entry.getCurrentValue();
				} else if (entry.getName().equals("coordsMode")) {
					dummyMapConfig.coordsMode = (String) entry.getCurrentValue();
				} else if (entry.getName().equals("borderMode")) {
					dummyMapConfig.borderMode = (Boolean) entry.getCurrentValue();
				} else if (entry.getName().equals("playerArrowSize")) {
					dummyMapConfig.playerArrowSize = Integer.valueOf((String) entry.getCurrentValue());
				} else if (entry.getName().equals("biomeMode")) {
					dummyMapConfig.biomeMode = (String) entry.getCurrentValue();
				}
			}
		}
	}
}
 
开发者ID:tom5454,项目名称:Toms-Mod,代码行数:22,代码来源:ModGuiConfigHUD.java

示例5: onGuiClosed

import net.minecraftforge.fml.client.config.GuiConfig; //导入依赖的package包/类
@Override
  public void onGuiClosed()
  {
super.onGuiClosed();
      this.entryList.onGuiClosed();
if(this.openchangelog!=1){
      if (this.configID != null && this.parentScreen instanceof GuiConfig)
      {
          GuiConfig parentGuiConfig = (GuiConfig) this.parentScreen;
          parentGuiConfig.needsRefresh = true;
          parentGuiConfig.initGui();
      }

      if (!(this.parentScreen instanceof GuiConfig))
          Keyboard.enableRepeatEvents(false);
}
  }
 
开发者ID:ItsAMysterious,项目名称:Real-Life-Mod-1.8,代码行数:18,代码来源:ConfigGui.java

示例6: BooleanEntry

import net.minecraftforge.fml.client.config.GuiConfig; //导入依赖的package包/类
public BooleanEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement)
{
	super(owningScreen, owningEntryList, configElement);
	this.beforeValue = Boolean.valueOf(configElement.get().toString());
	this.currentValue = this.beforeValue;
	this.btnValue.enabled = this.enabled();
	this.updateValueButtonText();
}
 
开发者ID:crazysnailboy,项目名称:VillagerInventory,代码行数:9,代码来源:ModGuiConfigEntries.java

示例7: buildChildScreen

import net.minecraftforge.fml.client.config.GuiConfig; //导入依赖的package包/类
@Override
protected GuiScreen buildChildScreen() {
	Configuration config = VExConfig.getConfig();
	ConfigElement categoryBlocks = new ConfigElement(config.getCategory(VExConfig.CATEGORY_NAME_BLOCKS));
	List<IConfigElement> propertiesOnScreen = categoryBlocks.getChildElements();
	String windowTitle = I18n.format("gui.config.category.blocks");
	return new GuiConfig(owningScreen, propertiesOnScreen, owningScreen.modID,
			this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
			this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart, windowTitle);
}
 
开发者ID:IvanSteklow,项目名称:VanillaExtras,代码行数:11,代码来源:VExGuiFactory.java

示例8: ModGuiConfig

import net.minecraftforge.fml.client.config.GuiConfig; //导入依赖的package包/类
public ModGuiConfig(GuiScreen guiScreen) {
    super(
        guiScreen,
        RSAddons.INSTANCE.config.getConfigElements(),
        RSAddons.ID,
        false,
        false,
        GuiConfig.getAbridgedConfigPath(RSAddons.INSTANCE.config.getConfig().toString())
    );
}
 
开发者ID:raoulvdberge,项目名称:refinedstorageaddons,代码行数:11,代码来源:ModGuiConfig.java

示例9: isChanged

import net.minecraftforge.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:F1r3w477,项目名称:CustomWorldGen,代码行数:14,代码来源:ForgeGuiFactory.java

示例10: undoChanges

import net.minecraftforge.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:F1r3w477,项目名称:CustomWorldGen,代码行数:18,代码来源:ForgeGuiFactory.java

示例11: buildChildScreen

import net.minecraftforge.fml.client.config.GuiConfig; //导入依赖的package包/类
@Override
protected GuiScreen buildChildScreen() {
    Configuration configuration = TAIGAConfiguration.getConfig();
    ConfigElement cat_general = new ConfigElement(configuration.getCategory(TAIGAConfiguration.CATEGORY_NAME_GENERAL));
    List<IConfigElement> propertiesOnThisScreen = cat_general.getChildElements();
    String windowTitle = configuration.toString();

    return new GuiConfig(this.owningScreen, propertiesOnThisScreen, this.owningScreen.modID, TAIGAConfiguration.CATEGORY_NAME_GENERAL, this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart, this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart, windowTitle);
}
 
开发者ID:TeamFRM,项目名称:TAIGA,代码行数:10,代码来源:TAIGAGuiFactory.java

示例12: onGuiClosed

import net.minecraftforge.fml.client.config.GuiConfig; //导入依赖的package包/类
@Override
public void onGuiClosed() {
	super.onGuiClosed();
	if (this.parentScreen instanceof GuiConfig) {
		final GuiConfig parentGuiConfig = (GuiConfig) this.parentScreen;
		parentGuiConfig.needsRefresh = true;
		parentGuiConfig.initGui();
	}
}
 
开发者ID:OreCruncher,项目名称:DynamicSurroundings,代码行数:10,代码来源:PresetsConfigGui.java

示例13: BooleanEntry

import net.minecraftforge.fml.client.config.GuiConfig; //导入依赖的package包/类
public BooleanEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement)
{
	super(owningScreen, owningEntryList, configElement);
	this.beforeValue = Boolean.valueOf(configElement.get().toString());
	this.currentValue = beforeValue;
	this.btnValue.enabled = enabled();
	updateValueButtonText();
}
 
开发者ID:crazysnailboy,项目名称:UncraftingTable,代码行数:9,代码来源:ModGuiConfigEntries.java

示例14: UncraftingMethodCycleEntry

import net.minecraftforge.fml.client.config.GuiConfig; //导入依赖的package包/类
public UncraftingMethodCycleEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement)
{
	super(owningScreen, owningEntryList, configElement);
	beforeIndex = Integer.valueOf((String)configElement.get());
	defaultIndex = Integer.valueOf((String)configElement.getDefault());
	currentIndex = beforeIndex;
	this.btnValue.enabled = enabled();
	updateValueButtonText();
}
 
开发者ID:crazysnailboy,项目名称:UncraftingTable,代码行数:10,代码来源:ModGuiConfigEntries.java

示例15: ConfigGui

import net.minecraftforge.fml.client.config.GuiConfig; //导入依赖的package包/类
public ConfigGui(GuiScreen parentScreen)
{

	super(parentScreen,
			ConfigOptions.getConfigElements(),
			References.ModID, false, false,
			GuiConfig.getAbridgedConfigPath(
					ConfigOptions.config.toString()));
}
 
开发者ID:Bartz24,项目名称:UsefulNullifiers,代码行数:10,代码来源:ConfigGuiFactory.java


注:本文中的net.minecraftforge.fml.client.config.GuiConfig类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。