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


Java GuiConfigEntries类代码示例

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


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

示例1: TextNumberSliderEntry

import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的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

示例2: ConfigFieldEntry

import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的package包/类
public ConfigFieldEntry(String name, String langKey, Class<?> clazz, Object instance, Map<Object, Object> parent) {
  super(name, null, getType(clazz), langKey);

  this.instance = instance;
  this.parent = parent;

  if(Map.class.isAssignableFrom(clazz)) {
    this.isProperty = false;
    ImmutableList.Builder<IConfigElement> builder = ImmutableList.builder();
    Map<Object, Object> map = ((Map<Object, Object>) instance);
    map.forEach((o, o2) -> builder.add(new ConfigFieldEntry(o.toString(), o.toString() + ".lang", o2.getClass(), o2, map)));
    this.childElements = builder.build();
    this.configEntryClass = GuiConfigEntries.CategoryEntry.class;
  }
  else {
    this.defaultValue = instance.toString();
    this.setToDefault();
  }
}
 
开发者ID:SlimeKnights,项目名称:HarvestTweaks,代码行数:20,代码来源:ConfigFieldEntry.java

示例3: preInit

import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的package包/类
@Override
public void preInit(FMLPreInitializationEvent evt) {
    MCDoom.instance.getGoreProperty().setConfigEntryClass(GuiConfigEntries.NumberSliderEntry.class);
    MCDoom.instance.getMaxGoreParticles().setConfigEntryClass(GuiConfigEntries.NumberSliderEntry.class);

    MinecraftForge.EVENT_BUS.register(screenEventHandler);
    MinecraftForge.EVENT_BUS.register(soundEventsHandler);
    registerItems();

    RenderingRegistry.registerEntityRenderingHandler(PlasmaBallEntity.class, new IRenderFactory<PlasmaBallEntity>() {
        @Override
        public Render<? super PlasmaBallEntity> createRenderFor(RenderManager manager) {
            return new RenderPlasmaBall(manager);
        }
    });

    loadWeaponRenderers();
}
 
开发者ID:jglrxavpok,项目名称:MCDoom,代码行数:19,代码来源:MCDoomClientProxy.java

示例4: BooleanEntry

import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的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

示例5: BooleanEntry

import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的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

示例6: UncraftingMethodCycleEntry

import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的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

示例7: initGui

import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的package包/类
@Override
public void initGui()
{
	if (this.entryList == null || this.needsRefresh)
	{
		this.entryList = new GuiConfigEntries(this, mc);
		this.needsRefresh = false;

		this.ReplaceIntegerEntries();
	}

	super.initGui();
}
 
开发者ID:Brian-Wuest,项目名称:MC-Prefab,代码行数:14,代码来源:GuiPrefab.java

示例8: ModBooleanEntry

