本文整理汇总了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()));
}