本文整理匯總了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"));
}
示例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
);
}
示例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());
}
}
示例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();
}
}
}
}
}
示例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);
}
}
示例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();
}
示例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);
}
示例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())
);
}
示例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;
}
示例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);
}
}
示例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);
}
示例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();
}
}
示例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();
}
示例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();
}
示例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()));
}