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


Java GuiButtonExt类代码示例

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


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

示例1: setPresetButtonText

import net.minecraftforge.fml.client.config.GuiButtonExt; //导入依赖的package包/类
public void setPresetButtonText() {
	final int start = this.currentPage * MAX_PRESETS_PAGE;
	for (int i = 0; i < MAX_PRESETS_PAGE; i++) {
		final GuiButtonExt button = this.presetButtons.get(i);
		final int idx = start + i;
		if (idx >= this.presets.size()) {
			button.visible = false;
		} else {
			final PresetInfo info = this.presets.get(idx);
			button.displayString = info.getTitle();
			button.enabled = this.selectedPreset != idx;
			button.visible = true;

			final StringBuilder builder = new StringBuilder();
			builder.append(TextFormatting.GOLD + info.getTitle()).append('\n');
			builder.append(TextFormatting.AQUA + info.getFilename());
			if (info.isRestartRequired())
				builder.append('\n').append(TOOLTIP_RESTART_REQUIRED);
			if (!StringUtils.isEmpty(info.getDescription().trim()))
				builder.append("\n\n").append(TextFormatting.RESET).append(info.getDescription());
			this.tooltips.set(i, new GuiTooltip(this, button, builder.toString(), PRESET_TOOLTIP_WIDTH));
		}
	}

	this.updateButtonState();
}
 
开发者ID:OreCruncher,项目名称:DynamicSurroundings,代码行数:27,代码来源:PresetsConfigGui.java

示例2: drawScreen

import net.minecraftforge.fml.client.config.GuiButtonExt; //导入依赖的package包/类
@Override
public void drawScreen(final int mouseX, final int mouseY, final float partialTicks) {
	this.drawDefaultBackground();
	this.backgroundPanel.render(this.anchorX, this.anchorY, Reference.UPPER_LEFT);
	this.presetPanel.render(this.anchorX + MARGIN, this.anchorY + MARGIN + INSET * 3, Reference.UPPER_LEFT);
	super.drawScreen(mouseX, mouseY, partialTicks);

	for (int i = 0; i < MAX_PRESETS_PAGE; i++) {
		final GuiButtonExt button = this.presetButtons.get(i);
		if (button.visible && this.tooltips.get(i).handle(mouseX, mouseY))
			return;
	}

	for (final GuiTooltip tip : this.buttonTips)
		if (tip.handle(mouseX, mouseY))
			return;
}
 
开发者ID:OreCruncher,项目名称:DynamicSurroundings,代码行数:18,代码来源:PresetsConfigGui.java

示例3: Initialize

import net.minecraftforge.fml.client.config.GuiButtonExt; //导入依赖的package包/类
@Override
protected void Initialize() 
{
	this.configuration = ClientEventHandler.playerConfig.getClientConfig("Chicken Coop", ChickenCoopConfiguration.class);
	this.configuration.pos = this.pos;

	// Get the upper left hand corner of the GUI box.
	int grayBoxX = this.getCenteredXAxis() - 213;
	int grayBoxY = this.getCenteredYAxis() - 83;

	// Create the buttons.
	this.btnVisualize = new GuiButtonExt(4, grayBoxX + 10, grayBoxY + 90, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_PREVIEW));
	this.buttonList.add(this.btnVisualize);
	
	// Create the done and cancel buttons.
	this.btnBuild = new GuiButtonExt(1, grayBoxX + 10, grayBoxY + 136, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_BUILD));
	this.buttonList.add(this.btnBuild);

	this.btnCancel = new GuiButtonExt(2, grayBoxX + 147, grayBoxY + 136, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_CANCEL));
	this.buttonList.add(this.btnCancel);
}
 
开发者ID:Brian-Wuest,项目名称:MC-Prefab,代码行数:22,代码来源:GuiChickenCoop.java

示例4: Initialize

import net.minecraftforge.fml.client.config.GuiButtonExt; //导入依赖的package包/类
@Override
protected void Initialize() 
{
	this.configuration = ClientEventHandler.playerConfig.getClientConfig("Horse Stable", HorseStableConfiguration.class);
	this.configuration.pos = this.pos;

	// Get the upper left hand corner of the GUI box.
	int grayBoxX = (this.width / 2) - 213;
	int grayBoxY = (this.height / 2) - 83;

	// Create the buttons.
	this.btnVisualize = new GuiButtonExt(4, grayBoxX + 10, grayBoxY + 20, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_PREVIEW));
	this.buttonList.add(this.btnVisualize);
	
	// Create the done and cancel buttons.
	this.btnBuild = new GuiButtonExt(1, grayBoxX + 10, grayBoxY + 136, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_BUILD));
	this.buttonList.add(this.btnBuild);

	this.btnCancel = new GuiButtonExt(2, grayBoxX + 147, grayBoxY + 136, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_CANCEL));
	this.buttonList.add(this.btnCancel);
}
 
