本文整理匯總了Java中net.minecraft.client.gui.GuiButton.isMouseOver方法的典型用法代碼示例。如果您正苦於以下問題:Java GuiButton.isMouseOver方法的具體用法?Java GuiButton.isMouseOver怎麽用?Java GuiButton.isMouseOver使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.client.gui.GuiButton
的用法示例。
在下文中一共展示了GuiButton.isMouseOver方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: drawGuiContainerForegroundLayer
import net.minecraft.client.gui.GuiButton; //導入方法依賴的package包/類
/**
* Draw the foreground layer for the GuiContainer (everything in front of the items). Args : mouseX, mouseY
*/
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
{
RenderHelper.disableStandardItemLighting();
this.drawCenteredString(this.fontRendererObj, I18n.format("tile.beacon.primary", new Object[0]), 62, 10, 14737632);
this.drawCenteredString(this.fontRendererObj, I18n.format("tile.beacon.secondary", new Object[0]), 169, 10, 14737632);
for (GuiButton guibutton : this.buttonList)
{
if (guibutton.isMouseOver())
{
guibutton.drawButtonForegroundLayer(mouseX - this.guiLeft, mouseY - this.guiTop);
break;
}
}
RenderHelper.enableGUIStandardItemLighting();
}
示例2: drawScreen
import net.minecraft.client.gui.GuiButton; //導入方法依賴的package包/類
@Override
public void drawScreen(int par1, int par2, float par3)
{
drawDefaultBackground();
drawCenteredString(fontRendererObj, "Wurst Options", width / 2, 40,
0xffffff);
drawCenteredString(fontRendererObj, "Settings", width / 2 - 104,
height / 4 + 24 - 28, 0xcccccc);
drawCenteredString(fontRendererObj, "Managers", width / 2,
height / 4 + 24 - 28, 0xcccccc);
drawCenteredString(fontRendererObj, "Links", width / 2 + 104,
height / 4 + 24 - 28, 0xcccccc);
super.drawScreen(par1, par2, par3);
for(int i = 0; i < buttonList.size(); i++)
{
GuiButton button = buttonList.get(i);
if(button.isMouseOver() && !toolTips[button.id].isEmpty())
{
drawHoveringText(Arrays.asList(toolTips[button.id].split("\n")),
par1, par2);
break;
}
}
}
示例3: drawScreen
import net.minecraft.client.gui.GuiButton; //導入方法依賴的package包/類
/**
* Draws the screen and all the components in it.
*/
@Override
public void drawScreen(int par1, int par2, float par3)
{
drawDefaultBackground();
drawCenteredString(fontRendererObj, "Clean Up", width / 2, 20,
16777215);
drawCenteredString(fontRendererObj,
"Please select the servers you want to remove:", width / 2, 36,
10526880);
super.drawScreen(par1, par2, par3);
for(int i = 0; i < buttonList.size(); i++)
{
GuiButton button = buttonList.get(i);
if(button.isMouseOver() && !toolTips[button.id].isEmpty())
{
drawHoveringText(Arrays.asList(toolTips[button.id].split("\n")),
par1, par2);
break;
}
}
}
示例4: drawGuiContainerForegroundLayer
import net.minecraft.client.gui.GuiButton; //導入方法依賴的package包/類
/**
* Draw the foreground layer for the GuiContainer (everything in front of the items)
*/
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
{
RenderHelper.disableStandardItemLighting();
this.drawCenteredString(this.fontRendererObj, I18n.format("tile.beacon.primary", new Object[0]), 62, 10, 14737632);
this.drawCenteredString(this.fontRendererObj, I18n.format("tile.beacon.secondary", new Object[0]), 169, 10, 14737632);
for (GuiButton guibutton : this.buttonList)
{
if (guibutton.isMouseOver())
{
guibutton.drawButtonForegroundLayer(mouseX - this.guiLeft, mouseY - this.guiTop);
break;
}
}
RenderHelper.enableGUIStandardItemLighting();
}
示例5: drawScreen
import net.minecraft.client.gui.GuiButton; //導入方法依賴的package包/類
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
super.drawBackground(0);
super.drawScreen(mouseX, mouseY, partialTicks);
PluginManifest manifest = plugin.getManifest();
int base = 25;
drawString(Fonts.segoe22, plugin.getName(), width / 2 - Fonts.segoe22.getStringWidth(plugin.getName()) + 15, 10, 0xffffff);
drawString(fontRendererObj, "Version: " + manifest.getVersion(), 10, base, 0xffffff);
drawString(fontRendererObj, "Author(s): " + Arrays.toString(manifest.getAuthors()).replaceAll("\\[", "").replaceAll("\\]", ""), 10, base + 12, 0xffffff);
drawString(fontRendererObj, "Main: " + manifest.getMain(), 10, base + 24, 0xffffff);
for (GuiButton button : buttonPermissions.keySet()) {
drawString(fontRendererObj, buttonPermissions.get(button).getName(), 10, button.yPosition + 5, 0xffffff);
if (button.isMouseOver()) {
List<String> lines = Arrays.asList("This permission is used to", buttonPermissions.get(button).getDescription());
drawHoveringText(lines, mouseX, mouseY);
}
}
}
示例6: drawScreen
import net.minecraft.client.gui.GuiButton; //導入方法依賴的package包/類
@Override
public void drawScreen(int par1, int par2, float par3) {
drawDefaultBackground();
drawCenteredString(fontRendererObj, "Wurst Options", width / 2, 40,
0xffffff);
drawCenteredString(fontRendererObj, "Settings", width / 2 - 104,
height / 4 + 24 - 28, 0xcccccc);
drawCenteredString(fontRendererObj, "Managers", width / 2,
height / 4 + 24 - 28, 0xcccccc);
drawCenteredString(fontRendererObj, "Links", width / 2 + 104,
height / 4 + 24 - 28, 0xcccccc);
super.drawScreen(par1, par2, par3);
for (int i = 0; i < buttonList.size(); i++) {
GuiButton button = buttonList.get(i);
if (button.isMouseOver() && !toolTips[button.id].isEmpty()) {
drawHoveringText(Arrays.asList(toolTips[button.id].split("\n")),
par1, par2);
break;
}
}
}