本文整理汇总了Java中com.enderio.core.client.gui.button.IconButton.setToolTip方法的典型用法代码示例。如果您正苦于以下问题:Java IconButton.setToolTip方法的具体用法?Java IconButton.setToolTip怎么用?Java IconButton.setToolTip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.enderio.core.client.gui.button.IconButton
的用法示例。
在下文中一共展示了IconButton.setToolTip方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: GuiVat
import com.enderio.core.client.gui.button.IconButton; //导入方法依赖的package包/类
public GuiVat(@Nonnull InventoryPlayer inventory, @Nonnull TileVat te) {
super(te, new ContainerVat(inventory, te), GUI_TEXTURE);
addToolTip(new GuiToolTip(RECTANGLE_INPUT_TANK, "") {
@Override
protected void updateText() {
text.clear();
text.add(Lang.GUI_VAT_ITANK.get());
text.add(LangFluid.MB(getTileEntity().inputTank));
}
});
addToolTip(new GuiToolTip(RECTANGLE_OUTPUT_TANK, "") {
@Override
protected void updateText() {
text.clear();
text.add(Lang.GUI_VAT_OTANK.get());
text.add(LangFluid.MB(getTileEntity().outputTank));
}
});
dump1 = new IconButton(this, 1, 29, 62, IconEIO.DUMP_LIQUID);
dump1.setToolTip(Lang.GUI_VAT_DUMP.get());
dump2 = new IconButton(this, 2, 131, 62, IconEIO.VOID_LIQUID);
dump2.setToolTip(Lang.GUI_VAT_VOID.get());
addProgressTooltip(81, 63, 14, 14);
addDrawingElement(new PowerBar<>(te, this, 11, 11, 43));
}
示例2: GuiSoulBinder
import com.enderio.core.client.gui.button.IconButton; //导入方法依赖的package包/类
public GuiSoulBinder(@Nonnull InventoryPlayer par1InventoryPlayer, @Nonnull TileSoulBinder te) {
super(te, new ContainerSoulBinder(par1InventoryPlayer, te), "soul_fuser");
usePlayerXP = new IconButton(this, PLAYER_XP_ID, 125, 57, IconEIO.XP);
usePlayerXP.visible = false;
usePlayerXP.setToolTip(Lang.GUI_SOUL_USEPLAYERXP.get());
addProgressTooltip(80, 34, 24, 16);
addDrawingElement(new PowerBar<>(te, this));
}
示例3: ModItemFilterGui
import com.enderio.core.client.gui.button.IconButton; //导入方法依赖的package包/类
public ModItemFilterGui(@Nonnull GuiContainerBaseEIO gui, @Nonnull IItemFilterContainer filterContainer, boolean isInput) {
this.gui = gui;
this.isInput = isInput;
this.filterContainer = filterContainer;
if (isInput) {
filter = (ModItemFilter) filterContainer.getItemFilter();
inputOffsetX = 50;
tfWidth = 96;
tfTextureX = 120;
tfTextureY = 214;
} else {
filter = (ModItemFilter) filterContainer.getItemFilter();
inputOffsetX = 32;
tfWidth = 114;
tfTextureX = 120;
tfTextureY = 238;
}
inputBounds = new Rectangle[] { new Rectangle(inputOffsetX, 47, 16, 16), new Rectangle(inputOffsetX, 68, 16, 16), new Rectangle(inputOffsetX, 89, 16, 16) };
deleteButs = new IconButton[inputBounds.length];
for (int i = 0; i < deleteButs.length; i++) {
Rectangle r = inputBounds[i];
IconButton but = new IconButton(gui, FilterGuiUtil.nextButtonId(), r.x + 19, r.y, IconEIO.MINUS);
deleteButs[i] = but;
}
whiteListB = new IconButton(gui, -1, inputOffsetX - 19, 89, IconEIO.FILTER_WHITELIST);
whiteListB.setToolTip(EnderIO.lang.localize("gui.conduit.item.whitelist"));
}
示例4: SpeciesItemFilterGui
import com.enderio.core.client.gui.button.IconButton; //导入方法依赖的package包/类
public SpeciesItemFilterGui(@Nonnull GuiContainerBaseEIO gui, @Nonnull IItemFilterContainer filterContainer, boolean isStickyModeAvailable,
int xOffset, int yOffset,
int buttonIdOffset) {
this.gui = gui;
this.isStickyModeAvailable = isStickyModeAvailable;
this.filterContainer = filterContainer;
this.xOffset = xOffset;
this.yOffset = yOffset;
this.buttonIdOffset = buttonIdOffset;
filter = (SpeciesItemFilter) filterContainer.getItemFilter();
int butLeft = xOffset + 92;
int x = butLeft;
int y = yOffset + 1;
whiteListB = new IconButton(gui, ID_WHITELIST + buttonIdOffset, x, y, IconEIO.FILTER_WHITELIST);
whiteListB.setToolTip(EnderIO.lang.localize("gui.conduit.item.whitelist"));
x += 20;
stickyB = new ToggleButton(gui, ID_STICKY + buttonIdOffset, x, y, IconEIO.FILTER_STICKY_OFF, IconEIO.FILTER_STICKY);
stickyB.setSelectedToolTip(EnderIO.lang.localizeList("gui.conduit.item.stickyEnabled"));
stickyB.setUnselectedToolTip(EnderIO.lang.localize("gui.conduit.item.stickyDisbaled"));
stickyB.setPaintSelectedBorder(false);
y += 20;
x = butLeft;
speciesModeB = new CycleButton<SpeciesMode.IconHolder>(gui, ID_SPECIES_MODE + buttonIdOffset, x, y, SpeciesMode.IconHolder.class);
}
示例5: ExistingItemFilterGui
import com.enderio.core.client.gui.button.IconButton; //导入方法依赖的package包/类
public ExistingItemFilterGui(@Nonnull GuiContainerBaseEIO gui, @Nonnull IItemFilterContainer filterContainer, boolean isInput) {
this.gui = gui;
this.filterContainer = filterContainer;
this.isInput = isInput;
filter = (ExistingItemFilter) filterContainer.getItemFilter();
int butLeft = 37;
int x = butLeft;
int y = 68;
useMetaB = new ToggleButton(gui, ID_META, x, y, IconEIO.FILTER_META_OFF, IconEIO.FILTER_META);
useMetaB.setSelectedToolTip(EnderIO.lang.localize("gui.conduit.item.matchMetaData"));
useMetaB.setUnselectedToolTip(EnderIO.lang.localize("gui.conduit.item.ignoreMetaData"));
useMetaB.setPaintSelectedBorder(false);
x += 20;
stickyB = new ToggleButton(gui, ID_STICKY, x, y, IconEIO.FILTER_STICKY_OFF, IconEIO.FILTER_STICKY);
String[] lines = EnderIO.lang.localizeList("gui.conduit.item.stickyEnabled");
stickyB.setSelectedToolTip(lines);
stickyB.setUnselectedToolTip(EnderIO.lang.localize("gui.conduit.item.stickyDisbaled"));
stickyB.setPaintSelectedBorder(false);
y += 20;
x = butLeft;
x += 20;
useNbtB = new ToggleButton(gui, ID_NBT, x, y, IconEIO.FILTER_NBT_OFF, IconEIO.FILTER_NBT);
useNbtB.setSelectedToolTip(EnderIO.lang.localize("gui.conduit.item.matchNBT"));
useNbtB.setUnselectedToolTip(EnderIO.lang.localize("gui.conduit.item.ignoreNBT"));
useNbtB.setPaintSelectedBorder(false);
x = butLeft;
useOreDictB = new ToggleButton(gui, ID_ORE_DICT, x, y, IconEIO.FILTER_ORE_DICT_OFF, IconEIO.FILTER_ORE_DICT);
useOreDictB.setSelectedToolTip(EnderIO.lang.localize("gui.conduit.item.oreDicEnabled"));
useOreDictB.setUnselectedToolTip(EnderIO.lang.localize("gui.conduit.item.oreDicDisabled"));
useOreDictB.setPaintSelectedBorder(false);
snapshotB = new TooltipButton(gui, ID_SNAPSHOT, 80, 65, 60, 20, EnderIO.lang.localize("gui.conduit.button.snap"));
mergeB = new GuiButton(ID_MERGE, 0, 0, 40, 20, EnderIO.lang.localize("gui.conduit.button.merge"));
clearB = new GuiButton(ID_CLEAR, 0, 0, 60, 20, EnderIO.lang.localize("gui.conduit.button.clear"));
showB = new GuiButton(ID_SHOW, 0, 0, 40, 20, EnderIO.lang.localize("gui.conduit.button.show"));
snapshotB.setToolTip(EnderIO.lang.localizeList("gui.conduit.button.snap.tooltip"));
x -= 20;
whiteListB = new IconButton(gui, -1, x, y, IconEIO.FILTER_WHITELIST);
whiteListB.setToolTip(EnderIO.lang.localize("gui.conduit.item.whitelist"));
snapshotOverlay = new SnapshotOverlay();
gui.addOverlay(snapshotOverlay);
}
示例6: BasicItemFilterGui
import com.enderio.core.client.gui.button.IconButton; //导入方法依赖的package包/类
public BasicItemFilterGui(@Nonnull GuiContainerBaseEIO gui, @Nonnull IItemFilterContainer filterContainer, boolean isStickyModeAvailable,
int xOffset, int yOffset,
int buttonIdOffset) {
this.gui = gui;
this.isStickyModeAvailable = isStickyModeAvailable;
this.filterContainer = filterContainer;
this.xOffset = xOffset;
this.yOffset = yOffset;
this.buttonIdOffset = buttonIdOffset;
filter = (ItemFilter) filterContainer.getItemFilter();
isAdvanced = filter.isAdvanced();
isLimited = filter.isLimited();
int butLeft = xOffset + 92;
int x = butLeft;
int y = yOffset + 1;
whiteListB = new IconButton(gui, ID_WHITELIST + buttonIdOffset, x, y, IconEIO.FILTER_WHITELIST);
whiteListB.setToolTip(EnderIO.lang.localize("gui.conduit.item.whitelist"));
x += 20;
useMetaB = new ToggleButton(gui, ID_META + buttonIdOffset, x, y, IconEIO.FILTER_META_OFF, IconEIO.FILTER_META);
useMetaB.setSelectedToolTip(EnderIO.lang.localize("gui.conduit.item.matchMetaData"));
useMetaB.setUnselectedToolTip(EnderIO.lang.localize("gui.conduit.item.ignoreMetaData"));
useMetaB.setPaintSelectedBorder(false);
x += 20;
stickyB = new ToggleButton(gui, ID_STICKY + buttonIdOffset, x, y, IconEIO.FILTER_STICKY_OFF, IconEIO.FILTER_STICKY);
stickyB.setSelectedToolTip(EnderIO.lang.localizeList("gui.conduit.item.stickyEnabled"));
stickyB.setUnselectedToolTip(EnderIO.lang.localize("gui.conduit.item.stickyDisbaled"));
stickyB.setPaintSelectedBorder(false);
y += 20;
x = butLeft;
useOreDictB = new ToggleButton(gui, ID_ORE_DICT + buttonIdOffset, x, y, IconEIO.FILTER_ORE_DICT_OFF, IconEIO.FILTER_ORE_DICT);
useOreDictB.setSelectedToolTip(EnderIO.lang.localize("gui.conduit.item.oreDicEnabled"));
useOreDictB.setUnselectedToolTip(EnderIO.lang.localize("gui.conduit.item.oreDicDisabled"));
useOreDictB.setPaintSelectedBorder(false);
x += 20;
useNbtB = new ToggleButton(gui, ID_NBT + buttonIdOffset, x, y, IconEIO.FILTER_NBT_OFF, IconEIO.FILTER_NBT);
useNbtB.setSelectedToolTip(EnderIO.lang.localize("gui.conduit.item.matchNBT"));
useNbtB.setUnselectedToolTip(EnderIO.lang.localize("gui.conduit.item.ignoreNBT"));
useNbtB.setPaintSelectedBorder(false);
x += 20;
damageB = new CycleButton<DamageModeIconHolder>(gui, ID_DAMAGE + buttonIdOffset, x, y, DamageModeIconHolder.class);
}