开发者ID:Brian-Wuest,项目名称:MC-Prefab,代码行数:22,代码来源:GuiHorseStable.java

示例5: Initialize

import net.minecraftforge.fml.client.config.GuiButtonExt; //导入依赖的package包/类
@Override
protected void Initialize() 
{
	this.configuration = ClientEventHandler.playerConfig.getClientConfig("Nether Gate", NetherGateConfiguration.class);
	this.configuration.pos = this.pos;

	// Get the upper left hand corner of the GUI box.
	int grayBoxX = this.getCenteredXAxis() - 213;
	int grayBoxY = this.getCenteredYAxis() - 83;

	// Create the buttons.
	this.btnVisualize = new GuiButtonExt(4, grayBoxX + 10, grayBoxY + 20, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_PREVIEW));
	this.buttonList.add(this.btnVisualize);
	
	// Create the done and cancel buttons.
	this.btnBuild = new GuiButtonExt(1, grayBoxX + 10, grayBoxY + 136, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_BUILD));
	this.buttonList.add(this.btnBuild);

	this.btnCancel = new GuiButtonExt(2, grayBoxX + 147, grayBoxY + 136, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_CANCEL));
	this.buttonList.add(this.btnCancel);
}
 
开发者ID:Brian-Wuest,项目名称:MC-Prefab,代码行数:22,代码来源:GuiNetherGate.java

示例6: Initialize

import net.minecraftforge.fml.client.config.GuiButtonExt; //导入依赖的package包/类
@Override
public void Initialize()
{
	this.configuration = ClientEventHandler.playerConfig.getClientConfig("Monster Masher", MonsterMasherConfiguration.class);
	this.configuration.pos = this.pos;

	// Get the upper left hand corner of the GUI box.
	int grayBoxX = this.getCenteredXAxis() - 210;
	int grayBoxY = this.getCenteredYAxis() - 83;

	// Create the buttons.
	this.btnGlassColor = new GuiButtonExt(10, grayBoxX + 10, grayBoxY + 20, 90, 20, GuiLangKeys.translateDye(this.configuration.dyeColor));
	this.buttonList.add(this.btnGlassColor);
	
	this.btnVisualize = new GuiButtonExt(4, grayBoxX + 10, grayBoxY + 90, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_PREVIEW));
	this.buttonList.add(this.btnVisualize);

	// Create the done and cancel buttons.
	this.btnBuild = new GuiButtonExt(1, grayBoxX + 10, grayBoxY + 136, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_BUILD));
	this.buttonList.add(this.btnBuild);

	this.btnCancel = new GuiButtonExt(2, grayBoxX + 147, grayBoxY + 136, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_CANCEL));
	this.buttonList.add(this.btnCancel);
}
 
开发者ID:Brian-Wuest,项目名称:MC-Prefab,代码行数:25,代码来源:GuiMonsterMasher.java

示例7: Initialize

import net.minecraftforge.fml.client.config.GuiButtonExt; //导入依赖的package包/类
@Override
public void Initialize()
{
	this.configuration = ClientEventHandler.playerConfig.getClientConfig("Villager Houses", VillagerHouseConfiguration.class);
	this.configuration.pos = this.pos;
	this.configuration.houseFacing = EnumFacing.NORTH;
	this.houseStyle = this.configuration.houseStyle;

	// Get the upper left hand corner of the GUI box.
	int grayBoxX = this.getCenteredXAxis() - 205;
	int grayBoxY = this.getCenteredYAxis() - 83;

	this.btnHouseStyle = new GuiButtonExt(4, grayBoxX + 10, grayBoxY + 20, 90, 20, this.houseStyle.getDisplayName());
	this.buttonList.add(this.btnHouseStyle);
	
	// Create the buttons.
	this.btnVisualize = new GuiButtonExt(4, grayBoxX + 10, grayBoxY + 60, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_PREVIEW));
	this.buttonList.add(this.btnVisualize);

	// Create the done and cancel buttons.
	this.btnBuild = new GuiButtonExt(1, grayBoxX + 10, grayBoxY + 136, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_BUILD));
	this.buttonList.add(this.btnBuild);

	this.btnCancel = new GuiButtonExt(2, grayBoxX + 147, grayBoxY + 136, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_CANCEL));
	this.buttonList.add(this.btnCancel);
}
 
开发者ID:Brian-Wuest,项目名称:MC-Prefab,代码行数:27,代码来源:GuiVillaerHouses.java