import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的package包/类
public ModBooleanEntry(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:tom5454,项目名称:Toms-Mod,代码行数:8,代码来源:ModGuiConfig.java

示例9: onDrawScreen

import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的package包/类
@SubscribeEvent(priority = EventPriority.LOWEST)
public void onDrawScreen(GuiScreenEvent.DrawScreenEvent e) {
    if (ConfigHandler.showButtons && e.getGui() != null && e.getGui() instanceof GuiContainer) {
        int mouseY = JEIButtons.proxy.getMouseY();
        int mouseX = JEIButtons.proxy.getMouseX();

        if (JEIButtons.isAnyButtonHovered) {
           List<String> tip = Localization.getTooltip(JEIButtons.hoveredButton);
            if (tip != null) {
                GuiUtils.drawHoveringText(tip, mouseX, mouseY < 17 ? 17 : mouseY, ClientProxy.mc.displayWidth, ClientProxy.mc.displayHeight, -1, ClientProxy.mc.fontRenderer);
                RenderHelper.disableStandardItemLighting();
            }
        }


        if (ConfigHandler.enableSubsets)
            ModSubsetButtonHandler.drawSubsetList(mouseX, mouseY);
    }


    if (e.getGui() instanceof GuiConfig) {
        GuiConfigEntries eL = ((GuiConfig) e.getGui()).entryList;
        GuiConfig cfg = (GuiConfig) e.getGui();
        if (cfg.titleLine2 != null && cfg.titleLine2.equals(ConfigHandler.CATEGORY_POSITION)) {
            int y = getInt(1, eL);
            int x = getInt(0, eL);
            GuiUtils.drawGradientRect(10, x, y, x + 75, y + 75, 0x77888888, 0x77888888);
            ClientProxy.mc.fontRenderer.drawString("[Buttons]", x + 14, y + 10, 0xFFFFFF);
        }
    }
}
 
开发者ID:univrsal,项目名称:JustEnoughButtons,代码行数:32,代码来源:EventHandlers.java

示例10: getConfigElements

import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的package包/类
private static List<IConfigElement> getConfigElements() {
    List<IConfigElement> list = new ArrayList<IConfigElement>();

    list.add(new DummyConfigElement.DummyCategoryElement(GGRConfig.CATEGORY_GAMERULES, "ggr.configgui.rules",
            (new ConfigElement(GlobalGR.getConfig().getCategory(GGRConfig.CATEGORY_GAMERULES))).getChildElements(), GuiConfigEntries.CategoryEntry.class));
    list.add(new DummyConfigElement.DummyCategoryElement(GGRConfig.CATEGORY_MISC, "ggr.configgui.misc",
            (new ConfigElement(GlobalGR.getConfig().getCategory(GGRConfig.CATEGORY_MISC))).getChildElements(), GuiConfigEntries.CategoryEntry.class));
    return list;
}
 
开发者ID:GoryMoon,项目名称:GlobalGameRules,代码行数:10,代码来源:GGRConfigGUI.java

示例11: TranslatedCycleValueEntry

import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的package包/类
public TranslatedCycleValueEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList,
		IConfigElement configElement) {
	super(owningScreen, owningEntryList, configElement);
	beforeIndex = getIndex(configElement.get().toString());
	defaultIndex = getIndex(configElement.getDefault().toString());
	currentIndex = beforeIndex;
	this.btnValue.enabled = enabled();
	updateValueButtonText();
}
 
开发者ID:Earthcomputer,项目名称:Easy-Editors,代码行数:10,代码来源:GuiFactory.java

示例12: ColorEntry

import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的package包/类
public ColorEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement) {
	super(owningScreen, owningEntryList, configElement);
	beforeValue = configElement.get().toString();
	this.textFieldValue = new GuiTextField(10, this.mc.fontRendererObj, this.owningEntryList.controlX + 1,
			0, this.owningEntryList.controlWidth - 38, 16);
	this.textFieldValue.setText(configElement.get().toString());
	this.allowAlpha = configElement.getDefault().toString().length() == 8;
}
 
开发者ID:Earthcomputer,项目名称:Easy-Editors,代码行数:9,代码来源:GuiFactory.java

示例13: ConfigGui

import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的package包/类
public ConfigGui(GuiScreen parent)
{
	super(parent, new ArrayList<IConfigElement>(), "cubicvillager", false, false, null);

	ModConfig config = CubicVillager.me.getConfig();
	ConfigCategory category = config.getCategory(Configuration.CATEGORY_GENERAL);
	IConfigElement element = new ConfigElement(category);

	this.configElements.addAll(element.getChildElements());
	this.entryList = new GuiConfigEntries(this, this.mc);
	this.title = GuiConfig.getAbridgedConfigPath(config.toString());
}
 
开发者ID:a1lic,项目名称:McMod-CubicVillager,代码行数:13,代码来源:ConfigGui.java

示例14: getConfigEntryClass

import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的package包/类
@Override
public Class<? extends GuiConfigEntries.IConfigEntry> getConfigEntryClass()
{
    return null;
}
 
开发者ID:CreeperHost,项目名称:CreeperHostGui,代码行数:6,代码来源:ReflectionConfigElement.java

示例15: CategoryEntryBlocks

import net.minecraftforge.fml.client.config.GuiConfigEntries; //导入依赖的package包/类
public CategoryEntryBlocks(GuiConfig owningScreen, GuiConfigEntries owningEntryList,
		IConfigElement configElement) {
	super(owningScreen, owningEntryList, configElement);
}
 
开发者ID:IvanSteklow,项目名称:VanillaExtras,代码行数:5,代码来源:VExGuiFactory.java


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