當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。