示例8: Initialize

import net.minecraftforge.fml.client.config.GuiButtonExt; //导入依赖的package包/类
@Override
public void Initialize()
{
	this.configuration = ClientEventHandler.playerConfig.getClientConfig("Produce Farm", ProduceFarmConfiguration.class);
	this.configuration.pos = this.pos;

	// Get the upper left hand corner of the GUI box.
	int grayBoxX = this.getCenteredXAxis() - 210;
	int grayBoxY = this.getCenteredYAxis() - 83;

	// Create the buttons.
	this.btnGlassColor = new GuiButtonExt(10, grayBoxX + 10, grayBoxY + 20, 90, 20, GuiLangKeys.translateDye(this.configuration.dyeColor));
	this.buttonList.add(this.btnGlassColor);

	this.btnVisualize = new GuiButtonExt(4, grayBoxX + 10, grayBoxY + 90, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_PREVIEW));
	this.buttonList.add(this.btnVisualize);
	
	// Create the done and cancel buttons.
	this.btnBuild = new GuiButtonExt(1, grayBoxX + 10, grayBoxY + 136, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_BUILD));
	this.buttonList.add(this.btnBuild);

	this.btnCancel = new GuiButtonExt(2, grayBoxX + 147, grayBoxY + 136, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_CANCEL));
	this.buttonList.add(this.btnCancel);
}
 
开发者ID:Brian-Wuest,项目名称:MC-Prefab,代码行数:25,代码来源:GuiProduceFarm.java

示例9: Initialize

import net.minecraftforge.fml.client.config.GuiButtonExt; //导入依赖的package包/类
@Override
protected void Initialize() 
{
	this.configuration = ClientEventHandler.playerConfig.getClientConfig("Tree Farm", TreeFarmConfiguration.class);
	this.configuration.pos = this.pos;
	this.configuration.houseFacing = EnumFacing.NORTH;

	// Get the upper left hand corner of the GUI box.
	int grayBoxX = this.getCenteredXAxis() - 213;
	int grayBoxY = this.getCenteredYAxis() - 83;

	// Create the buttons.
	this.btnVisualize = new GuiButtonExt(4, grayBoxX + 10, grayBoxY + 90, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_PREVIEW));
	this.buttonList.add(this.btnVisualize);


	// Create the done and cancel buttons.
	this.btnBuild = new GuiButtonExt(1, grayBoxX + 10, grayBoxY + 136, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_BUILD));
	this.buttonList.add(this.btnBuild);

	this.btnCancel = new GuiButtonExt(2, grayBoxX + 147, grayBoxY + 136, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_CANCEL));
	this.buttonList.add(this.btnCancel);
}
 
开发者ID:Brian-Wuest,项目名称:MC-Prefab,代码行数:24,代码来源:GuiTreeFarm.java

示例10: Initialize

import net.minecraftforge.fml.client.config.GuiButtonExt; //导入依赖的package包/类
@Override
public void Initialize()
{
	this.configuration = ClientEventHandler.playerConfig.getClientConfig(this.clientGUIIdentifier, WareHouseConfiguration.class);
	this.configuration.pos = this.pos;
	this.configuration.houseFacing = EnumFacing.NORTH;

	// Get the upper left hand corner of the GUI box.
	int grayBoxX = this.getCenteredXAxis() - 180;
	int grayBoxY = this.getCenteredYAxis() - 83;

	// Create the buttons.
	this.btnGlassColor = new GuiButtonExt(10, grayBoxX + 10, grayBoxY + 20, 90, 20, GuiLangKeys.translateDye(this.configuration.dyeColor));
	this.buttonList.add(this.btnGlassColor);
	
	this.btnVisualize = new GuiButtonExt(4, grayBoxX + 10, grayBoxY + 90, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_PREVIEW));
	this.buttonList.add(this.btnVisualize);


	// Create the done and cancel buttons.
	this.btnBuild = new GuiButtonExt(1, grayBoxX + 10, grayBoxY + 136, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_BUILD));
	this.buttonList.add(this.btnBuild);

	this.btnCancel = new GuiButtonExt(2, grayBoxX + 147, grayBoxY + 136, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_CANCEL));
	this.buttonList.add(this.btnCancel);
}
 
开发者ID:Brian-Wuest,项目名称:MC-Prefab,代码行数:27,代码来源:GuiWareHouse.java

示例11: Initialize

import net.minecraftforge.fml.client.config.GuiButtonExt; //导入依赖的package包/类
@Override
protected void Initialize() 
{
	this.configuration = ClientEventHandler.playerConfig.getClientConfig("Modular House", ModularHouseConfiguration.class);
	this.configuration.pos = this.pos;

	// Get the upper left hand corner of the GUI box.
	int grayBoxX = (this.width / 2) - 213;
	int grayBoxY = (this.height / 2) - 83;

	// Create the buttons.
	this.btnVisualize = new GuiButtonExt(4, grayBoxX + 10, grayBoxY + 20, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_PREVIEW));
	this.buttonList.add(this.btnVisualize);
	
	// Create the done and cancel buttons.
	this.btnBuild = new GuiButtonExt(1, grayBoxX + 10, grayBoxY + 136, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_BUILD));
	this.buttonList.add(this.btnBuild);

	this.btnCancel = new GuiButtonExt(2, grayBoxX + 147, grayBoxY + 136, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_CANCEL));
	this.buttonList.add(this.btnCancel);
}
 
开发者ID:Brian-Wuest,项目名称:MC-Prefab,代码行数:22,代码来源:GuiModularHouse.java

示例12: Initialize

import net.minecraftforge.fml.client.config.GuiButtonExt; //导入依赖的package包/类
@Override
protected void Initialize() 
{
	this.configuration = ClientEventHandler.playerConfig.getClientConfig("Bulldozer", BulldozerConfiguration.class);
	this.configuration.pos = this.pos;
	int color = Color.DARK_GRAY.getRGB();

	// Get the upper left hand corner of the GUI box.
	int grayBoxX = this.getCenteredXAxis() - 125;
	int grayBoxY = this.getCenteredYAxis() - 83;

	// Create the done and cancel buttons.
	this.btnBuild = new GuiButtonExt(1, grayBoxX + 10, grayBoxY + 136, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_BUILD));
	this.buttonList.add(this.btnBuild);

	this.btnCancel = new GuiButtonExt(2, grayBoxX + 147, grayBoxY + 136, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_CANCEL));
	this.buttonList.add(this.btnCancel);
}
 
开发者ID:Brian-Wuest,项目名称:MC-Prefab,代码行数:19,代码来源:GuiBulldozer.java

示例13: Initialize

import net.minecraftforge.fml.client.config.GuiButtonExt; //导入依赖的package包/类
@Override
protected void Initialize() 
{
	this.configuration = ClientEventHandler.playerConfig.getClientConfig("Fish Pond", FishPondConfiguration.class);
	this.configuration.pos = this.pos;

	// Get the upper left hand corner of the GUI box.
	int grayBoxX = (this.width / 2) - 188;
	int grayBoxY = (this.height / 2) - 83;

	// Create the buttons.	
	this.btnVisualize = new GuiButtonExt(4, grayBoxX + 10, grayBoxY + 90, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_PREVIEW));
	this.buttonList.add(this.btnVisualize);

	// Create the done and cancel buttons.
	this.btnBuild = new GuiButtonExt(1, grayBoxX + 10, grayBoxY + 136, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_BUILD));
	this.buttonList.add(this.btnBuild);

	this.btnCancel = new GuiButtonExt(2, grayBoxX + 147, grayBoxY + 136, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_CANCEL));
	this.buttonList.add(this.btnCancel);
}
 
开发者ID:Brian-Wuest,项目名称:MC-Prefab,代码行数:22,代码来源:GuiFishPond.java

示例14: getDoneButton

import net.minecraftforge.fml.client.config.GuiButtonExt; //导入依赖的package包/类
public GuiButtonExt getDoneButton()
{
    for (Object butobj : this.buttonList)
    {
        if (butobj instanceof GuiButtonExt)
        {
            GuiButtonExt button = (GuiButtonExt)butobj;
            if (button.id == 2000)
                return button;
        }
    }
    return null;
}
 
开发者ID:Yarichi,项目名称:Proyecto-DASI,代码行数:14,代码来源:MalmoModGuiOptions.java

示例15: setupButton

import net.minecraftforge.fml.client.config.GuiButtonExt; //导入依赖的package包/类
protected GuiButtonExt setupButton(final int id, final int x, final int y, @Nonnull final String buttonLabel) {
	final String label = Localization.format(buttonLabel);
	final String tip = Localization.format(buttonLabel + ".tooltip");
	final GuiButtonExt button = new GuiButtonExt(id, x, y, BUTTON_WIDTH, BUTTON_HEIGHT, label);
	this.buttonList.add(button);
	if (!tip.endsWith(".tooltip"))
		this.buttonTips.add(new GuiTooltip(this, button, tip));
	return button;
}
 
开发者ID:OreCruncher,项目名称:DynamicSurroundings,代码行数:10,代码来源:PresetsConfigGui.java


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